Controlling the sound of the external loaded SWF

I  have a Loader that loads external SWF. The external SWF has sound.
I'd like to stop, pause and play the sound.
How?
Please help me !
var loader:Loader = new Loader();
loader.load(new URLRequest("moora.swf"));
addChild(loader);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, on_loader_complete);
var mc:MovieClip;
var st1:SoundTransform = new SoundTransform();
var sn:Sound = new Sound();
var ch:SoundChannel;
var offset:Number = 0;
function on_loader_complete(e:Event):void
     mc = MovieClip(loader.content);
     play_btn.addEventListener(MouseEvent.CLICK, on_play_btn);
     pause_btn.addEventListener(MouseEvent.CLICK, on_pause_btn);
     stop_btn.addEventListener(MouseEvent.CLICK, on_stop_btn);
     trace(mc.totalFrames);
function on_play_btn(e:MouseEvent):void
     mc.play();
     st1.volume = 1;
     mc.soundTransform = st1;
function on_pause_btn(e:MouseEvent):void
     mc.stop();
     st1.volume = 0;
     mc.soundTransform = st1;
function on_stop_btn(e:MouseEvent):void
     mc.gotoAndPlay(1);
mc.soundTransform = st1;
This only mute the sound only and the sound is still runnung.

The loaded external SWFs are AS3. The sound is on the timeline. Some SWFs use loaded sound, Here is its code:
var snd:Sound = new Sound();
var req:URLRequest = new URLRequest("moora.mp3");
snd.load(req);
So, how can I control the sound (Stop, Pause, resume).

