Skip to main content
Known Participant
October 25, 2011
Answered

hide movie clip of external swf

  • October 25, 2011
  • 2 replies
  • 444 views

Hi there.

I have my main.swf and in the second frame i load an external swf called first.swf with this method:

[AS]var loader:MovieClipLoader = new MovieClipLoader();

this.createEmptyMovieClip("myGalleryContainerproducts",5);

myGalleryContainerproducts._lockroot=true;

loader.loadClip("first.swf",myGalleryContainerproducts);

myGalleryContainerproducts._y =86;

myGalleryContainerproducts._x =50;

[/AS]

In first.swf i have two movie clips with instance names ena and dyo

I want in main.swf in the third frame to hide these movie clips of first.swf  (only the movie clips not the whole .swf) or to move them (change x and y values) so they practically hide.

Any solutions?

Thank you in advance

This topic has been closed for replies.
Correct answer kglad

after ena and dyo are instantiated you can use:

myGalleryContainerproducts.ena._visible=false

myGalleryContainerproducts.dyo._visible=false;

2 replies

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
October 25, 2011

after ena and dyo are instantiated you can use:

myGalleryContainerproducts.ena._visible=false

myGalleryContainerproducts.dyo._visible=false;

Ned Murphy
Legend
October 25, 2011

You will need to wait until the file is loaded to be able to interact with it, so if that might be an issue timing-wise then look into using the addListener method of the MovieClipLoader class.  If the movie is loaded you should be able to access the movieclips within it using the movieclip name you assigned (mygalleryContainerproducts) to target them.