ActionScript 3.0 :: Unload SWF - Video Keeps Playing Forever?

Aug 21, 2009

I'm developing a Flash application that uses several SWF-files. I have one main SWF and others are loaded into this one dynamically. One of the SWF's I'm loading is showing a video clip. This SWF contains code to load and display an FLV-file immediately after it has been loaded into the main SWF. My problem is that I can't find a way to unload this SWF. Once I've loaded it and it starts to play the video, the video keeps playing forever. Even if I remove it from the displaylist it keeps playing. I can't see it, but I hear the sound continuing.

I've recreated this problem in a small project (see code below). In this project I have a simple button that should toggle whether the video is shown or not. [URL] works as mentioned before: it automatically starts playing a .flv as soon as it is loaded. When I run this I get the following as I click the button:

Click 1: Video shows up and starts to play.
Click 2: Video is hidden, but it's still playing (I can hear the sound).
Click 3: Video is loaded AGAIN. Now I can see the video, but I hear TWO soundtracks!

[Code].....

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Swf Still Playing After Unload ?

Nov 20, 2010

I have noticed once I unload a certain SWF, which has a video embedded into it. The SWF is removed from the stage, but I can still hear the audio from the video playing. So I presume I am actually not fully removing the SWF from the stage.

Here is a link to my site cnrdesign(dot)net

I presume its happening to all my loaded swfs, but if you click on the "work" button, and then the "Interactive" button, and then click on the first thumnail, that opens the SWF with the "MoodApp" video. If you wait for that to load and start playing and then close that window, you still hear the video playing.

Im not 100% but I think this is the code used to remove my loader.

Code:
function tweenFinished (e:TweenEvent):void{
var my_loader:Loader = Loader (e.target.obj);
my_loader.unload();

[Code]....

View 2 Replies

ActionScript 3.0 :: Unload Swf But Still Playing Sound?

Feb 25, 2011

I have 10 swf's, i m displaying 1 swf for each question displaying 1 swf, but problem is i unload the swf and load the next question clip but old one is still playing sound..

View 1 Replies

ActionScript 3.0 :: Flv Continues Playing After Unload?

May 5, 2011

I have an air project which every seconds reads a txt file. Depending on the content of this file it loads an external swf file (the contents of the file is changed from an external program periodically)Every external swf file gots a flvplayback2.5 inside which loads and play a flv video (everthing is done locally).

The problem comes when the contents of the txt file changes and I have to unload the previous swf and load the new one.Despite the new swf loades plays fine I can still hear the audio of the previous swf playing in background.For the project I used only one Loader in which i load the external swf files. Before loading another swf inside it, I call the Loader.unload() but no luck.I thought that this method would remove also the loaded object but the Adobe reference about the unload() method says:

"Removes a child of this Loader object that was loaded by using the load() method.The property of the associated LoaderInfo object is reset to null.The child is not necessarily destroyed because other objects might have references to it; however,it is no longer a child of the Loader object.As a best practice, before you unload a child SWF file, you should explicitly close any streams in the child SWF file's objects, such as LocalConnection,NetConnection,NetStream, and Sound objects.Otherwise,audio in the child SWF file might continue to play,even though the child SWF file was unloaded.To close streams in the child SWF file,add an event listener to the child that listens for the unload event.When the parent callsLoader.unload(), the unload event is dispatched to the child."
 
I don't know how interal structure of the external swf is,beacause the customer gave to me only the compiled swf (I guess there's not a lot inside that swf, i think only the flvplayback control, but if i don't know the name of the flvplayback I can't invoke any stop method on it).So, do You know any method to brutally unload the loaded swf, by destroying it,no matter where it hides itself in the dark and misterious jungle of the Flash Player?

View 5 Replies

ActionScript 1/2 :: Unload A FLV When Finished Playing?

Jul 4, 2011

I have an urgent issue, I have created an swf file that loads the external FLV, however when finished playing the video stops on the final frame of the FLV.What I want is for the video to unload itself.

