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


Similar Posts:


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 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 :: 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 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 :: 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 :: Position Of External Sound In External Swf?

Jul 23, 2010

In trying to activate the remainder of the pause button, I find that using MovieClip(loader.content).channel.position always returns 0. I've tried numerous other combinations to access the position of the sound for the play function to resume correctly. The visual part of extswf.swf stops and starts exactly as it should.

In CntlClass:
public var loader:Loader;
public var movie_mc:MovieClip;
public var soundResume:int = 0;[code].........

View 2 Replies

IDE :: Sound Of External Swf?

May 13, 2010

when i load external swf inside main swf through loadClip then sound of external swf does not play.

View 3 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 :: 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

ActionScript 3.0 :: Pause Sound In External SWF

Oct 11, 2010

I have created a Flash container movie (mainContainer.swf) that cycles through an array loading in several external swf files (animation1.swf, animation2.swf, animation3.swf, etc.). Once the user clicks the next button, the next swf is loaded, and so on...

What I need to be able to do, is to control the sound of the external swf files from the main container. Specifically, I need to be able to pause and play/resume the sound of the external swfs, but not quite sure how to access the external swf's soundChannel from the main container swf. My client recently wanted to add in a "pause" feature, and while I have been able to pause the external swf's animation, I cannot target the external swf's sound - it just continues playing while external animation is paused.

I can successfully pause/resume the sound (song.mp3) if the soundChannel is defined from within the same swf (using code below); however, I cannot seem to figure out how to communicate between the parent and child swf, if the parent is requesting the pause action, and the child swf is the one that loads in the song.

[Code]...

View 4 Replies

ActionScript 3.0 :: Set A Volume To External Sound?

Aug 26, 2010

I'm trying to set a volume to my external sound. I'm using the following code, there're no errors, but the volume is not affected...

var req:URLRequest = new URLRequest("squeeak3.mp3");var sound:Sound = new Sound();var controller:SoundChannel = new SoundChannel();var myTransform = new SoundTransform();myTransform.volume = 0.2;controller.soundTransform = myTransform;

View 3 Replies

Professional :: Controlling Sound Of An External SWF?

Jan 11, 2011

I'm trynig to control an sound of a external SWF but I can't seem to get it right,here is the code i'm using to import the sound
 
mport flash.media.Sound;import flash.net.URLRequest;import flash.display.Sprite;import flash.media.SoundChannel;import flash.events.Event;import flash.events.MouseEvent;var _som1:Sound;var _channel1:SoundChannel;var _playing1:Boolean = false;var[code]...

View 16 Replies

ActionScript 3.0 :: Manage Sound From An External SWF?

Feb 3, 2009

I wrot a FLA in AS3 which is basicaly a nicly designed Loader which loads little cute SWF games. Each game is built a bit differently and has its own 'thing'.I was wondering, how can I control the sound of the SWF's from the Loader File?

Which leads me to a wider issue of how can I control variables of a loaded SWF.

View 0 Replies

ActionScript 2.0 :: Load An External Sound

Jun 17, 2009

Urgent help me load a external sound in action script

View 0 Replies

ActionScript 3.0 :: Control External Swf Sound?

Nov 11, 2010

I am trying to control external swf sound and I have created volume slider. But when I am running the code I am getting following error..

ArgumentError: Error #2068: Invalid sound.
at flash.media::Sound/play()
at volumeControl_fla::MainTimeline/volumeControl_fla::frame1()

[Code]....

i.e. when I load theexternal swf..how to catch the sound embedded in that swf

View 5 Replies

ActionScript 3.0 :: Controlling Sound Of An External SWF?

Jan 10, 2011

I'm making an application and I can't seem to find a way to control my sound of an external SWF(SWF2) from the main one(SWF1).Here is the code I'm using to control the timeline of external SWF that is placed inside of the main movie

Code:
var loadAnimBox:Loader = new Loader();
var vid_mc:MovieClip;
function startLoading():void {

[code]....

View 2 Replies

ActionScript 3.0 :: Pause Sound In External SWF?

Oct 7, 2010

I have created a Flash container that cycles through an array loading in several external swf files. What I need to be able to do, is to control the sound of the external swfs from the main container. I would like to be able to pause and play/resume the sound of the external swfs, but not quite sure how to accomplish this, as I am newly migrating to AS3. Some of the sound is embedded in the external files, while others load it in via AS.

I was able to successfully pause/resume the animation of the external files, but cannot get the sound to pause - it just continues playing while the animation is stopped.

How can I pause and resume the sound of my external swfs from my main container?

View 6 Replies

ActionScript 2.0 :: Control Sound On An External Swf?

Apr 4, 2005

i am trying to control sound on an external swf.

the sounds that i have is on a swf file that has my "container" MC that loads up all of my external swfs.

the sound controller is on my external swfs.

View 1 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 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

ActionScript 3.0 :: Controlling The Sound Of The External Loaded SWF?

Aug 18, 2009

I  have a Loader that loads external SWF. The external SWF has sound. I'd like to stop, pause and play the sound.

[Code]...

This only mute the sound only and the sound is still runnung.

View 4 Replies

Professional :: Accessing External Sound And Pic Files?

Feb 26, 2011

Is there any simple way you can access a very short sound file in flash without having to play it in an flv player.  its just a ding sound to play when the user hits a button in the presentation.Also is it possible to access an external pic file and then convert it in to a symbol to be used within my presentation.I just don't want to store these files to keep my main swf small.

View 3 Replies

Professional :: External Swf Streaming Mp3 Player No Sound?

May 3, 2011

I am pretty dense about flash, pretty new to the software so bare with me. So on the main .fla i have linked to a button to open the external swf mp3 player. That Mp3 player is streaming a song with the code var req:URLRequest = new URLRequest("mysong.mp3"); snd.load(req);  
 
the mp3 is in a folder which is located in the same place as both the .fla and .swf mp3 player. Streaming the mp3 works when testing the swf. but there is no sound when testing the linked swf mp3 player in the main .fla. It's like the file path messes up but i dont know how to go about fixing it?

View 7 Replies

ActionScript 3.0 :: Unload And Kill The Sound Of An External SWF?

Sep 6, 2011

I have the following program to play a .flv movie on a webpage made by myself:
 
var Xpos:Number=0;
var Ypos:Number=0;
var swf:MovieClip;

[Code].....

When I publish the preview, it works well and I can unload it and kill its sound by clicking on the close button. When I publish the page on the website and load the movie through "loader_btn", it works well, and when I click the close button, the image disappears but the sound is continued.

View 3 Replies

Flash :: Sound Keeps Playing After External Swf Was Unloaded

Oct 14, 2010

I have a flash application, some kind of a play-list that loads external SWF video player (I don't have code access to that external file), so users can watch the video or skip to another one. When user switches to another video new SWF file is being loaded.

The problem: If user didn't finish watching the video and skips to the next then I unload previous SWF file (unloadAndStop()) and load a new one. And because the previous SWF was playing it is not actually unloaded, it is still playing on the background (I hear two audio tracks: current and previous).

View 1 Replies

ActionScript 3.0 :: Loading External SWF - Sound No Visual?

Jul 10, 2009

On a button click the page loads and external swf using the add child function. Once loaded the user can close the "pop up" at any time by clicking the close button. The swf appears without a problem first time round, it is if they go back to click again that causes the problem. If they then try and click the button to view the external swf for another time then no visuals appear - you can hear sound but the videos never appear. I have tried to see if it is hiding behind something to no avail.

Edited code is below!!

ActionScript Code:
var multiPlayer:Loader = new Loader();
var playerRequest:URLRequest = new URLRequest("vgallery_multi.swf");
function showQAMultiple(Event:MouseEvent) {

[Code].....

View 2 Replies







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