Help: Actionscript 3 and movie with scenes

Starhorsepax

macrumors member
Original poster
Jun 6, 2010
75
4
HI

Did this thing on the class PC with Flash CS3 and Actionscript 3. It works: to a point. The mini video works fine but the text goes kind of fast so I'm trying to do a pause button. Only the button is only working in the first scene.
It's supposed to be you move the cursor on the button it stops, and continues when it rolls off. I took it right off of an Adobe tv video.
Anyone know where I can find an answer? I'm not finding much about how to use actionscript 3 with scenes (except the belated advice not too!)

Really would like to get this. Thought it would be nice to stick it up on the class website so I can point to it when I try to get my counselor in job training to help me pay for adobe for my mac. :D (Kind of a 'see, look what I could do if I had it for myself and could get freelance jobs until I'm done school' thing.)
 

Ride9650

macrumors 6502
Jun 29, 2007
352
0
If I'm reading your post right, a video is supposed to play until you move your mouse over a button, and continue after the cursor is off the button correct?

I'm not sure how to integrate this with different scenes, but hopefully this can get you pointed on the right path

(mouseIsOver, mouseIsNotOver and button aren't required names, you can change these to whatever you want)

Code:
button.addEventListener(MouseEvent.MOUSE_OVER, mouseIsOver);
button.addEventListener(MouseEvent.MOUSE_OUT, mouseIsNotOver);

function mouseIsOver(e:MouseEvent){
      //code to play your video
}

function mouseIsNotOver(e:MouseEvent){
      //code to stop your video
}
This should go on whatever frame the video and button are on.
 

Groovetube

macrumors member
Jul 19, 2008
39
0
scenes = bad. Don't use them. They're mainly for animators etc.

If you can, ditch them. Use labels instead. That's your very best option.

But, make sure you put the actionscipt into the new scene as well, because it won't affect the button in scene 2 if you don't.

Also, if you want a handcursor, use
button.useHandCursor = true;
and
button.buttonMode = true;

HTH.
 

Starhorsepax

macrumors member
Original poster
Jun 6, 2010
75
4
Got it!

Thanks all. I got it.:)

I only did this as an experiment on learning flash and incorporating / experimenting with the different stuff. Not likely to use animation and scenes for the serious web stuff. (Although I might experiment for youtube or something! I'm an artist so I like animations.)
 

Similar threads

Register on MacRumors! This sidebar will go away, and you'll see fewer ads.