ActionScript 1/2 :: Stop Attached FLV Audio When Leaving Frame?

Mar 11, 2010

I have an embedded video object in a single frame. A script attaches an external FLV file which plays upon entering the frame. When I leave the frame to go to other parts of the movie, the music from the attached FLV continues. How can I stop the audio when I leave the frame?

View 3 Replies


Similar Posts:


ActionScript 3.0 :: Stop Flv When Leaving A Frame?

Oct 6, 2009

i want to stop a video from playing,when leaving a framei tried to use SoundMixer.stopAll(); but it only stops the sound, i think my video is still streaming in the background because im starting to notice performance problems when i go back and open the video againthe website gets very slow.

View 5 Replies

ActionScript 3.0 :: Stop FLV From Playing Upon Leaving Frame?

Apr 19, 2011

Maybe someone has some insite on this before I open an artery. I have a timeline, seperated into sections. The navigation targets frame labels. On one of those keyframes there is a flv. When you play that video and then navigate to another frame without stopping the video, it continues to play. I've tried giving it an instance name and adding a stop action to it that resides in the button functions so when it navigtaes to another frame it would stop. However, when  I click on any button and the movie is not currently playing, I  get a error message that reads TypeError: Error #1009: Cannot access a property or method of a null object reference. I assume it is looking for something that is not currently there. It has been suggested that I use the SoundMixer.stopAll() but that removes any background music currently playing.
 
Do I need some kind of conditional statement that detects if the flv is currently playing?
 
Can FLV be controlled with a simple instancename.stop() ?

View 3 Replies

ActionScript 3.0 :: Stop A Video From Playing Once Leaving The Frame

Aug 7, 2009

It is for a portfolio for school, in the case that you wanted to know. I have created a frame in the FLT thatis for videos. I have called a net connection to load a video locally when a custom button is CLICKed, and i have made a custom button to pause said video, and play again, using togglePause

My problem is, once the video is started (using play) and if the user navigates away from this video page, (which means they are a jerk/ass for not finishing my video) the audio will continue playing, as the video has been loaded and is not through executing. I want this net connection to end once navigating away from the page, if necessary. I have tried calling an EventListener(EXIT_FRAME) but errors upon outcome follow.

View 0 Replies

ActionScript 3.0 :: Make Video Stop Video When Leaving A Frame?

May 11, 2010

I know how to make a video (instanced as showreel) stop when clicking on a button that that navigates to another section/frame, since otherwise I would still listen to that video while not visible. The problem is when I'm in another frame that doesn't have that video, when clicking on the menu to go to whichever other frame, it looks for that it to stop if it's playing and it and doesn't find it, and so there's an error.
 
How can solve this? Maybe I should put an order saying something like if there exists a video in that frame instanced as sowreel, stop it, otherwise don't do anything as there is nothing to be stopped. Or assign the order to the frame (which is called motion), but I don't know how to do that, can someone help? The code I have is: 
 
import fl.video.VideoEvent;
function onClick(evt:MouseEvent):void {    if( showreel.playing ){        showreel.stop();}    gotoAndStop(evt.currentTarget.name);}
motion.addEventListener(MouseEvent.CLICK, onClick);web.addEventListener(MouseEvent.CLICK, onClick);logo.addEventListener(MouseEvent.CLICK, onClick);photo.addEventListener(MouseEvent.CLICK, onClick);

View 5 Replies

ActionScript 3.0 :: Flash - Stop Audio From The Last Frame When I Go To The Next Frame?

Jan 29, 2011

I'm working on a Flash CS5 file, with action script 3. I have a layer with all the audio for each frame. When I click the Next button, the audio from the last frame plays over the audio of the current frame. The only code I have in flash is:

stop()
btn2.addEventListener(MouseEvent.CLICK� forward);
function forward(event:MouseEvent) {[code].....

View 3 Replies

ActionScript 3.0 :: Stop Audio File On Frame Exit?

Nov 24, 2009

I 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 Replies

ActionScript 3.0 :: Playing Video - Unable To Stop Audio After Moving To The Next Frame?

May 3, 2011

I'm having the problem that my video, which sits in a movie clip, does not stop the audio after moving to the next frame, even though the video instance is removed. Here is the code from the main timeline:
 
import flash.events.MouseEvent;
next1_btn.addEventListener(MouseEvent.CLICK, ongoPage2);
function ongoPage2(Event:MouseEvent):void {[code]....

View 4 Replies

ActionScript 3.0 :: Listeners - Entering A Frame And Leaving A Frame To Call A Function?

Dec 14, 2010

OK, I am trying to get the following functions to load and unload the video to my main timeline when I go in and out of a frame. I tried on Enter_FRAME but it is now working properly and load many instances.
 
What are the listeners I need to do to call the functions of oCoach when enetering a frame and fclickCV when leaving a frame?
 
[code]...

View 3 Replies

Professional :: Stop Video After Leaving Page?

Jan 8, 2010

i want to stop my video once i click onto another page
 
but the video still plays in the background??

View 4 Replies

Hide Carosel After Leaving Frame?

Jun 25, 2009

From my flash "home" frames, I have 4 buttons that take the user to different places on the timeline. One frame on the timeline includes a carosel of pictures that rotate and looks nice. I downloaded the carosel actionscript and xml documents online, I did not build them myself. Now, when I hit the "home" button to get back to the home frame, the carosel still lingers around. I would like to know how to hide it, or make it not come back at all when coming back to my "home" frame.

Here is my actionscript inserted in the frame:

import mx.utils.Delegate;var numOfItems:Number;var radiusX:Number = 1000;var radiusY:Number = 30;var centerX:Number = Stage.width / 2;var centerY:Number = Stage.height / 2;var speed:Number = 0.9;var perspective:Number = 130;var home:MovieClip = this;var tooltip:MovieClip =

[Code]....

View 2 Replies

ActionScript 1/2 :: Stop Cursor Leaving The Flash Stage Area In Browser?

May 22, 2009

I need to stop my cursor from moving on certain points on the stage. I'm using a magnifying glass effect but in the browser this only show the glass up to the stage so I need to stop it moving past those points. You can see what I mean if you move the magnify glass to the very left or right here:
 
[URL]
 
this is the code I have for the magnify glass:
 
var moveGlass:Number; 
magnifyingGlass.onPress = function() {    moveGlass = setInterval(startGlass,1);};function startGlass() {    magnifyingGlass._x =

[Code]....

View 4 Replies

ActionScript 3.0 :: Stopping Videos When Leaving Frame?

Nov 24, 2009

I have created an instance of FLCPlayback named "chili_player" which, depending on which button is clicked will play a certain video. This all works great.

my videos are located within videos_mc and in frame 80 of my site. I have other movie_clips and frames set up for other pages.

I have tried the normal method of placing the following code on every other frame the user can view.

videos_mc.chili_player.stop();

but it does not work and I get the following error message.

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at index_fla::MainTimeline/frame1()

View 3 Replies

Flash :: Detect When Leaving A Frame In ActionsScript 3.0?

Nov 6, 2010

Is there an event listener to use to detect whenever I am leaving a particular frame on my timeline? If I am correct, Event.FRAME_EXIT only works on the newer versions of Flash. Is that correct? (I am working with CS3.)

View 1 Replies

Professional :: Removing Event Listeners On Leaving A Frame

Mar 15, 2012

I have l modded some code that I am really happy with, it makes buttons bounce around for the user to try to click on when entering a certain frame.. I notice tha the code adds eventlisteners ENTER_FRAME to make this work, when you leave that frame there are now problems with null objects becuase the listeners are still on but the objects are not there anymore..
 
Ok so attempted solution - I can use a currentLabel on the main timeline to check if the correct frame is reached then use a function if (label is x) put listeners on else take them off... works but then I have to have these objects hidden on the timeline  and then add visible=true/false to my framelabel listener.. This works but part of my functionality here is that these movieclips that move are buttons that the user clicks on and they explode and dissapear- but now they dont because I have a code that says on that frame they should be visible..
  
The only thing I can think of is to have a blank frame at the end of the explode and put a stop on it.  Then add a gotoAndPlay(1) into my frame label code.  Seems very ugly, you guys got a better way?  Can I remove eventlisteners on leaving a frame?  Is there a code like LEAVE_FRAME??

View 6 Replies

Flash :: Start And Stop Audio From The Middle Of Audio Track?

Apr 25, 2011

I have a single audio file, I'd like to avoid cutting it up.

I know I can use the sound class, mySound.play(150), to start at 150ms but haven't come across a way to stop the audio say after 500ms or at 650ms.

View 2 Replies

Professional :: Leaving A Frame Its Content Displays When Going To Earlier Frames?

Nov 28, 2011

Using CS 5.5, I am using a single scene with buttons that all appear on the first frame along with code snippet  AS also on the first frame that when clicked, takes the user to a different frame. Everything seems to work fine, except, after you go to frame 15 and click on one of the buttons that take you to one of the earlier frames, the text from frame 15 still displays on those earlier frames. The text on frame 15 is on a different layer and does not exist anywhere else until frame 15.

View 3 Replies

ActionScript 2.0 :: Make A Movie Clip Play When Leaving A Frame?

Jan 27, 2010

I have a series of buttons that when clicked go to certain frames which all display different content. I have a unique movie clip on each one of these frames that has an initial play in, followed by a looping animation (the character walks in, then loops waving or something of that nature), I would like the movie clip to have a play out animation (character walks off) when the user leaves that frame so that when they go to the next frame the new movie clip can play in (new character walks on screen). [code]...

View 0 Replies

Actionscript 3 :: Stop Timers When Leaving A "screen"

Apr 3, 2012

I have some timers running on a page that I am having trouble figuring out how to stop when I navigate away from that page, while the page is running.

The call is coming from a button on another movie clip, which is invoking a function on Main.as. The

function in Main.as does this:

public function goToIntro(){
removeChild(currentScreen);
intro = new Intro();

[Code].....

how to kill the timers from the removedHander function. I tried removing the event listeners but that causes other error messages. I tried doing a test if the listener is not null, then stopping it. That apparently never runs (I used trace statements to test it). I tried testing if the timer was .running and then stopping it, but that didnt work either.

View 1 Replies

ActionScript 2.0 :: File Attached Firing Non-stop

Mar 5, 2010

The file attached firing non-stop. I want to set a timer to control its firing.

View 1 Replies

ActionScript 2.0 :: CS3 - Can't Get The Second Frame Of The Attached Movie And Play

Aug 6, 2009

I am using a button (btn1) to attach a movie (hole01). The movie attaches fine but I can't seem to get it to go to the second frame of the attached movie and play.

[Code]...

View 2 Replies

ActionScript 2.0 :: Targetting Attached Movieclips / Play A Certain Frame

Oct 14, 2007

I did a search on the forums and found 2 threads that were relevant but didn't quite get what i wanted out of them.I've loaded a movieclip using attachMovie(); and ive put it into an empty movie clip (as you would with external MC's)My question is how i will go about targetting the loaded movieclip and having it play a certain frame.[code]

View 4 Replies

ActionScript 2.0 :: Movie Clip With A Stop Command On Frame 1 And A Stop Command On Frame 20

Jul 21, 2007

I have a movie clip with a stop command on frame 1 and a stop command on frame 20.I'm trying to have two separate buttons that tell the MC (onRollOver) to play forward or to play backwards.

The actionscript on button #1-
PHP Code:
on(rollOver){    gotoAndPlay(_currentframe +1);} 
The actionscript on button #2-

[Code]...

View 1 Replies

ActionScript 3.0 :: Flash - Assigning Frame Events To Dynamically Attached MCs?

Aug 12, 2011

I'd been working on a side-scrolling shooter game in AS2 for a while and it was going great, but for whatever reason, it scrolls all choppy and the framerate is inconsistent on faster machines. I would have expected the opposite, but it is what is is, I guess. So I'm trying to finally learn AS3, and I found some tutorials that got me started towards remaking what I had, but now I'm stuck.I'm trying to make one of those rotating cannons that shoots projectiles towards the mouse cursor. I have the rotation part working, but I'm having trouble with attaching the projectiles to the stage with enterFrame actions on them.I feel like I'm pretty close to a solution, but I don't understand where to put the functions to move the clips to make them work properly. In AS2, I just put something like this on the cannon clip:

Code:
bullet = _root.attachMovie("bullet", "bullet"+_root.bullets, _root.getNextHighestDepth(), {_x:nozzledot.pointx, _y:nozzledot.pointy});

[code].....

View 1 Replies

ActionScript 2.0 :: Getting A Movie Clip To Change It's Alpha When It Hits A Certain Frame In An Attached MC?

May 27, 2005

I'm trying to get in the habit of using AS in the first frame on the main timeline as much as possible. but sometimes i hit a snag. like getting a movie clip to change it's alpha when it hits a certain frame in an attached MC.

View 8 Replies

Audio Won't Stop When Previewing?

Jun 24, 2009

So, I have a 3 minute mp3 file on my stage; the idea is to provide background music for my animation. So I go to preview the animation, and everything works fine, until I stop the preview. Then the audio keeps playing on and on. If I hit the preview again, obviously the music starts up again, and then won't stop, in a vicious circle of death that has me fleeing from the room.
 
To make it clear, I'm not previewing the audio file, I'm previewing the entire animation with the audio file on the stage. 

View 1 Replies

ActionScript 3.0 :: If Click The The Mc1 On First Frame  The Movie Clip Should Goto And Stop At Tenth Frame?

Aug 18, 2011

i created a two layer in time line in one layer there is a movieclip called mc1. In the same layer in 15th frame i have another movie clip mc2. Inside the movieclip mc2 i created another movie clip at frame10 now if i clik the the mc1 on first frame  The movie clip should goto and stop at tenth frame

View 4 Replies

ActionScript 3.0 :: Programming - Stop In Each Frame And Run The Animation Of The Movie Clip On That Frame

Jun 30, 2011

i'm very new at flash and finally ended all the work i wanted to do here. now i just need to had the actions so it will run properly. basically i just need it to stop in each frame and run the animation of the movie clip on that frame. if it's i can put the project here so you can see what and were i need to had the actions.

View 1 Replies

Actionscript 3 :: Stop Movie (from Current Frame) Playing When I Click On Next Frame?

Apr 8, 2010

I have four movie clips (.f4v) in 4 frames in a movie with watch buttons.. This movie has them been imported into a main movie container that has next and previous buttons. However if i play a movie then hit next frame, the movie continues to play in the background. The code below shows one of the actionscripts for a movie clip and then the main actionscript in the main movie.[code]...

View 1 Replies

Flash :: RemoveChild Frame Animated MovieClip, Will Stop Frame Running?

Sep 14, 2010

If I removeChild frame animated Movieclip, will it automatically stop running the frames inside it? Actually without calling mc.stop();

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved