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

Play button AS2 not working need help please!

Guest
Jul 09, 2010 Jul 09, 2010

Copy link to clipboard

Copied

Hi,

I have an AS2 project with two scenes, Scene 1 is has a pre-loader and Scene 2 has an embedded .flv animation from after effects with some other basic tweened shape layers and masks. I've used the Components UI and dragged a "Replay" button to the last keyframe with a seperate actions layer with the following code:

stop();

Replay.addEventListener(MouseEvent.CLICK, replayMovie);
function replayMovie(evt)
{
gotoAndPlay("Scene 2",1);
}

I'm a beginner in Flash and have been following instructions off the net but I can't get it to Replay the movie when the button is clicked, it does nothing

any help will be appreciated. Untitled-1-01.jpg

TOPICS
ActionScript

Views

521
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
Engaged ,
Jul 09, 2010 Jul 09, 2010

Copy link to clipboard

Copied

Hi,

I would not reply on the scene naming thingy if I were you. IN the pat I have had the very same problem and found that using

_root.gotoAndPlay(frameNumberHere); works a lot better.

ALSO

if your scene 1 has 10 frames in it and your want to gotoAndPLat the 1st frame of your second scene then use:

var number_of_Frames_in_1st_scene = 10

var frame_I_want_to_go_to_and_play_in_my_second_scene_is = 1

var frameNumber = number_of_Frames_in_1st_scene + frame_I_want_to_go_to_and_play_in_my_second_scene_is;

_root.gotoAndPlay(frameNumber);

dont forget the _root.

Votes

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
Guest
Jul 09, 2010 Jul 09, 2010

Copy link to clipboard

Copied

LATEST

Thanks DazFaz but that didn't work either, it gets to the end of the movie and stops with the button that does nothing. I've been all over the net and tried everything but nothing works, don't know waht it could be, I mean it's a simple enough code and I've watched tuts on youtube but still won't work. Any chance I could send the .fla file to someone and see if we can figure this out? I've spent hours upon hours on it and it's for a paying client which we've already lost all profit on because of this.

Votes

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