views:

370

answers:

2

I have a button, "pb".

I have a movieclip, "pm".

I want the clip to play certain frames when I press the button.

I have a layer on top of every other layer, with only one frame. In the ActionScript for that frame, I have put:

stop();

pb.addEventListener(MouseEvent.CLICK, onMouseClick);

function onMouseClick(event:MouseEvent):void 
{
    trace("I've been clicked!");
    pm.gotoAndPlay(10);
}

When I click the button, the message comes up BUT THE MOVIE DOES NOT PLAY.

What have I done wrong? This should work. I've been looking online all day and this is what everyone says to do... I'm at a loss. Thanks.

A: 

well the code you have there is correct for what you want to do. I guess from what you have said I would do the following:

  1. check your pm MovieClip that it does not have a stop on the frames you are playing. If it has no scripts then I guess check that it actually has enough frames for what you are doing. Maybe copy that movieclip somewhere and just let it run through.

  2. check that you don't have any other code somewhere telling it to stop playing.

  3. create another MovieClip, with 2 frames, place a stop() only on the first frame, and play it after you try to play the pm. It should play, if it does not then you need to have a look at what you are doing.

  4. lastly just make sure you created a MovieClip and did not create a button and then changed the button to a MovieClip

Allan
A: 

Hi can some one please help me out......

I am using flash css3.

On my scene1 i have a movie clip named Dev1 and inside the Devi1 (movie clip) i have another movie clip is call Kev1 inside Kev1 (movie clip) i have a button.

What i want is when i click the button to jump to Devi (movie clip) frame 65 and play...

Can some one please help me doing this i have look around google but no luck.

thank you

keven