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

How do you make a movie clip invisible in CS3?

New Here ,
Feb 10, 2009 Feb 10, 2009

Copy link to clipboard

Copied

Hi,

I know this sounds stupid, but I've worked like all the time with Flash 2004 and Flash MX. Now I got CS3, and I want to do the following. I made a MP3 player, but I want to make a 'play' icon visible when the music plays and the 'pause' icon visible when it's paused. Therefor the 'play' icon needs to be invisible, and vice versa. I've got this, but it gives an error:

import flash.events.MouseEvent;
pause_text._visible = false;
play_btn.addEventListener(MouseEvent.CLICK, showPlay);

function showPlay(event:MouseEvent):void
{
play_text._visible = true;
pause_text._visible = false;
}

pause_btn.addEventListener(MouseEvent.CLICK, showPause);

function showPause(event:MouseEvent):void
{
pause_text._visible = true;
play_text._visible = false;
}

What am I doing wrong? In MX or 2004, this was the way to make Movie Clips invisible. Please help.

Thanks in advance,

Regards,
Ithiriel
TOPICS
ActionScript

Views

373

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

correct answers 1 Correct answer

LEGEND , Feb 10, 2009 Feb 10, 2009
Cases that use to be _property in AS2 are now just property in AS3. So _x is x, _y is y, and _visible is visible. This should work:

function showPlay(event:MouseEvent):void
{
play_text.visible = true;
pause_text.visible = false;
}

Votes

Translate

Translate
LEGEND ,
Feb 10, 2009 Feb 10, 2009

Copy link to clipboard

Copied

Cases that use to be _property in AS2 are now just property in AS3. So _x is x, _y is y, and _visible is visible. This should work:

function showPlay(event:MouseEvent):void
{
play_text.visible = true;
pause_text.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
New Here ,
Feb 10, 2009 Feb 10, 2009

Copy link to clipboard

Copied

LATEST
It's working, thank you.

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