• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

After I select a movie from a button, how do I make the movie invisible after it plays?

New Here ,
Feb 28, 2014 Feb 28, 2014

Copy link to clipboard

Copied

I'm making a GUI that has three buttons on the stage.  The buttons may be selected at random.  Each button activates a short animation (movie clip).  The movie takes up the entire stage.  After the clip plays, I want it to disappear from the stage, allowing the user to select any other (or the same) button/movie clip.  So far I have this script.  There are no compiler errors nor any syntax errors.  However, it still dosn't do what I want.  What am I missing?  Thanks

movieOne_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);

function mouseDownHandler(event:MouseEvent):void
{
navigateTo.MovieOne.mc;
gotoAndPlay(1);
}
if (MovieOne.mc.complete)
{
gotoAndStop(15);
}

loader.contentLoaderInfo.addEventListener(Event.COMPLETE, swfIn);
function swfIn(e:Event):void
{
loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, swfIn);
mcExternal = loader.content = MovieClip;

MovieOne.mc.visible = false;
}

Slide1.JPG

Slide2.JPG

Disappearing Movie After It Plays.jpg

Slide4.JPG

TOPICS
ActionScript

Views

186

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 28, 2014 Feb 28, 2014

Copy link to clipboard

Copied

LATEST

I don't know if the code you show is supposed to be trying to make the movieclip invisible, but it is doubtful it will if it is involved with that conditional you show.  How are the movieclips invisible to begin with?  If there is some frame that they sit at that makes them invisible, then when the movieclip reach the last frame you can tell it to go to that frame.  Otherwise, what you can probably do is put a command in the last frame of each movieclip that tells it to become invisible...

this.visible = false;

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines