ActionScript 3.0 :: Cannot Stop An External MC

Sep 24, 2010

I have a swf, it has code to load an external .swf, it works. As long as I load external .swf files, which are simple and have no AS3 in them, I can immediately stop them from a function upon event INIT.

The .swf's that I want to load, and immediately stop, have complex AS3 in them. They have stream synced audio. They work perfectly fine on their own, but I cannot control them with a simple stop() to the MC container which holds it, yes, even though the container is casted as a MC.[code]...

View 6 Replies


Similar Posts:


ActionScript 3.0 :: Stop .mp3 And .flv In External Swfs When Loading A New External Swf?

Apr 10, 2009

Specifically, I am building a flash page that loads external swf files and inside some of the external swf  files, I would like to add audio and flash video (flv) streaming from the Flaash Media Server. In some of the external swf files, (using a FLVPlayback component) when you press a button on the main timeline to unload the current playing swf the audio/video continues to play after loading the new external swf file.So I believe that my approach is all wrong and I should be working to dynamically load the .mp3 and.flvs in the external swf ... my questiion is how to unload those assets when loading the new external swf

View 1 Replies

ActionScript 3.0 :: Stop External Sound In External SWF

Jul 19, 2010

I am working on controls for an external swf. The external swf loads an external sound file. The structure at the moment is extswf.swf contains mcSound which loads soundfile.mp3. extswf.swf automatically starts playing when invoked. movieController contains the icons for the play/pause buttons. This is assigned CntlClass. CntlClass loads extswf.swf and controls the play and pause buttons.

So far, the play and pause buttons stop and start and stop the movie but not the sound. I know I need to access the sound channel from the external swf and use the sound transform to change the volume. How to access that channel is unknown. The examples I find have imbedded sound files. Also, the examples seem to use the main class for the external swf. My external swf doesn't have a class file, so I have no idea what the main class would be.

View 5 Replies

Stop External SWF From Playing?

Jun 8, 2009

Ive got a project with a fairly complex arrangement of menus and a narrated tutorial of sorts that is large (in terms of Mb) compared to the menus themselves. Since the tutorial is likely to be played only once, if at all, I don't want to load the asset unless needed. To do this I'm using the following code to load an external swf (the tutorial) and attach it to an mc container (mc_launch). A loader bar will be added later but for now it works, except: if the user navigates away from the tutorial (jumps to another frame in the menu timeline) the audio of the child attached to the mc_launch continues to play even though the instance of the mc_launch is no longer on stage. Shouldn't all the child objects of the container go away once the instance of the container is gone? If not, do I specifically have to execute a mc_launch.removeChild(loader) before navigating away from the instance of mc_launch?[code]...

View 5 Replies

ActionScript 3.0 :: How To Stop External SWF From Playing

May 25, 2010

I am having a problem stopping external swf from playing. I am currently using FlashCS4 and publishing to Flash Player 10. I would really like to use the code
"loader.unloadAndStop();"
to stop the swf. I tried using it but I keep getting the following error:
1061: Call to a possibly undefined method unloadAndstop through a reference with static type flash.display:Loader.loader.unloadAndstop();

I read somewhere that since the swf files were published in Captivate (also using Flash player 10) I have to load the swf into a flash movieclip first then try the loader.unloadAndStop code.
fscommand("allowscale","false");
fscommand("showmenu","false");
//import flash.display.MovieClip;
var Xpos:Number = 220;var Ypos:Number = 105;
[Code] .....

View 7 Replies

ActionScript 3.0 :: Stop External SWF From Loading?

Nov 2, 2010

I have a parent swf (parent.swf) which contains a loader (galleryLDR). The parent.swf has 2 buttons (button1 and button2) which will each load a separate swf (gallery1.swf or gallery2.swf) into the galleryLDR depending on which button you select.

If begin to load gallery1.swf, then decide to load gallery2.swf instead while gallery1.swf is still loading, the loading of gallery1.swf does not immediately terminate. Instead, gallery1.swf finishes loading, then the loader removes gallery1.swf and starts loading gallery2.swf. The code below is what I am using to attempt to cause the galleryLDR to immediately stop loading the any swf, then immediately load gallery2.swf.

