View Full Version : Is it possible to make an swf invisible?
atropper
05-22-2008, 11:16 PM
is it possible to make an swf file completely invisible once i click a button and load an external movie clip from that swf file?
atomic
05-23-2008, 03:00 AM
What do you mean by load an external movie clip from that swf file?
atropper
05-23-2008, 04:27 PM
what i ment to say was that i have a file (its my root). when i click a button in it a movie clip loads on top. what i am trying to achieve is that only the external mc i loaded will shown and the root file will be invisible.
I hope i explained myself better now.
thanks again
atomic
05-23-2008, 05:26 PM
Do you mean that you're loading an external .swf in a container clip or on another level, or are you attaching some movie clip from the Library?
atropper
05-23-2008, 05:51 PM
I apologize i still didn't make my self clear, i dont have much experience in AS.
i got 2 files: "Index.swf" and "Graphic.swf"
so from my Index.swf file, i call an external movie clip. (using an empty mc called "mc_loader"), i used the behaviors panel to do so. and the code look like that:
on(release){
if(this.mc_loader == Number(this.mc_loader)){
loadMovie("Graphic.swf" , this.mc_loader);
}else{
this.mc_loader.loadMovie("Graphic.swf");
}
}
Next i want to remove/ make invisble the Index.swf file i came from.
So i tryied the following:
this.removeMovieClip(); and unloadMovie(this);. but the closest i reached to what i want was that when i clicked the button ,the External mc did not load and the index.swf file was the one that got removed. so i end up with nothing on the screen.
Man , i appreciate your help and i hope that help you out to understand my mess.
atomic
05-23-2008, 06:12 PM
OK...
First you would not usually refer to loading a movie clip, when your in fact loading another external .swf movie, not a movie clip... Leads to confusion...
Now tell me this... Are both movies ("Index.swf" and "Graphic.swf") of the same dimensions?
Does the Graphic.swf have a solid & opaque background?
Will you eventually want to return to the index.swf from the Graphic.swf or not?
atropper
05-23-2008, 10:01 PM
the 2 files have different dimensions.
the "Graphic.swf" file is bigger in hight.
Also at some point i would like to return to the "Index.swf" file. (the user can do so by clicking on a button that will direct him back).
I'm not sure i understood completely about the opec background part,however i do not use it in the file.
Thanks for replaying so fast.
atomic
05-23-2008, 10:17 PM
Thing is, you can't really make your index.swf invisible, if you load your other movie in a container clip... Setting the alpha of the index.swf to 0, would probably hide the container clip as well, thus your Graphic.swf.
I suggest you load your Graphic.swf on another level rather than in a container clip...
on(release){
loadMovieNum("Graphic.swf" , 10);
}
The above will load the external .swf on level 10, rather than in a container clip...
Try it. Does the loaded Graphic completely cover up the index.swf?
What I meant by an opaque background, is that by default, a .swf is transparent. If you don't have a solid (colored or not...) background set on the lowest layer of the Graphic.swf, then you should see through the transparent sections, your underlying index.swf, which is on level 0.
If you have this problem, try adding a solid background (a filled rectangle graphic) to your Graphic.swf, and then again test it using loadMovieNum, as suggested above.
That added background will hide the underlying index.swf...
atropper
05-23-2008, 11:51 PM
Ok, i used the "loadMovieNum("Graphic.swf" , 10)" function
,and i also added a background to the lowest layer in "Graphic.swf".
so now i don't see "index.swf" behind ,"Graphic.swf" is being loaded and thats great.
And now, that im at "Graphic.swf" ,and i want to call another external mc (lets say "contact us.swf"),shell i use the same function again? with the same level number or another?
What Im trying to understand is, if i will continue to load external mc. one on top the other,will the file might get stuck at some point? or i better unload the mc?
atomic
05-24-2008, 02:05 AM
Simply load it on the same level, it will automatically clear the previous loaded external .swf... Stop calling it a movie clip... It's an external .swf movie.
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.