Similar Messages

  • Using the DateField in an Externally loaded SWF

    Hello,
    I have been having major trouble trying to get a basic PHP
    contact form to work within an externally loaded SWF file inside of
    a parent SWF. When I test the movie on its own it seems to work
    fine (example: I'm able to select a date from the DateField
    component). However, when I open up the parent SWF file and call
    the external SWF file with the form the DateField is basically
    unusable (example: when you click on it nothing happens, no
    calendar pops up to select a date).
    I have no ActionScript on it yet, simply because I figure I
    need it to work before I tell it what to do with the PHP file. The
    instance name on the DateField is "theDate". Any help is very much
    appreciated. Thank you.
    Also, I have just successfully used the contact form on the
    web. But, the only user interface components I am able to edit are
    the input text boxes, not the DateField or the ComboBox I have in
    it as well. This is very odd, I was not aware that anything special
    had to be done using these UI components within an external file.
    Elijah

    Hello 2m,
    Maybe if you were to see it, it may help you out a bit. If
    you
    click
    here for the external file you will see that the components are
    working. However, if you
    click
    here for the parent file and then click on "Meetings" on the
    top menu you will see that they do not work at all. However, if
    someone were to hit the "send" button, the PHP code would actually
    interact with the form. Let me know if that helps at all. Thanks
    again for replying.
    Elijah

  • Controlling a Movie Clip on the Main Timeline from a loaded SWF?

    Is it possible to control a MovieClip on the main timelne from another loaded clip?
    I see posts that control loaded clips, but most are all from the loader in the main timeline.  I have a moviclip on the main timeline that I want to make visible or invisible depending on what keyframe is playing in another loaded swf.
    If I try to call the movieClip from the loaded SWF I get "error #1119.  Access of possibly undefined property...." because it doesn't exist in the loaded SWF, just the main timeline. 
    The old AS2 way just used "_root".  Since "_root" doesn't exist any more, how do you control items on the main TimeLine from a loaded SWF?

    I am not clear what you mean because you are saying you are trying to target a movieclip that does not exist where you are trying to target it.
    Try using a trace to see what you are targeting when you you target the MovieClip(parent.parent)....
    trace(MovieClip(parent.parent));
    The other approach I mentioned earlier is the more OOP-correct approach if you would rather try that way.  Here's a rough outline of it...
    AS3 - Dispatch Event
    http://forums.adobe.com/thread/470135?tstart=120
    Example:
    Add something to trigger the event in the child (your loaded swf):
    dispatchEvent(new Event("eventTriggered")); (
    if dispatchEvent problem, see: http://www.kirupa.com/forum/showthread.php?p=1899603#post1899603)
    In your loading/parent swf, listen for the complete event on the Loader.contentLoaderInfo.  In the complete event handler, add a listener for the event on the loaded swf.
    // event handler triggered when external swf is loaded
    function loaderCompleteHandler(event:Event) {
        MovieClip(event.currentTarget.content).addEventListener("eventTriggered", eventHandler);
    function eventHandler(event:Event):void {
        trace("event dispatched in loaded swf");
       // this is where your main file can set the visible property of your movieclip

  • My external audio recording device only records to the right channel.  How do I send the sound in the right channel thru the left one in Final Cut to get a full stereo sound?

    My external audio recording device only records to the right channel.  How do I duplicate the sound in the right channel and run it to the left one in Final Cut to get full stereo sound?
    I've already copied and pasted the right channel (A2) onto the left channel (A1) but that just doubled the volume on the right channel.
    For instance, when I listen to my audio with headphones it only comes thru the right one.  How do I make it so that it comes thru both headphones?

    Stereo is something else. It is a sound field where the individual elements are located through varying the amount of electrical energy for each element delivered to each channel.
    What you have is a mono source that should be panned to center. This will equally divide the signal so it will be delivered out both the L & R channels.
    Load the original clip to the VIEWER and set the PAN to 0 (zero). Delete any duplicates. They are unnecessary.
    x

  • I have a macbook pro in which i use for church recordings. it has a built in mic so like one hole for headphones and mic. how do i get it to only pick up the sound from the external mic that is coming into the mixer to the laptop. it seems to pick up ever

    I have a macbook pro in which i use for church recordings. it has a built in mic so like one hole for headphones and mic. how do i get it to only pick up the sound from the external mic that is coming into the mixer to the laptop. it seems to pick up everything, like for example any little movement i make or even just asking the next person a question will get picked up by the internal mic. is there a way i can mute the internal mic so it can only pick the external mic and not every movement im making like chewing etc

    I have a macbook pro in which i use for church recordings. it has a built in mic so like one hole for headphones and mic. how do i get it to only pick up the sound from the external mic that is coming into the mixer to the laptop. it seems to pick up everything, like for example any little movement i make or even just asking the next person a question will get picked up by the internal mic. is there a way i can mute the internal mic so it can only pick the external mic and not every movement im making like chewing etc

  • My Iphone 4 32GB started having this issue when I downloaded the 2 last 6.1.X... VOICE CONTROL pops-up even when I sleep and calls random people just by the sound of the snoring... in FACETIME even more annoying. I confirm that it does this day and night

    My Iphone 4 32GB started having this issue when I downloaded the 2 last 6.1.X... VOICE CONTROL pops-up even when I sleep and calls random people just by the sound of the snoring... in FACETIME even more annoying. I confirm that it does this day and night

    Turn off Voice Control.
    Otherwise, basic troubleshooting from the User's Guide is reset, restart, restore (first from backup then as new).

  • Dynamic Text in Externally Loaded swf

    hi. i have a dynamic text field in an externally loaded swf. Its a digital clock so i want the numbers to update in the dynamic text field.
    this is not my exact code but it is very similar. i show below that i add the loader.swf, and once its loading is complete, i can work on its movieclips and add event listeners to its buttons, etc. but i cannot change the dynamic text field (its "classic text" set to "dynamic text"). after running this, the text just stays empty as it is in the external swf).
    here is the sample code:
    var loader:Loader = new Loader();
    loader.load(new URLRequest("loader.swf"));
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded);
    function loaded(event:Event):void{
         addChild(loader);
         var loader_mc:MovieClip = (loader.content as MovieClip)
         loader_mc.myMovieClip.gotoAndStop(2);//***this works
         loader_mc.myButton_btn.addEventListener(MouseEvent.CLICK, clickMe);//***this works
         loader_mc.myText_txt.text = "12";//***this doesn't work******
    please help. thanks!

    Did you embed the font in the textfield--it needs to be done in the loaded swf when you create it? One other thing to check is that the color for the textfield is not the same as the background it sits on.

  • How can I make my external loaded .SWF file smoothly disappear after 15 seconds?

    Hi,
    How can I make my external loaded .SWF file smoothly disappear after 15 seconds? The following is the code to load an external .SWF file:
    var K:Loader=new Loader();
    addChild(K);
    K.load(new URLRequest("clock.swf"));
    K.x = 165;
    K.y = 247;
    K.contentLoaderInfo.addEventListener(Event.INIT, growLoader);
    function growLoader(evt:Event):void {
         K.width = 130;
         K.height = 130;
    I want to make clock.swf file disappear from the page after 15 seconds using some smooth disappear effect.
    Please help.
    Thanks.

    Something even better:
    http://www.greensock.com/
    Check out TimelineMax I LOVE it...
    The guy that made this (and gives it away for free!) is a saint.

  • Passing events from externally-loaded SWFs

    Hi,
    We have an externally-loaded swf that acts as a kind-of-a slide show.  After a user selects a particular subject from a mxml-based "menu" application, they push "buttons" in the SWF to go through a presentation, then on the last frame of the swf, I'd like to unload the swf and replace it with another "mxml" application.  How can this be done?  I have not tried to pass/capture events "up" from an externally-loaded swf before.
    Thanks,
    Doug

    Do you own those SWFs?  If so, they should dispatch an event from a known
    place like a SlideShowManager or something like that.
    Other folks "cheat" and bubble events or dispatch off of the systemManager
    and/or top-level application.

  • When I closde a page where there has been a video, ie youtube or the like, the sound from that video that had played will continuw to run. I can close Firefox and upload it again and still will the sound of the video continuew to run. WHY?

    When I close a youtube video or some other video and even after closing the tab the sound from the video continue to be played. As a matter of fact I have even closed Firefox and re-started Firefox and it plays again. I even went and turned off the computer and re-started the computer and then Firexox and the video sound was still there playing. WHY is this happening???.

    Most YouTube content requires the Flash plugin. Sometimes it's necessary to uninstall then reinstall that plugin.
    Uninstall the Flash plugin then reinstall new >  Troubleshoot Flash Player | Mac OS
    Very important to uninstall the currently installed plugin first.
    Now launch Safari and try a video.
    If you have the ClickToFlash extension installed, that can prevent Flash based video from streaming. It can also be installed as a plugin in /Library/Internet-Plug-Ins.
    And check to see if Safari is running in 32 bit mode. Right or control click the Safari icon in your Applications folder then click Get Info. If the box next to:  Open in 32 bit mode  is selected, deselect, quit then relaunch Safari.
    You may also need to delete the cache associated with Safari .
    Open the Finder. From the Finder menu bar click Go > Go to Folder
    Type or copy/paste:   ~/Library/Caches/com.apple.Safari
    Click Go the move the Cache.db file from the com.apple.Safari folder to the Trash.
    Quit and relaunch Safari. Try a video.

  • How can I use the sounds of the Yamaha Motif XF6 in Logic Pro 9?

    I have Logic Pro 9 on my Mac Book. I also have a Yamaha Motif XF 6 synthesizer. Instead of using Logic's software instruments I would like to record the sounds of the Motif directly into Logic.
    I have been told that an audio interface is necessary for this. What kind of audio interface would be good for this? Any in particular?
    And, once I have obtained the interface, what steps do I need to take to hook up the Motif into Logic to utilize the Motif's sound bank?
    Detailed steps would help, as this is new stuff for me.
    Thanks!

    Since this is a user forum only, and your questions will take a lot of time to answer you might want to check both the Logic manual and the XF6 manual. The XF6 has possibilities such that you may not need and Audio interface if the Firewire option is present.
    Also you have a built in USB MIDI interface as well, you will need to download the Yamaha MIDI driver.
    Read Exploring Logic Pro, especially chapter five, you can record your performance via MIDI, edit it and then commit to audio.
    Dig in.

  • How can I turn off the sound from the original midi  or audio tracks when I turned on the duplicate tracks for editing ?

    How can I turn off the sound from the original midi or audio tracks when I edit or listen to the duplicate tracks in Logic Pro 9 ?
    I'm using iMac desktop with Mac OS X Version 10.7.3. Pls advise.

    Dan,
    It sounds like one of your preferences has changed.
    Go to preferences > audio > general, and make sure "track mute/solo" is set to "CPU saving (slow response)". It is probably set to "Fast " at the moment.
    This setting (fast) basically causes immediate muting from the channel strip while your song is in play. This is because the audio is still being read from the hard drive, but the channel strip is simply muted.... like a hardware mixer. When set to "CPU saving", the audio from that track, when muted, is actually stopped from streaming from the hard drive, but there is a couple second delay before the audio is actually muted.
    One would think that the fast setting is generally preferable, except when you need to do what you are doing. The only way to keep duplicate copies of channel strips acting independent of one another is to leave this setting on the "CPU saving" setting.
    Hope that helps

  • I have elements 12 in Windows 7 but is unable to see mp4 files in the organiser. The sound from the file is there but no image!

    I have elements 12 in Windows 7 but is unable to see mp4 (Canon G16) files in the organiser. The sound from the file is there but no image!
    Other file formats from Canon is no problen. So What to do??
    Roger

    Me again,
    A friend suggested that I do a system restore.
    I did a search for system restore in Windows 7 and got a very intuitive menu.
    I selected an earlier system restore point and executed the restore.
    After the computer restart I reloaded Firefox 5.0 and the Ask.com problem was corrected.
    My friend says this approach may work about 25% of the time to fix this kind of problem. In my case it worked and I am happy.
    Thanks all.
    Richard Ryer

  • I have the djay app on my ipad and i want to record the set i'm playing on my iphone through garageband. i need to take the sound from the headphone jack of the ipad, as the 30pin connector will be used to connect to the DJLive accessory. Is this possibl?

    i have the djay app on my ipad and i want to record the set i'm playing on my iphone through garageband. i need to take the sound from the headphone jack of the ipad, as the 30pin connector will be used to connect to the DJLive accessory. Is this possibl?reco

    You may get a better response in this community:
    https://discussions.apple.com/community/app_store/garageband_for_ios

  • I want to delete the sound of the camera how ?

    Help me how to delete the sound of the camera

    Depending on what country the phone was sold in, you can silence the shutter sound by engaging the mute switch (the little slider above the volume buttons). Phones from certain countries (e.g. Japan) can't have the sound silenced.

  • Just got fcp, how do mute the sound on the video clip so it does not come through the audio track?

    just got fcp, how do mute the sound on the video clip so it does not come through the audio track?
    Please help

    Don't edit the audio into the timeline. Or pull the audio level down to zero in the inspector or on the audio waveform in the timeline.

Maybe you are looking for

  • Screen losing brightness / spontaneous shutdowns

    2 Problems: 1.) My iMac G3 400 / slot-loader / OS 9.1 has had recent startup problems; i.e., occasionally shuts down spontaneously shortly after initial startup, or sometimes after several minutes, or longer use. 2.) The monitor has become darker. I

  • Stock Transfer for Excisable Materials Using Movement Type 301

    Hi, We are having a Plant 1002 as excisable Materials. During GR we following the process like GR (Part -I), Capture Invoice, Post Invoice. Can we transfer the Material from Plant 1002 to other Plant, say 1001, using Movement Type 301? Or we need to

  • Center HTML Report

    Hi, I want to know if is possivel to center the HTML generated by Reports. I'm developing the report for a resolution of 800x600, but if I want to view the report in 1024x786 the report is align at left and not (as i want) at center. Carlos Dias

  • Where can I find a version of Premier Elements 11 that will run on 64 bit Windows 8?

    Hi I have purchased a Premier Elements 11 over the net and downloaded it over the net.   It tells me it won't install on a 64 bit windows and that I need another version, anybody know where I can get one from?

  • How to install flash player on my system without having admin access

    Hi Team - I am working on my company system. I tried viewing youtube, its asking me to update the flash player and when i tried installing it shows you didnt have admin access. Since i using my company system, i dont know the password for admin. Henc