How to preloade FlashEff animations

Posted by negush 
How to preloade FlashEff animations
December 09, 2008 07:35AM
The easiest way would be to have one .swf file with your FlashEff animation and another separate file for the preloader.

In the animation file, we recommend the FlashEff instances to be placed on the stage starting from the 5th frame, so they would have plenty of time to initialize, otherwise they would pop-up once, just before the animation starts. Also, the animation file should have a stop() function on the first frame. This is needed because Flash player does not wait for the entire file to load before it starts playing it, so you'll end up with the animation starting to play while the .swf file is still loading and the preloader still displayed. This way, the entire .swf file gets loaded first and once it is loaded, you can access the content of the Loader object into which the animation has loaded and call gotoAndPlay(2), to start playing the animation. If you would like, you could also place a gotoAndPlay(2) function call in the animation .swf file so it replays your animation.

The preloader file does simply define a Loader object into which your animation .swf file is loading and display a preloader while the animation is loading. Finally it starts the animation by calling gotoAndPlay(2) as mentioned above.

Please see the attached example for more details.
Attachments:
open | download - PreloadingFlashEffAnimations.zip (838.7 KB)
Re: How to preloade FlashEff animations
May 05, 2009 04:30AM
I just started playing with Flash eff and I like it so far, but this preloader thing is killing me. I'm a novice when it comes to anything code so please help me out here. My file has 2 flash files in it. The little logo annimation is working fine. The second is a large intro that starts with the fisherman pic you'll see.

[www.revolver-design.com]

I downloaded your files and modified the background and size to mine. Then renamed my final .swf to be "Animation.swf" hoping your preloader would do the trick for me. (Like I said, anything code is a struggle for me).

So when I test it in flash player it works fine. I open my "Preloader.swf" file and see the bar for a millisecond and then my "Animation.swf" plays. BUT, when I placed the "Preloader.swf" into my Dreamweaver document, it stopped working.

Please help and thanks.

If you link straight to the "Preloader.swf" it works:

[www.revolver-design.com]

What is Dreamweaver doing that is messing this up?



Edited 1 time(s). Last edit at 05/05/2009 05:22AM by mSum.
Re: How to preloade FlashEff animations
May 05, 2009 07:50AM
Make sure you have the animated swf(the one that you want to load) in the location specified in the preloader. That is the only reasonable explanation.
Re: How to preloade FlashEff animations
May 05, 2009 04:13PM
well the direct link to my "Preloader.swf" works. Meaning yes it is pointing to the right place. It has to be for this link to work:
[www.revolver-design.com]

(forum is cutting off the second half when you view links it's /BRNDxSITE/images/Preloader.swf

In Dreamweaver I'm placing the above file, the "Preloader.swf". But as you can see, SITE LINK, when I do this, it no longer works. It's driving me crazy. :(

Here is a link to download my .fla files, but like I said, they seem fine:

DOWNLOAD


Ionut Wrote:
-------------------------------------------------------
> Make sure you have the animated swf(the one that
> you want to load) in the location specified in the
> preloader. That is the only reasonable
> explanation.



Edited 2 time(s). Last edit at 05/05/2009 04:15PM by mSum.
Re: How to preloade FlashEff animations
May 06, 2009 04:27PM
If someone is willing to look into this for me, here is my entire root folder:

DOWNLOAD

The HTML doc and all the supporting files. If you can help me make this work, it'd be really nice :D



Edited 1 time(s). Last edit at 05/06/2009 04:30PM by mSum.
Re: How to preloade FlashEff animations
May 07, 2009 01:51PM
In your Preloader.fla file, open the actions menu, go to the line: var request:URLRequest = new URLRequest("Animation.swf"); and change the url from "Animation.swf" to "images/Animation.swf"

Once you embed the Preloader.swf to a html page, paths become relative to the location of that page.
Re: How to preloade FlashEff animations
May 07, 2009 04:14PM
Oh dude! this is fantastic, thank you. If you are ever in SLC, UT, I'll buy you a beer :D

I should have know it was this simple. Thought the link was relative to the preloader file, not the page it is placed in. Thanks again.

One small thing I found out, (maybe most already know this), but when you preload this way the second file will keep the FPS setting of the first. For example, the "Preloader.swf" was set to 30 fps, my "Animation.swf" was set to 15 fps. When this loaded, my movie played at double speed. I simply opened the "Preloader.fla" and changed it's settings to 15 fps so they were both 15 fps and everything works perfect!

Thanks a 3rd time, I am now a big fan of FlashEff.

Preloaders are pretty important, I think a video tutorial or at least a detailed write-up would help a lot of people out.

Here is a link to the working file: LINK

imyourmom Wrote:
-------------------------------------------------------
> In your Preloader.fla file, open the actions menu,
> go to the line: var request:URLRequest = new
> URLRequest("Animation.swf"); and change the url
> from "Animation.swf" to "images/Animation.swf"
>
> Once you embed the Preloader.swf to a html page,
> paths become relative to the location of that
> page.
Re: How to preloade FlashEff animations
May 08, 2009 10:30AM
Glad i could help
Re: How to preloade FlashEff animations
July 12, 2009 04:51AM
THANKS SO MUCH THIS HELPED A LOT!!!

but one question: The Background does not dissapear once the "Animation" is loaded.
Re: How to preloade FlashEff animations
July 12, 2009 04:53AM
O and is there a way where i can edit the progress bar ( Color, size, etc. )
Re: How to preloade FlashEff animations
July 12, 2009 09:39PM
Sorry for the many questions as u can see im a newbie at all this ACS stuff, but i have my preloader on the dreamweaver index.html but the preloader doesnt show on the web. only my "animation" is showing up!

In the preview the preloader shows up but as i say again it does not show on the web!

HELP ME PLEASE!
Sorry, you do not have permission to post/reply in this forum.