Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stop();
- //Code to get the built in classes for Tween and Ease
- import fl.transitions.Tween;
- import fl.transitions.easing.*;
- import fl.transitions.TweenEvent;
- import flash.events.MouseEvent;
- //Code to animate the pages in from right to left using the Tween class.
- var aboutTween:Tween = new Tween(about_mc,"x", Elastic.easeOut, 1008, 0, 3, true);
- //Listener for when to start video
- aboutTween.addEventListener(TweenEvent.MOTION_FINISH, startVideo);
- //Create function to start the video playback called startVideo
- function startVideo (vid:TweenEvent):void {
- //Insert trace to help with debugging
- trace ("start video");
- //Code to start playback
- about_mc.video1.play();
- }
- //Code to stop video when page changes
- //Listener for when to stop video
- mainmenu.addEventListener(MouseEvent.CLICK, pauseVideo);
- //Create function to stop the video playback
- function pauseVideo (vid:MouseEvent):void {
- //Trace for debugging
- trace ("stop video")
- //Code to pause playback
- about_mc.video1.pause();
- }
- //Make relevant buttons visible
- mainmenu.visible = true;
- about.visible = false;
- cc.visible = false;
- gallery.visible = false;
- videos.visible = false;
- cast.visible = false;
- characters.visible = false;
Add Comment
Please, Sign In to add comment