how to immediately stop a loader from loading an external swf and the dynamic loading of images within the external swf? Below is what I've tried, but it doesn't work.

ActionScript Code:
if (galleryLDR != null){
galleryLDR.unloadAndStop();
}

[Code].....

View 0 Replies

ActionScript 3.0 :: Stop Sound In An External Swf?

Feb 1, 2009

I'm using external swf in a project, and I got one swf with startup audio play, I can't stop the sound to play when I load another swf via this code :

Code:
clearButtons();
TweenLite.to(m.target, 0.5, {tint:0xcc0000});
m.target.mouseEnabled = false;

[Code]....

View 4 Replies

ActionScript 2.0 :: How To Stop An External Loading

Jun 19, 2009

- I need to call loadSound() multiple times, to load different mp3s time to time, all of them in streaming. But as I call it more the once on the same instance the old mp3s keeps anyway loading.. how do I stop that?

In AS3 would be a simple .close(); ... but I can't really figure out how to do that in AS2.

Here some sample code:

// Works and Plays
_global.global_music = new Sound(this);
_global.global_music.loadSound('music/song1.mp3', true);

[Code].....

View 1 Replies

ActionScript 3.0 :: Stop External Video?

Jul 27, 2009

I'm having a major problem stopping video that is played in an external SWF. I've added the external SWF file via the addChild method. However, when I remove it the video's audio keeps playing. The only other solution if I can't figure it out is rebuilding the site in AS2... needless to say I really really want to try and avoid that

View 3 Replies

Stop Cursor Moving When External Swf Loads?

May 22, 2009

I am using a magnifying glass as part of my portfolio but when I click on another section and this loads an external swf above the main movie, because you can still see the main movie below, you can see the magify glass still moving as you move the cursor above?any ideas how I can stop the magnify glass moving while i am on the external swf above?

View 29 Replies

ActionScript 3.0 :: External Swf Unload & Stop Not Working?

Jun 14, 2011

I am trying to load & unload external swf that contain audio & video. Problem is that when I unload the swf's, the sound continues and I get overlapping sound. This is the code I am using:

var swf_loader:Loader = new Loader();
///unload previous swf
swf_loader.unloadAndStop();

[Code]....

View 5 Replies

Actionscript 3 :: FLASH - Stop An External Swf File?

Nov 4, 2011

I have this homepage,[URL] and two separate .swf files. I want the top .swf, the skip bar, to stop the bottom video. Is there anyway to do this? Note I have no way to edit the original video. I wouldn't mind using a javascript solution but would rather target it with AS3 if possible.

View 1 Replies

Actionscript 3 :: Stop External Loaded Youtube Swf?

Mar 1, 2012

I've use AS3 Youtube API to load youtube video into my flash file, let's call it youtube.swf

I've a main.swf and it loaded youtube.swf into it's stage.I try to unload this youtube.swf and load in another new.swf, but the sound of youtube still running.

I've insert the player.destroy() in the main.swf but it's not working too.

Any idea that I can destroy the youtube video with the script in main.swf?

View 1 Replies

ActionScript 3.0 :: External Swf Sounds Will Not Stop When Unloaded

Jun 23, 2009

Main swf loads an external swf which has a linear voice-over. User can watch/listen the whole 5 minute piece and then main movie carries on OR User can click to go on without viewing/listening to the whole show. Using removeChild, I can kill the visuals, but the voice track still goes on. i added a SoundMixer.stopAll line, and it does kill the current VO clip, but the next one will play in a few seconds. In the external swf, i'm using timers to delay slide advancement while the voice over plays. Seems like I came across some info that says I cannot fully unload like this with timers in my external swf.

Does this sound like a plausible source of the problem? If so, what is the best way to kill/nullify the timers in the external swf?

View 1 Replies

ActionScript 3.0 :: Stop A Timer In A External Swf On Unload?

Aug 2, 2009

I have a swf with a slideshow that runs on a timer that I'm loading into my main swf. When I remove the swf from the main swf the timer continues to load the images for the slideshow even though I can't see them on the screen. Does anybody have any suggestions on how to stop the timer once the swf has been unloaded?

View 5 Replies

ActionScript 3.0 :: Using A Button To Stop All Sounds From External SWF?

