User Tag List

Results 1 to 9 of 9

Thread: External Fi(ck)les

  1. #1
    No Products Registered

    Join Date
    Jul 2006
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    External Fi(ck)les

    I've been messing around with Vitalize a bit in the last few days, since it seemed like a good outlet for a few one-shot project ideas I had. But, being the compression nut that I am, I want to try to keep my graphics to paletted image formats -- PNG for static images, and GIF for the animated ones (since MNG never really caught on). After a bit of hectic trying (I originally misread part of the post on how to include external files, and to me it slightly unintuitive that the CCN must be saved to the same directory in order for them to automatically be made relative), I got a few preliminary animated GIFs to work on my exported CCN file. Then I realized that my webhost probably wouldn't support that application type.

    To my surprise, it did, and I can run Vitalize applications. However, for reasons unknown to me, the image files (which are placed in the same directory) do not work. If I save the contents of the directory to my hard drive then run the HTML file, things work fine, but the Animation object seems to be unwilling to load external files that are hosted on the web. Has anybody experienced anything similar to this? I know the Animation object is at the least quirky, since it will result in an error if the File property isn't a valid local path on application launch (meaning I can't leave it blank and then load a file via the Expression Editor -- or I would be able to, but even locally images fail to work in my CCN file if the Animation object encounters any form of error). Or perhaps I'm just doing something wrong and it only happens to work locally by luck? Or maybe some webhosts don't allow the downloading of other files by Vitalize applications? I'm not sure what to try next, but I'd prefer not to have to use full 24-bit bitmaps when a 3-bit palette will suffice.

  2. #2
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: External Fi(ck)les

    Try using the full URLs of the files.

  3. #3
    No Products Registered

    Join Date
    Jul 2006
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: External Fi(ck)les

    Ah, I should've been more clear -- I wasn't actually trying to load them dynamically at all. I just tried that as a test.

    However, after playing around with the Animation object a bit more, it seems to me that it functions differently once compiled.
    For instance, if error messages are enabled, they show up properly when ran from the MFA, but I just get blank errors when running the CCN.
    Also, while running from the MFA, if there is an error, it reports it, then continues to function. But if there is an error while running from the CCN, after the blank error message, the object appears to stop functioning.

    I've put together a small package to demonstrate this. (Note - everything needs to be extracted to the root C:\ drive for this to work properly. Sorry about that, but I needed a file to specifically not be found at first.) It's at http://home.comcast.net/~hammerbro/shmop/SHMOP.zip
    If you open up the MFA, it will be unable to locate C:\Logo.gif (because I have intentionally renamed it sLogo.gif). Click ignore, and the rest of it should load properly. Then run the application. First, it will pop up an error box saying Cannot Locate C:\Logo.gif, and then the Start of Frame event will load Ship.gif instead, and the first frame will properly display the small animated ship. Click to go to the next frame, and that ship will be loaded by default (the Animation object on that frame has C:\Ship.gif as its file property).

    I've included the compiled CCN, but feel free to recompile it yourself, just make sure to save it to the C:\ directory where all of the other files are (since that's how MMF seems to link up its relative file paths). Then open shmop.html, which loads the CCN in Vitalize.
    First you will notice that the error message, which should say that it cannot locate Logo.gif, is blank. But that's okay, because the next event loads Ship.gif, which does exist... except it doesn't work. Exact same event as before, but it doesn't work when run through Vitalize.
    Now click to go to the next level, where it loads Ship.gif by default. You should be able to see it properly, which means that Vitalize has no problem loading Ship.gif if it's the initial file, but if there's an error the object appears to stop functioning.

    Perhaps the runtime version of the extension has a bug, or it didn't get Vitalized properly? I don't think it's anything I'm doing, since the file can definitely be loaded by Vitalize and it works properly when run from the MFA. But can you see what I mean?

    I know it's a roundabout way of mentioning this, but when I've got the files on my webhost, it can't seem to load the initial files, even if they're made relative to the application. But because of this bug, that means that I can't use any events to try to properly load it, either, so I'm a bit stumped.

    Also, if anyone knows of any other way of using animated paletted images, internally or not, I'd be willing to try that out. But I'd like to keep my filesize down, and I don't think MMF has too much internal support for PNG/GIF.

  4. #4
    Clickteam Clickteam
    Olivier's Avatar
    Join Date
    Jun 2006
    Posts
    3,000
    Mentioned
    9 Post(s)
    Tagged
    1 Thread(s)

    Re: External Fi(ck)les

    Prior to displaying a picture, a web-browser must first download the file to user's hard-drive in a temp folder. For Vitalize! apps you must apply the same rule.

    So this is how I'm doing it. I use the Vitalize! Plug-In Object to download each external file used by my app. No need to specify the folder, Clickteam made it easy for us.
    Then I load the external file into the object (be it Active Picture, Direct Show, whatever..) via an expression. Again there's no need to specify the folder, just write the complete filename like "crash.wav". That should do it.

    PS: All the files (ccn, sounds, pictures) are stored in the same directory at my server. It's easier that way, I actually never tried to do it in another way.

  5. #5
    No Products Registered

    Join Date
    Jul 2006
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: External Fi(ck)les

    The more I mess around with it the more I think it's a problem with the Animation object. I created a blank frame, with two objects. One Active Picture object and one Animation object. Both of them had no file specified by default, and I had one event:
    Start of Frame - Load File "Ship.gif" (for both objects).

    When I ran the application from MMF, both were loaded fine. When I compiled the CCN and ran it in the browser, only the Active Picture object loaded its file.

    It seems to me that there's a bug in the Animation object, where if the default file specified in the File property isn't properly loaded on startup, then files cannot be loaded through events. This is a problem, because it means that even if I could get Vitalize to separately (possibly redundantly?) download the needed files, I couldn't use an event to load them into the Animation object since it seems to always be unable to load whatever is specified in its File property.

    If you have the time, maybe you could try it for yourself? Compare an Active Picture object and an Animation object, just to make sure it's not me. Have them both start with no file and load the same picture on Start of Frame. If I'm right, it should work when run from MMF but fail when run as a Vitalized CCN. If they both work for you, then something's wrong on my end (besides the fact that my computer can't load its OS right now -- but that's another matter).

  6. #6
    Clickteam Clickteam
    Olivier's Avatar
    Join Date
    Jun 2006
    Posts
    3,000
    Mentioned
    9 Post(s)
    Tagged
    1 Thread(s)

    Re: External Fi(ck)les

    Just a question. Did you setup your Image Filters correctly? That setting can be found in the Application Properties.

  7. #7
    No Products Registered

    Join Date
    Jul 2006
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: External Fi(ck)les

    It was on automatic, but I changed it to manual and left all boxes checked just in case it wasn't including them automatically for some reason, but it wound up having the same problem.

    Even then, aren't those just the internal image filters? My problem is with the Animation object. Everything else seems to work fine when Vitalized (although I haven't yet explicitly tried using external files with any other vitalized objects. But I don't think I'd need anything else to be externalized, since MMF supports OGGs MIDIs and WAVs internally).

  8. #8
    Clickteam Clickteam
    Olivier's Avatar
    Join Date
    Jun 2006
    Posts
    3,000
    Mentioned
    9 Post(s)
    Tagged
    1 Thread(s)

    Re: External Fi(ck)les

    I've made a test and the gif file won't load in both an Animation object and an Active Picture object. Yet I've followed the rules.

    In my test I've also included a string returning the AppTempPath$ system expression. Because any file downloaded by a Vitalize! application should automatically go there normally, well in my understanding. And strangely enough AppTempPath$ always returns the same path for me:
    Code:
    C:\WINDOWS\system32\Clickteam\Vitalize\v4\
    This is absolutely not the path to a temp folder, and I think that there's a bug here. The gif file can't be saved there, and thus it can't be reached by the Vitalize! application.

  9. #9
    No Products Registered

    Join Date
    Jul 2006
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: External Fi(ck)les

    Hmm, I noticed this too when I ran it. It looks to me like Vitalize is actually keeping its temporary files in "C:\Documents and Settings\UserName\Local Settings\Temp\" (for Windows XP, at least). It is properly downloading the files from my webserver, as I see vtz1.gif appear when Logo.gif is to be loaded, but it still doesn't display properly in the application. If errors are enabled with the Animation object, I get the blank error message, and I don't know if I can force it to load vtz1.gif manually since that bug I described earlier seems to prevent this.

    But, it seems, I can be reasonably sure that I'm not doing things wrong at this point. So now my question is, has anybody gotten external (preferably animated) GIF files to work in their Vitalize applications? And if so, how?

Similar Threads

  1. Load External SWF
    By Mephistus in forum SWF/Flash Export Module Version 2.0
    Replies: 3
    Last Post: 22nd August 2013, 04:12 AM
  2. External Joypad
    By MilesD in forum iOS Export Module Version 2.0
    Replies: 1
    Last Post: 18th August 2011, 06:12 PM
  3. external ini files
    By jchristiansen in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 2nd June 2010, 07:58 PM
  4. How to run an external application?
    By BeaubborZ in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 14th May 2008, 12:42 PM
  5. [bug?] External Sounds
    By Benicle in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 10th July 2007, 12:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •