Copy link to clipboard
Copied
I am a beginner and using Flash CS6.
I have embedded a FLV movie to play when the swf/app starts. If I were to have say a menu screen after the movie plays, what's the correct way to do this. And this includes if you clicked the intro movie also before it ended on it's on accord?
If you can help, tell me like I am 5 years old lol.
thanks
this.addEventListener(MouseEvent.MOUSE_DOWN,downF);
function downF(e:MouseEvent):void{
this.gotoAndStop(frame name or number); // or gotoAndPlay
}
Copy link to clipboard
Copied
as3 or as2?
[moved from Adobe Creative Cloud to Adobe Animate CC - General]
Copy link to clipboard
Copied
as 3.0. I found the answer to stopping the movie part. I create a new layer. go to frame 1600(end of movie) and create a keyframe and add stop();.
Seems to work ok. I need to move onto the next scene at frame 1600 though. I believe I have to add an event listener and if you want to move to the next scene if screen is touched youI add a touch event. Any ideas of the as 3.0 code. ?
thanks
Copy link to clipboard
Copied
this.addEventListener(MouseEvent.MOUSE_DOWN,downF);
function downF(e:MouseEvent):void{
this.gotoAndStop(frame name or number); // or gotoAndPlay
}
Copy link to clipboard
Copied
I assume this is for a desktop web swf/app as you are using mouseEvent and not TouchEvent?
So my 1600 frame movie loads when the app loads. App is for Android mobile.
I need it so that if the screen is touched/pressed at any time during the movie playback it will load scene 2, or/and at the end of the movie also go to scene 2.
For example, at frame 1600 I could add the code,
gotoAndPlay(2); but this gives me errors as I think it need to be within a function, but how do I trigger that function without and event like a mouse press of finger touch.
Copy link to clipboard
Copied
did you try the code i suggested?
p.s. mousedown works well for touch devices
Copy link to clipboard
Copied
I tried your code and got no errors after compiling, however I tested it by putting it on frame 100(just for testing) but how would I use this code so that it is triggered throughout all 1600 frames.
So far I have added the FLV in layer 1 and scene 1. I have added a second layer in scene 1 called actions and have added a keyframe at frame 1600 with code stop(); This all worls fine and the FLV doesn't loop.
At the moment in scene 2 all I have is a image which will be the menu screen eventually.
So I need FLV --> Touch event up to 1600 frames --> Scene 2.
So which frame would I put your code on so that it is active throughout all 1600 frames?
I have searched alot but there doesn't seem to be too much info on flash etc.
thanks again.
Copy link to clipboard
Copied
put the code in frame 1.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now