if(_root.video1 == undefined){
vStream = "15_IT_CURVES_BECKS_700x400.flv";
}else{

[code]....

View 5 Replies

ActionScript 2.0 :: How To Get Movie Unload Automatically When Playing Done

Jun 22, 2004

I have used the following script to load a movie
but.onPress = function () {
_root.createEmptyMovieClip("container", 1);
loadMovie("scene_1.swf", "container");
container._x = 150 ;
container._y = 20 ;
}
This works great, but now when the movie scene_1.swf is finished playing I would like the movie to unload automatically and return to the mainstage and continue the scene on the mainstage.

View 5 Replies

ActionScript 2.0 :: Movie Unload Automatically When It Is Done Playing?

Jun 22, 2004

I have used the following script to load a movie

but.onPress = function () {
_root.createEmptyMovieClip("container", 1);
loadMovie("scene_1.swf", "container");

[code]....

View 5 Replies

ActionScript 3.0 :: VIDEO Stops Playing, Continue Playing Flash Movie?

Aug 7, 2009

I am loading an external SWF file into my main timeline. The external SWF file contains an FLV video. At a certain point in my main timeline, the SWF file loads and plays the video. Is there a way to say...

If the VIDEO (FLV) is done playing, gotoAndPlay(X)?

View 4 Replies

Professional :: Unload Swf After Done Playing And Return To Initial Frame In Containing Swf

Nov 18, 2010

I have a Flash animation that loads a quick animation and then on a button click loads and external swf while at the same time moves the playhead on the timeline to frame 2 so that it has a blank stage to play on. The external swf then loads and plays. At the end of the external swf's animation I would like it to unload and then return to frame one of the containing movie. I am assuming that on the last frame of the external swf I should be putting some actionscript that will unload the movie and then talk to the initial containing flash telling it to return to frame 1.
 
The main swf button that loads the external swf is using a code snippet from the AS3 CS5 library and looks like this...

[Code]....

It is also using gotoAndStop(2); for the same button.
 
So to unload the external swf and return would I use something like... this.unload(gotoAndStop(1));

View 3 Replies

ActionScript 2.0 :: Externally Loaded Flv-movie To Unload Itself When It Is Done Playing

Aug 10, 2009

I want my externally loaded flv-movie to unload itself when it is done playing. I read something about cue-Points but didn't find anything useful.

View 3 Replies

Professional :: Playing An External Video File And Upon Video Being Played, Move Onto Next Frame?

Dec 16, 2011

I suppose the title says it all.  I can load an external video file (FLV) and I can have it play.  I also have the custom buttons made to control the clip.  The only thing I have left to do is to have the main timeline move onto frame 2 once the external video reaches its end.  I am using actionscript 3 and flash cs 5.5. 

View 7 Replies

ActionScript 2.0 :: Preloaded Video Already Starts Playing While Preloading (at About 30%), But Without Showing The Video?

May 2, 2005

I've been using the "Reusable Preloader Using MovieClipLoader" from the tutorial section of this site.The only difference is that i don't use'm for preloading jpg. I load external swf files containing video. Everything works fine so far. The only problem is that the preloaded video already starts playing while preloading (at about 30%), but without showing the video.This is the code i have so far:

Code:
bar._visible = false;
border._visible = false;
this.createEmptyMovieClip("container", "100");[code].....

View 6 Replies

ActionScript 3.0 :: Multi Video Player - Audio From The Last Video Remains Playing Even When Prompted To Stop??

Jun 2, 2010

I built a timeline based player with 2 menus and many videos that you can play.The buttons move the timeline to a frame label and the video plays. The back button has a stop function built in it so the video stops playing when its hit.It plays wonderfully locally but once on a server after a few clicks it boggs down and sometimes the audio from the last video remains playing even when prompted to stop. I was pointed to use the add and remove child functions to prevent this but being very new to Flash and 100% self taught i have zero idea on how to do this. The link to the player is[url]....Even if its a link to a tutorial or something.

View 3 Replies

Actionscript 2.0 :: How To Detect When Video Finished Playing To Play Next Video

May 31, 2010

How can I detect when a video has finished playing a.k.a stopped playing, so I can tell flash to play the next video in an array?

This is my code:

Code: Select allvar x:XML = new XML();
x.ignoreWhite = true;
var urls:Array = new Array();

[code]....

View 1 Replies

Actionscript 2.0 :: Detect When Video Finished Playing, To Play Next Video?

Aug 17, 2009

How can I detect when a video has finished playing a.k.a stopped playing, so I can tell flash to play the next video in an array?

This is my code:

Code: Select allvar x:XML = new XML();
x.ignoreWhite = true;
var urls:Array = new Array();
var desc:Array = new Array();

[Code]....

View 1 Replies

ActionScript 3.0 :: Video Buttons Not Work Unless Video Playing

Jan 20, 2010

I have a vido page. Once I get to that page I can't navigate anywhere else unless I click the video thumbnail button and as long as the video is playing the buttons are active. I can I change this so the I don't have to click a video thumbnail button to navigate out of that page.

Code:
one.addEventListener(MouseEvent.CLICK, vid1);
two.addEventListener(MouseEvent.CLICK. vid2);
function vid1 (e:Event):void {
vidPlayer.source = "vid1.flv";
} function vid2 (e:Event):void {
[Code] .....

View 15 Replies

ActionScript 2.0 :: Put Together A Class For Playing Video Using The Video Object?

Aug 23, 2008

I am trying to put together a class for playing video using the Video object. So far, I have only been successful in getting the Video object to fully work when not using a class setup. In the documentation, I have read that to use the Video object you have to actually drag/create the video object onto the stage. So, in my next attempt, I created the video object onto the stage within a MovieClip but still trying to use a class/linkage setup with the Video inside inside of a MovieClip container. No luck there either. Here is the basic AS2 script that is linked to a MovieClip that contains the Video object ("video" instance) within it.

Code:
class VideoTest {
private var nc:NetConnection;
private var ns:NetStream;

[code].....

I am getting the following error with this script.

Code:
Line 14: There is no property with the name 'video'.
Line 15: There is no method with the name 'video'.

View 3 Replies

ActionScript 3.0 :: Loaded Swf Tell The Parent Loader To Unload Itself After The Loaded Swf Finishes Playing?

Sep 23, 2010

I have a shell swf that is loading a swf. How do you have the loaded swf tell the parent loader to unload itself after the loaded swf finishes playing?

View 4 Replies

ActionScript 2.0 :: Can't Stop Imported YouTube Video, Even If Unload The Movie Clip Containing It

Jan 6, 2010

I am importing a youtube video to a new movie clip using this script:

Code:
function containYoutube(youtubevar, depthLevel) {
this.createEmptyMovieClip("youtubecontainer",depthLevel);
this.youtubecontainer.loadMovie("http://www.youtube.com/v/"+youtubevar);

[Code].....

I need to be able to unload it if the user jumps to another part of the timeline. I have tried to just unload the movieclip, but it still seems that youtube is streaming data to the swf. If I do it locally, it crashes the application. If I put it on the server, it makes it clear that youtube is still loading even though the movie clip has been unloaded.

View 5 Replies

Java :: Youtube Keep Flash Video Playing / When Go To Users Profile Page From Video Page?

Aug 31, 2011

In the cosmicpanda update for youtube, you can go from a video page to the video creators profile page while your video is still playing in flash. Does anyone how Youtube accomplishes this? I would like to know if it's possible to keep the flash state of a site constant while moving from page to page on a site.It doesn't seem as if the flash is reloading, so I don't think that they are just saving cookies for the current video time and starting the video at that point when they refresh.I would assume that they're using ajax, but the application of this feature is really clean. The URL gets correctly changed to the users' profile page's URL. The back button still works as it should. (I can press back and forward between video page and user profile page and the video continues going clean and never drops.)

View 2 Replies

Professional :: Make Buttons Be Gone Forever?

Feb 21, 2011

Just starting out with Flash and have run into a problem. I have several scenes with buttons that can be pressed once and then they disappear using: myBtn1.onRelease = function(){ this._visible=false} But when I go back to the scene the buttons reappear. How can I make my buttons be gone forever?

View 1 Replies

Flash :: Delete A Movieclip Forever?

Jul 13, 2010

I create a mc and then i make an addChild of a sprite.[code]...

if i want to delete from everywhere and forever mcSwap1, what can i do?[code]...

View 2 Replies

ActionScript 3.0 :: Timer Not Looping Forever?

Oct 27, 2009

I'm using a Timer object to move some clouds across the top of a site I'm developing, and I'd like it to loop forever. Unfortunately, I'm getting pretty intermittent behavior. Sometimes the timer stops after a few seconds, whilte other times it keeps looping like it should. It seems to work best in IE 6, some of the time in FF 3.5, and almost never in Google Chrome.I'm doing the timer based on the positions of the clouds. I have two sets of clouds, and here's the related code:

Code:
var globalTweenCloudA:Tween;
var globalTweenCloudB:Tween;
var cloudTimer:Timer = new Timer(1000, 0);

[code]....

View 4 Replies

ActionScript 3.0 :: Set Streaming Sound To Off Forever?

Apr 18, 2011

I have few movieclip play one after another. For each movieclip, i put the streaming sound inside, and there is a button to turn off sound. I created this coding to turn off the streaming sound and it worked well.

SoundMixer.stopAll(); But, the problem is the new streaming sound will play again when it hit the frame that contain new streaming sound. How to overcome this problem? IS using EnterFrame event the only way to turn off the streaming sound forever??

View 3 Replies

ActionScript 2.0 :: FLV Player Loading Forever?

Apr 27, 2011

I've added a _root....flvplayback.load("whatever video I want to load.flv"); to different buttons so that I can dynamically load different videos into a single flv player.Thing is, it works intermittently, and most of the time, after having loaded one video via this method, the next video will load a preview Image but will just load forever, and then I can't play any other videos until I restart the swf.

View 2 Replies

ActionScript 2.0 :: Way To Mute Music Forever

Dec 1, 2011

I got flash player, integrated in website.When I go to my site, backround music start to play automatically But if I stop the music and go to other page of my site, music starts again.[code]...

View 4 Replies

.FLA Takes Forever To Save / Load?

Mar 30, 2010

I'm having a brutal time with a FLA. The wait time to open this thing is ridiculous, and alot of the time the program will just become nonresponsive. Its only this one specific file, as others open fine. It also has nothing to do with the hardware on my system, as we've tried the file on a variety of machines.The FLA itself contains very little bitmap art, most is vector. It's about 16mbs, but publishes down to a SWF thats about 300kb. There were some complex vector elements which were removed in a fruitless attempt to get this thing to move faster. Trying to "save as.." results in flash writing to a file extremely slowly. The resulting file will progress in size from 2 - 4 mb with about 10 minutes wait time in between. Its becoming nearly impossible for us to work in the file. how I could debug Flash itself to find out whats going wrong on load/save?

View 3 Replies

ActionScript 3.0 :: Video Playback - 60 Seconds Video To Start Playing After 40 Seconds Have Been Downloaded

Jul 19, 2010

1) I want a 60 seconds video to start playing after 40 seconds have been downloaded - to do that I set the NetStream.bufferTime to 40 seconds and retrieve "NetStream.Buffer.Full" event causing the video to really start playing. This step is OK.

2) However, the "NetStream.Buffer.Full" causes data to stop downloading. So the remainder of the video begins to download no sooner than after the 40 seconds have been played. This step is my issue. Can anyone tell me how to avoid this unintended effect? (i.e. playing a video and downloading data at the same time?)

View 2 Replies

IDE :: Datagrid Destroys All Keypress Codes Forever

Feb 16, 2009

I made a huge swf video game that involved buttons with [code]I put a data grid on the stage on one frame.It never even enters on stage and this still happens.Make a button and plop a data grid down. publish, delete, publish again.I've done some research and found that I am not the first person this has happened to. My file is basically destroyed and I'm on deadline.

View 4 Replies

ActionScript 3.0 :: Photos To Display Randomly Forever?

Jul 1, 2009

I'm doing a photo slideshow and I have 4 photos. I have them displaying randomly with TweenLite, however I have 2 more things I'd like to do with it but I really don't know how to do them. I'd like for the photos to display randomly forever, as if the script would never end. Also, I'm curious as to why only 3 of the 4 photos are displayed when I run the swf.

Here is my script thus far:

Code:
import gs.TweenLite;
import gs.easing.*;
var photoNums:Array = new Array(photo_1,photo_2,photo_3,photo_4);

[Code].....

View 1 Replies







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