IDE :: Play Video On Exit Frame?
Mar 29, 2010How can I play a play a different video when exiting a frame?
View 1 RepliesHow can I play a play a different video when exiting a frame?
View 1 RepliesI'm using Flash CS4, and all the actionscript so far has been Actionscript 3. I have some videos in my project -- this is being exported as an exe for cd distribution, rather than a website thing. So each video is wrapped inside a movie clip, which is wrapped inside another movie clip that deals with playing/pausing it, which is wrapped inside another movie clip that gives scrollbox functionality, which is placed on the stage. On the main timeline is a keyframe every frame, each of which has a stop() action, so that each frame is essentially a different "page" and you can navigate between these with menu buttons which call gotoAndStop().
The problem is, if the video is playing when you click a button to navigate to another frame, it continues playing even though it's no longer on the screen. You can hear the audio in the background. In addition to this, if you navigate to a frame four frames ahead, and each of the frames in between has a video, all those videos will start playing in the background as well.
I want to make sure that when you are on a particular frame the only video which will play is the video on that frame. If there is no video on that frame, no video should play. I was hoping that I could just catch the moment when you move away from the frame and call stop() on the video there, but I can't seem to catch that point. The FRAME_EXIT event seems to catch the end of the render loop or something so that it happens every time it draws the frame, rather than when you actually leave the frame and move to another one. In addition, I'm not sure catching the point where you move past a frame would help the problem with videos from in-between frames being started, as those frames are never entered so presumably never exited either.
I'm working on a Flash file here and am having a bit of trouble getting it to do what I'd like. Basically, the file has 3 sections:1) The main content and a Play button (I've got this made and working)2) The video itself that plays when you click the play button (I've also go this taken care of)3) After the video plays, I need to to go to another frame or scene that is different from the first.Is there a way to do this? I've been Googling for a while now but I keep coming up empty.
View 3 Replieshow to have a movie play, then have the program go to the next frame? For example, start the .swf, have it play a movie or 2, then go to the main menu.
I know how to import video, I just have no clue how to code it to play the video, then go to the next frame. I'm sure there's a tutorial for it somewhere, but I haven't had much luck finding it.
main.swf has a button that when clicked activated loadMovieNum 1.swf on top of main. I need a button on 1.swf to unloadMovie back to main (works) but when the main.swf is loaded I need it to go to a specific frame. I tried this on the button in swf 1 and the first part works but how can I get the videoindex.swf 0 to play a frame?
on (release) {loadMovie("videoindex.swf",0);}
on (release) {
gotoAndPlay("spaces");
}
My video continues to play when I click another button, I have tried using soundMix, but that cuts off all the sound to my other videos. Iam new and have been trying to serach for this problem for over 2+ weeks.
View 1 RepliesI have a 15 second video that's not embedded (it's sourced from an url). How can I get it to play the next frame when then video is finished?
View 2 Replieswhat i want to do is embed a video into a flash time lime, then once it is one the time line use frame labels to play different sections of the video.everything i have tried up to now just plays the video from the beginning.
i have used a stop at the beginning on a blank key frame but i dont want it to play the video from the beginning i need it start playing from about half way in.the first half of the video is being used on a different section.
how to get a child removed from the screen when exiting a frame (my homepage).
Help...
I have a Flash GUI...I need to produce a product for delivery on CD/DVD and one of the requirements is for the application to "resume" from the spot where the user quit the application.The fact is, I found a way to do it and it was working perfectly...but once I edited the FLA and republished, the SO only resumed up to a certain point...and the only thing I added to the file was AS to disable the primary navigation buttons at certain locations.[code]
View 16 Repliesaudio of a movie playing when I exit the frame - it's probably something simple that is yet evading me ...
The FLV works just fine, auto plays when entering the frame and uses a preset skin. The frame it's playing on has AS code stop(); on it.
Here is what I would like to do: I have some buttons, then 2 movie clips named container and container2. When I click on a button, an external SWF is loaded into container. I have it working so that when another button is clicked, it plays the exit animation of the current SWF, then loads the new one. Here is the code that I used for that: on a button:
Code:
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "who";
[Code].....
What I would like to do, is have a button in who.swf, that will load another external swf into container2, while leaving who.swf in place. Then, when one of the main buttons is clicked, I would like it to play the exit animation of the swf that is currently in container2, then play the exit animation of the swf that is currently in container, then load the new swf into container.
I have a video in a frame that corresponds with the label "eight". i have a button on the timeline with the following code. i've tried it both gotoAndStop and gotoAndPlay and it doesn't work.
on (press) {
gotoAndStop(eight);
}
When a button is clicked on the flash site im creating, which links to the next page, ie about/contact/portfolio etc... I need the current frame movieclip to fadeout, then advance to the next page. This is my code so far
[Code]...
I have an external Gallery that is called within my fla file. My problem is that every time I try to go to my home page or any other page for that matter the gallery doesn't go away. I can access my other pages "frames" and everything works fine, but my gallery blocks some of the page. How can I exit out of my gallery when I go to another page??
View 28 RepliesI am using the video component player and it is working fine using this code:
Code:
video.setMedia("elements/flv/episode_1.flv", "FLV");
The problem is, if someone is playing the video and goes to another part of the flash movie, the video keeps playing or loading in the background. The video image doesn't show, but i can hear the audio or see in the browser that it is still loading.
How can i kill the video from loading once the playhead moves from the frame that the video player is on (it is sitting on a single frame)?
I have a project that has multiple swf files for each of the sections. One of my sections has some videos in it. When I start playing a video and click on a button for the main menu (button code is on the main menu page with addChild to place them on the additional swf pages) the video keeps playing on the new page. I don't want to hear the video on the different pages. I was wandering if there is a way to stop the video player when I exit the swf? Or are there any other ways to get the video to stop when I go to a different section of my project.
View 9 RepliesI would like to have a sound file play when the playhead reaches a frame and then stop when the playhead moves to another frame.
This is the code I currrently have in the frame to play my sound (sound_1) - works fine, no problems.[code]...
I'm building a website using actionscript 3 with an animated intro and it has 8 movie clip buttons called Tab1, Tab2,etc. which when clicked navigate to different URL's. I would like play an exit animation (frame 300) on my main time line when a button is click and then goto the url page.
View 7 RepliesI have a button that looks like this: [URL] so when you rollover, it plays an animation, and when you rollout, it plays the exit animation. And if you rollout before the the enter animation is over, it will jump straight to the exit animation. the swf right there works perfectly, exactly how i want it, so i popped it in as2 and it will not function, so I decided to come here, I need to know how to do this is as3. how can i make this work in cs3?
View 3 RepliesI have added 4 different sound files to 4 different frames that are navigated via buttons. The problem i have is that if you navigate to another frame while one sound file is still playing the sound file continues over the next frame and the sounds clash. What i need to do is have the sound files stop once the frame is exited so is there a simple way to do this in AS3...
View 3 Repliesi am building a flash web site using the goto and stop method, with each "page" of the website being a different frame. on one page i have a music player, and it all works fine, and if you press stop before leaving that "page" or frame it all works well.the problem i've run into is if you go to another frame while the music player is still playing the music continues playing and when you go back to the frame the music player is on and press stop it doesnt do anything and if you press play it will start playing the song again with both songs playing over eachother.how to stop the music from playing when you exit that frame. here's the code for the music player:
Code: Select all//Music Player
var musicReq:URLRequest;
var music:Sound = new Sound();[code]..............
i have just started to use flash and i am in the process of making a game but im stuck on putting actionscript into one part. i have a character and i want the game to go to the next level (next frame) when he hit the exit door. i know this might sound stupid but i have only just started.
View 1 RepliesI frequently see the usage of ENTER_FRAME and EXIT_FRAME event types in AS3 code. I can even use the first event type just blindly to get certain things done. But I want to clear my concepts on these very fundamental things. My qeries are as below:When do the above 2 event types take place - I mean what triggers them?Does ENTER_FRAME trigger at the rate of FPS? If a MovieClip spans over 48 frames and the FPS = 24 - does this mean the ENTER_FRAME will occur 48 times for the full life-span of the MovieClip?Regarding the EXIT_FRAME, I could not find any example or description yet.
View 2 RepliesThe audio continues to play no matter where I navigate on the site.
View 6 Repliestv.addEventListener(Event.EXIT_FRAME, movie);function movie(event:Event):void{stop("tv");
}
i have dragged a video player from another swf, when i goto the next page the video keeps playing, unless i press the pause button,
i want it to stop if i exit the current frame.
Is it possible to exit the browser ( firefox) automatically after a video has finished playing ? Through some extensions / scripts ?
I need this because I want to automate measuring of bandwidth used while a youtube video played in firefox.
I need to play preview video first, before starts play any other video. I am using jw player
View 1 RepliesI have my flash on multiple scenes, and would like to play an animation when clicking on the navigation button before switching to a different scene.
I'm halfway to accomplishing this.
Here is what i used
Code:
_root.gotoAndPlay("changepage1");
_root.onEnterFrame=function(){
if(this._currentframe=="changepage2"){
[Code]....
The above code is on a blank keyframe. Changepage1 is the start of the animation and Changepage2 is the end of the animation.
Upon clicking the navigation button it plays the above scenes.
However it doesn't change scenes to scene "Home2".
i have a movieclip on stage. it has 3 frames but is stopped with "stop():" so it only shows the first frame on mousedown i want it to play frame 2 for a duration of 1 frame then frame 3.
View 3 Replies