::Flash ?uestion
- Started
- Last post
- 11 Responses
- bug
What's up.
I have question...
You know when you load an external .swf onto a level, it clears whatevers on that level, then loads...and there is a second or two where the stage is blank...how can you load external .swf's with a transition in and out?
If someone could give me a clue i would be very greatful...it's driving me mad.Hope i make sense, and sorry for another flash ?
- tomkat0
hmm??
- bug0
i knew i wouldn't explain it correctly...
- dstlb0
This probably isn't the best way but it works...
Set up a button action that firstly writes the filename of the required swf to a textfield, then secondly sets off the fade out or whatever transition you want.
At the end of the transition have a frame action that has a loadmovie request based on the text you previously wrote to the textfield.
Only problem with it is that if for some reason the next swf is missing it breaks the site, so make sure everything is in it's right place.
- bug0
thanks for yer time dstlb,
do you have an example of how that code would look?
- unfittoprint0
create 2 and so movieclips.
when loading is complete on movie 2, make a loop to change the _alpha on movie1 and so on.
you can use an onEnterFrame event to take care of this.
- bug0
wow, unfittoprint...that sounds pretty good. i guess i have a lot to learn...
do you have an example that you could mail me? i would really like to figure this out.If not, no sweat...i know im asking a lot
- unfittoprint0
I'm just going to put here the basics, you can try to figure out the rest...
count=1
this.createEmptyMovieClip("movie...this.createEmptyMovieClip("movie...
movie2._alpha=0
button1.onRelease=function(){
this["movie"+count].loadmovie("f...count=(count==1)?2:1
fade();
}
the fade function its an onEnterFrame event that checks if the movie is loaded in the invisible movie and if it is, start looping until its _alpha is 100 and its opposite movie is 0 (or vice versa).
good luck.
- bug0
thanks!
- unknown0
Flash is all about logic even if you can actionscript... as Unfittoprint has shown.
Sorry, a mini rant... Was accused of being a good actionscripter the other day!
- zoiks0
In the past I have just placed a transition movie clip at the root level. Then when I call the external .swf, I also call a function that plays the tramsition movie clip (which is on top of my empty movie clip) (my transition movie clip is usually a alpha tweened square of color to match my background)
Kinda low budget, but it works.
- unfittoprint0
lol
exactly: logic. all goes down to if, else, for, event loops, setInterval, inner loops, check, listeners....