Nov 16, 2009

I did a search here and I am not sure my question was answered exactly, and even if it was, I wouldn't know it. My problem is going above and beyond what the project calls for. So here we go:I have an external swf that I have loading in when you press a "play" button. Now I need to have a button that stops the sound ONLY on the externally loading swf. I assume from what I have Googled to death that this is called "stopping all sounds". I have also come upon a sound mixer dealy-o, but I'm not sure that is what I am trying to do?????I keep reading about SoundMixer.stopAll (); but this looks to mute the sound all together with no use of a button. So I am ASSUMING that there is more code to add to this when it comes to using a button.

So, I would like to know the EXACT code I need to use to get it working...if at all possible. I named my sound button "btn3_btn" and my mute button "btn4_btn" for now. I want a separate button to turn the sound back on once it has been muted.

View 9 Replies

ActionScript 3.0 :: Stop Multiple External Playback Flv That Are In The Same Swf

Dec 10, 2009

I have 4 videos (external playback flv) that can be play pressing 4 buttons. I noticed that when I decided to jump to another video the first video will still continue to load anyway. What can I write to tell the first video or even the 3 other videos to stop loading when I click to see 1 in particular. I found a code that I thought was working but it doesn't... here it is;

btn_1.addEventListener(MouseEvent.CLICK,btn1);
function btn1(event){
if ((root as MovieClip).vids.vid2) {
(root as MovieClip).vids.vid2.stop();

[Code].....

View 0 Replies

ActionScript 3.0 :: Stop A Sound In Loaded External SWF?

Dec 29, 2009

I'm loading an external swf file that has some sounds in it (to the main swf). The swf contents never leave the movie but it does get pushed to the site when it's not in view.

The user can bring it back in view by pressing on a left/right button. So when it's not in view... or tweening out of view I need the sounds to stop.

Since the loaded swf is never unloaded, what should I look at to accomplish this... communicating with the loaded swf, etc?

View 5 Replies

ActionScript 2.0 :: Making External SWF To Stop When In Background

Feb 15, 2010

I have a main fla file, that preloads and loads three external SWF's just perfectly. The three SWF's are simple flip book animations. This is the site: [URL]. This is the only actionscript in the main.fla file.

Code:
var j = 0;
myarray = [];
cliparray = [];
createEmptyMovieClip("paper", -1);
_global.preloaderf = function(klip) {
[Code] .....

The problem is, that the first movie is really jumpy, the second is a little better and the third is the best. There's three buttons designated to each movie. My question is, why are the movies jumpy? I'm assuming it's because when one is visible, the other two in the background are still running and taking up the speed. How can I make the background SWF's go into a stop state, or whatever you might call it.

View 0 Replies

ActionScript 3.0 :: Stop Videos From Playing In External Swf?

Oct 14, 2011

I'm a newbie to as3 and flash and i have created a as3 slideshow that imports external swfs into movie clips to be viewed on the slideshow but one of my external swf is a videoplaye So my problem is that I want to video to stop playing when you click to the next slide here is my code for the mainswf and the slide swf[code]...

View 0 Replies

ActionScript 3.0 :: Unable To Stop FLV Playback (External SWF)?

Jul 23, 2009

I am near completing a basic website in AS3.0. I Have a portfolio section which loads in external swf's which contain a video with the FLV Playback Component. This is how I add the swf after it preloads:

Code:
function craDone(e:Event):void {
trace("LOAD");
TweenLite.to (portfolioBucket_mc, 0.5, {x:-831, alpha:0, ease:Back.easeIn});
var undergroundLoaded = emptyMovieClip_mc.addChild(loadUnderground);
back_btn.visible = true;
[Code] .....

The Problem here is the movie still keeps playing and nothing I have tried has been able to stop it. I was hoping to be able to continually addSWF's and removeSWF's out of my emptyMovieClip_mc. I read about the new .unloadAndStop function for Flash Player 10. Tried it and it still nothing. I wrote it like this, maybe it's wrong?

Code:
emptyMovieClip_mc.my_FLVPlybk.unloadAndStop();

View 1 Replies

ActionScript 3.0 :: How To Stop Looping An External .SWF File

Dec 20, 2010

How can I stop my Logo.swf file from looping. Actually the external Logo.swf file doesn't contain any looping code inside it. If I open it in any flash player it animates only one time. Writing "stop();" in code stops all other animations which I don't want.

Code:

var J:Loader=new Loader();
addChild(J);
J.load(new URLRequest("Logo.swf"));
J.x = 275;
J.y = 25;

[code].....

View 1 Replies

IDE :: Stop External FLV From Loading On Exit Frame?

Sep 14, 2004

I 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)?

View 7 Replies

ActionScript 2.0 :: Start/stop/pause A Sound In External Swf?

Jan 15, 2010

I'va any troubles in controlling sound in an external swf. I need to stop/play/pause it. I've put the sound file on the timeline of the external swf and I want to control it from tha main movie in wich I've load it. the swfs are made using AS2.0

View 2 Replies

ActionScript 3.0 :: External Swf Wont Stop Playing Sound?

Jun 28, 2011

I have created a form that has some buttons that open external swf files.Problem is when I close the external swf the audio keeps playing.If I turn off sounds the sound starts again when I load a new external swf.Here is the relevant portion of code;

function playMyMovie():void{ myrequest=new URLRequest(myMovie); myloader =new Loader(); myloader.load(myrequest); function movieLoaded(myevent:Event):void {  stage.addChild(myloader);  var mycontent:MovieClip=myevent.target.content;  mycontent.x=100; [code]....

View 15 Replies

ActionScript 2.0 :: In That External Swf Want To Stop It From Playing And Also Make A Play_btn Appear S?

Jul 28, 2009

Ok, so I have a main swf that loads an external swf into a movie clip called container_mc.In that external swf I want to stop it from playing and also make a play_btn appear so that the user may start it going again when they are ready. In my main swf I made this function:

ActionScript Code:
function pauseMovie(){
trace("movie paused");

[code]......

View 1 Replies

ActionScript 2.0 :: Stop All Sounds With XML Template External Link?

Aug 13, 2009

I have one of these XML driven Flash templates and I have several links that open _blank pages, I would like to stop the background music when they are clicked. I know I need a root stop all function and I think I would then define that function in the <link></link> tag in the XML...

View 0 Replies

ActionScript 3.0 :: MyTimer.stop(); In The Fuction The Listener Called (to Stop It) It Dosent Stop?

Jun 12, 2009

I thought I had a handle on the timer class (even just a beginners understanding), but I'm having trouble with it.I have an event listener for the timer and it starts fine i get a delay, then a tween,but when I place a myTimer.stop();in the fuction the listener called (to stop it) it dosent stop.it will repeat placing the first image, and then call the first function again

......Wait its placing the first image in (a couple of lines before the start), so Its restarting the whole movie, not just the function?

myTimer.addEventListener(TimerEvent.TIMER, tweenone)
myTimer.start();
function tweenone (event:Event):void[code]...........

View 6 Replies

Actionscript 3.0 :: Unload Loader Wont Stop Sound From External SWF?

Mar 24, 2010

I have a menu on my main page where i can choose some videos to play, these videos are in external SWFs that are loaded in and displayed using Loader, URLrequest etc.. etc..

I have a close button on my external swf that sends a dispatchEvent to an eventListener on my homepage to close the external SWF however the sound from the video in the external swf is still audible even though the visual is gone

heres the code

main page code
Code: Select all
function playVideo(e:MouseEvent):void{
//stop maipage sound
channel.stop();

[Code]......

View 2 Replies

ActionScript 3.0 :: Linking External Swf - Stop The Graveyard From Playing Once The New Level Is Accessed?

Apr 1, 2011

I am creating a vertical shooter game for one of my assessments. There are 4 levels in the game, the object of each level is to shoot as many enemies (spawn via an external as file) to build up your score before the time runs out. Once the time reaches zero, you get linked to the next level. The first level is called the graveyard which has skulls as enemies. Once the time reaches zero, this swf automatically links to the next level which is called haunted_house.swf. The only problem is the skulls from the first level continue to spawn on the new level. How do I stop this? The coding for the timer and to link the first level to the next is below:
 
[CODE]...

View 2 Replies







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