prob loading external swf
- Started
- Last post
- 9 Responses
- indy73
I'm trying to load an external swf into a flash movie, the externel swf has a 4 frame alpha loop so that it gradually fades in when loaded however when I try and do this I get nothing but if I remove the alpha loop and just do and old fashioned motion tween for the alpha it works. Any explaination why this happens and what I can do about it?
- versa0
explain how you are doing the alpha fade a little better...
i would already suggest treating the new .swf like any object MC, and running a proto fade on it once it is loaded.....so you need to build a quick check on it to make sure it has loaded first...then execute the fade script....and fade scripts are super processor intensive anyways, so be careful with them...
- indy730
What I did was in the external swf I did this loop:
1st frame: I set a variable a = 0;
2nd frame: if (a<=100) {
setProperty("/adrian1", _alpha, a);
a = a+20;
} else {
gotoAndStop(4);
}
3rd frame: gotoAndPlay(2);And in the movie I wanted to load into I added this action to the button: on (release) {
_root.empty.loadMovie("adrian.sw...
}
- versa0
i would code it a little differently i think, but that doesn't mean it shouldn't load anyways....
just a suggestion: try building a fade script inside the .swf that does the loading of the other new .swf...
then build a bytes Checker for the new .swf...when it is loaded...execute the fade function, setInterval, whatever to fade it in...does that make sense?
how big is the swf in question...are you testing it live or just locally right now
- indy730
the swf is just shy of 300 kb it includes an image for a portfolio site. ANd thanks for the info I appreciate it.
- versa0
and i think your problem might be originating in the path structure to the original .swf
setProperty("/adrian1", _alpha, a);
where are the swfs living
- indy730
they're in the same folder as the main movie file
- versa0
well i never use set prop, so not too sure if you can set prop on an .swf by itself....my guess is no
you could use your current approach, but load the .swf into an MC on the stage of the orig .swf....then use a set prop function in the orig .swf to change the alpha of the MC holding the loaded .swf
- versa0
the problem is definately your path structure, and then that you are trying to address a swf's properties directly
- indy730
ok, I'll go back and stry and restructure it differently to see if that takes care of it, thanx again for the help.