Play an audio from the stage

Hello,
I am totally new to Edge (and coding). What I am trying to do seems very simple:
I want to pause an audio with a clik from the main stage. This audio is nested in a symbol, which is itself nested in another symbol. I hope someone can help me with this. Thanks!
I am using Edge CC.

Hi Flutonic,
This is what I did :-
1. I have a symbol "parent" which contains another symbol "child" which inturn contains an audio element named "Talk" .
2. In the click event of the "parent" symbol I have the following code:-
var mySymbolObject = sym.getSymbol("parent").getSymbol("child");
mySymbolObject.$("Talk")[0].pause();
Now when we publish the file , the audio will play but when we click on the parent symbol the audio will pause .
Hope it helps .
Thanks
Saurav

Similar Messages

  • [Bug] Playing stream audio from the editor almost always starts from beginning.

    Whenever I am creating a movie clip with an audio layer set to "stream" I usually click certain points of the movie and hit enter to see and hear it. In Flash CC however, it seems about 95% of the time no matter what frame I am on when I hit enter the audio starts from the beginning and is not in sync. There have been a few cases in which the audio started at right frame but I haven't yet been able to isolate the process. Audio works great in the exported SWF, this issue is just just with the editor.

    This bug still hasn't been fixed. I don't recommend Flash for any animator; the issue makes syncing to music and vocals extremely frustrating. This bug has been around for months without solution.
    Running as administrator does not solve the problem.
    You will have the audio bug even if you do not have a Beats Audio Soundcard.
    The longer and more complicated your project, the more frequently the bug happens. When it first begins (around 15-30 seconds worth of frames and about 7 layers) you can make the audio stream as it should by clicking your audio track, setting it to "stop," saving your project, and setting the audio to "stream" again.
    However, when you have about 60 seconds on your timeline, the bug happens a lot more, and you have to actually close the project to get the sound to work again if you do not have the patience to wait for it to fix itself. The wait ranges from 30 seconds to several minutes to never fixed until you close. It's highly unpredicatable. Sometimes it is not enough to close the project, in which case you must quit Flash and start it up again.
    It happens with both mp3 and wav sounds.
    After a month of this bug, I still can't pinpoint what causes it. It's completely random.
    This post suggests it has something to do with scrubbing the timeline. I haven't been able to replicate the bug by doing this. It happens whether or not you use the slider or just click on frames to navigate.
    My system specs:
    Windows 7 Home Premium (Service Pack 1)
    64-bit operating system
    Processor: Intel i5-4670K CPU @3.40 GHz
    RAM: 8 GB
    NVIDIA GeForce GTX 660 Graphics Card
    Audio is also NVIDIA High Definition Audio
    The bug happens even if I plug in headphones to a regular audio port not on the graphics card.
    Other audio types I have are the Intel Display Audio and Realtek High Definition Audio. I've tried messing with audio settings to no avail.

  • Problem: Audio from the video plays, but video does not show.

    Hi,
    I used the following code to play the video. The audio from the video plays displaying the player but there is no visual.
    There is no problem with the video as I have tried several other videos with .mpg and .mov extensions.
    import javax.swing.*;
    import java.awt.*;
    import javax.media.*;
    import java.awt.event.*;
    import java.net.*;
    public class MediaPanel {
        JFrame frame = new JFrame("Movie Player");
        static Player player = null;
        public MediaPanel(){
            try{ // method using URL
                URL url=new URL("file",null,"c:\\temp\\A.mpg");
                player = Manager.createRealizedPlayer(url);
            } catch( Exception e) {
                System.out.println(" Unable to create the audioPlayer :" + e );
            Component control = player.getControlPanelComponent();
            frame.getContentPane().add( control, BorderLayout.CENTER);
            frame.addWindowListener( new WindowAdapter() {
                public void windowClosing(WindowEvent we) {
                    MediaPanel.stop();
                    System.exit(0);
            frame.pack();
            frame.setSize( new Dimension(600,600) );
            frame.setVisible(true);
            player.start();
        public static void stop(){
            player.stop();
            player.close();
        public static void main( String args[]){
            MediaPanel panel = new MediaPanel();
    }

    use this code "Component control = player.getVisualComponent(); "
    instead of this code " Component control = player.getControlPanelComponent();"
    But if you want show both of them, modify as following
    Component control1 = player.getControlPanelComponent();
    Component control2 = player.getVisualComponent();
    then add the two control (control1 & control2 ) to your JFrame panel

  • How do you remove a symbol from the stage in Edge animate?

    Hello-
    I'm wondering how to remove a symbol from the stage in Edge Animate so you can jump to another place in the timeline.  In Flash, the symbol was only on the stage for the amount of frames you indicated.  Not sure how it works here.
    For example, I have 2 buttons on my first screen with some text that animates in.  I want the button click to take the user to another section in the timeline or (basically another scene, like in Flash)  that contains different content.  If I change the visibility the buttons are still there and will ( I assume) create problems when other elements are placed on top. 
    Or is the only way with code.  If that is the case what would that code be?
    I would appreciate any help.
    Thank you!

    What I usually do, is, once you have everything set up in the scene you are done with. highlight it all
    right click
    group elements in DIV
    Now all those items act as 1 group and then you give it a properties name, much like a symbol.
    THEN you can refer to that scene name and move it anywhere or hide it and slide in another scene that has the content for that next scene.
    basically you take all the elements that make up 1 scene, gruop it up, name it, and then in the code for the button say something like:
    on click:
    scenename.play(framenumber);
    that will then animate that scene according to any animation you gave it, such as moving to the left, off stage. while moving scene 2 that you create into the stage.
    or just have something like this hide it
    sym.$("scenename").hide();
    sym.$("scene2name").show();
    but if you do that, make sure in your CompositionReady code you hide all scenes EXCEPT the 1st one, so the user doesnt see them all instanatly anyway.

  • TypeError: Error #1006 - Removing MovieClip from the stage

    I have a movie clip that is called to the stage and once the movieclip is finished it calls a function that removes it from the stage. The code works but I get an error message about 4 seconds after the movie clip ends.
    Here’s the error message:
    TypeError: Error #1006: exitWordMicroscopic is not a function.
                    at ASvocabulary_microscopic/frame110()[ASvocabulary_microscopic::frame110:1]
    Here’s the stage code:
    //************************Removes the movieclip from the stage and enables the button.*************************
    function exitWordMicroscopic():void
                    bnt_vocab_microscopic.mouseEnabled = true;
                    removeChild(word_Microscopic);
    //******************************Stage buttons**************************************
    stage.addEventListener(MouseEvent.MOUSE_DOWN, goButtonsHomeRead_1);
    function goButtonsHomeRead_1(event:MouseEvent):void
                    //Vocabulary buttons
                    if (event.target == bnt_vocab_microscopic)
                                    bnt_vocab_microscopic.mouseEnabled = false;
                                    SoundMixer.stopAll();
                                    addChild(word_Microscopic);
                                    word_Microscopic.x = 47;
                                    word_Microscopic.y = 120;
    Here’s the code inside the movie clip. This is what the error message is referring to:
    //****************** Calls function to remove itself from the stage****************************
    Object(parent).exitWordMicroscopic();
    What am I doing wrong?

    Here' how the code looks now:
    Objective: To remove the current movieclip while it's playing so that it does not show on the next (or previous) frame.
    Here’s the stage code:
    var word_Microscopic:ASvocabulary_microscopic = new ASvocabulary_microscopic();
    //Removes the movieclip from the stage and enables the button.
    function exitWordMicroscopic():void
        bnt_vocab_microscopic.mouseEnabled = true;
        removeChild(word_Microscopic);
    //******************************Stage buttons**************************************
    stage.addEventListener(MouseEvent.MOUSE_DOWN, goButtonsHomeRead_1);
    function goButtonsHomeRead_1(event:MouseEvent):void
        //Vocabulary buttons
        if (event.target == bnt_vocab_microscopic)
            SoundMixer.stopAll();
            bnt_vocab_microscopic.mouseEnabled = false;
            addChild(word_Microscopic);
            word_Microscopic.x = 47;
            word_Microscopic.y = 120;
            word_Microscopic.play();
    //This button takes the user to the Main Screen
        if (event.target == bnt_ReadGoHome_1)
           // exitWordMicroscopic(); [If I use this function I get this error ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.]
            SoundMixer.stopAll();
            gotoAndPlay("1","Main");
            stage.removeEventListener(MouseEvent.MOUSE_DOWN, goButtonsHomeRead_1);
    //This takes the user to the next frame.
    if (event.target == GoNext_1)
            SoundMixer.stopAll();
            gotoAndPlay("2");
            stage.removeEventListener(MouseEvent.MOUSE_DOWN, goButtonsHomeRead_1);
    Here’s the code inside the movie clip.
    //****************** Calls function to remove itself from the stage****************************
    Object(parent).exitWordMicroscopic();

  • Droid Razr Bug.  Won't play streaming audio from websites.

    My Droid Razr won't play streamed audio from a website and won't play .wav files attached to e-mails.  That's annoying.  
    Motorola tech support said problem will be fixed upon next upgrade of Android OS.  
    My phone is currently running Android OS 2.3.5.  
    Does anyone now of a quicker fix?
    Does anyone know when an OS upgrade will be available for the Droid Razr?
    Thx!

    i got the same issue on my ipod. i figured the whole idea of converting the format would solve the issue. never really found out how to solve it. i'll be watching this post to see if anyone has a solve for this issue.

  • Removing a movieclip from the stage after a set amount of time (or once it's finished its animation)

    I've got a movieclip animation which is added to the stage at the start of the .swf.  Its an introduction to the game, and the user is encouraged to click on the movieclip to start the animation.
    Once the animation is finished I'd like the movieclip to be removed from the stage.
    How do I go about doing this?  Do I need to setup some sort of event handler which listens out if the movieclip has finished then start a function once its finished to remove it from the stage?  Which methods look out for movieclips finishing?
    Cheers

    there is no specific event that's called when a movieclip stops playing,
    what you could do is inside your intro movieclip  dispatch an event as soon as the animation is finished
    something like ... dispatchEvent(new Event("introFinished");
    and all you have to do is add and event listener to the intro movieclip intro.addEventListener("introFinished", onIntroFinished);
    when your onIntroFinished is called you can remove the intro from the stage.

  • [svn:fx-trunk] 10826: When a Video is removed from the stage or becomes invisible, the video will now pause playback.

    Revision: 10826
    Author:   [email protected]
    Date:     2009-10-02 10:28:43 -0700 (Fri, 02 Oct 2009)
    Log Message:
    When a Video is removed from the stage or becomes invisible, the video will now pause playback.  This features is controlled through a new property, playWhenHidden, which defaults to false (meaning we don't play the video when it's hidden).  When it becomes visible/on-stage again, we will start playing the video if autoPlay=true.  Otherwise, the video will not automatically start playback.
    This property still needs to be reviewed by PARB.
    Also, updating a comment in SkinnableContainer relating to a FIXME I own.
    QE notes: -
    Doc notes: -
    Bugs: SDK-21928
    Reviewer: Deepa
    Tests run: checkintests, mustella VideoElement/VideoPlayer
    Is noteworthy for integration: Yes
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-21928
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableContainer.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/VideoElement.as

    Is this the same trouble you are having?
    http://discussions.apple.com/thread.jspa?threadID=826805&tstart=0
    DP G5 2GHz    

  • TS3789 I have similar problem, my apple tv which has always worked properly with my Samsung tv will no longer play any audio after the latest 5.1 upgrade. Very frustrating as it was working perfectly before. I am starting to not trust apple upgrades until

    I have similar problem, my apple tv which has always worked properly with my Samsung tv will no longer play any audio after the latest 5.1 upgrade. Very frustrating as it was working perfectly before. I am starting to not trust apple upgrades until proven for example ios6 on iPhone with that stupid map app instead of google maps.
    I just want to buy and hear my iTunes music and videos on my apple tv, could before cant now. Thank you apple. Time to pack up the apple tv and start torrenting without the ios-bs.
    Disheartened apple fan.

    Welcome to the  discussion forums.
    Try going to synching in the sources menu on your tv and selecting 'change itunes library', when it gives you the passcode check itunes to see if the tv is showing up as a new device, if so try entering the pass code. It may be that your tv is seeing itunes as a different library because of a recent upgrade.

  • When listening to music on ATV, it plays two songs from the playlist, then won't play any more.  You can see playlist and songs, but won't respond.  Any ideas?

    When listening to music on ATV, it will play two songs from the playlist, then no more.  You can see the playlist on songs, but it won't play.  Turned everything off, reset the network...nothing works.  Any ideas?  It used to play fine...for hours at a time.

    Hi.  Thanks for your reply.
    It is happening via "shuffle" in a playlist.  Always two different songs within the playlist.  You can see the next song on the screen that should, theoretically, be playing...but nothing happens.  Even when you push "play" on the remote, it doesn't receive the command. 
    I reset, then restored ATV.  Now, it doesn't limit itself to two songs, but does stop after a few.  The more trial and error I do, the more I believe the problem is with Homesharing in iTunes.  If I turn off Homeshare, then turn it back on, a couple more songs will play in the playlist.  I have shut down iTunes, restarted computer, completed updates, but nothing seems to change it.
    It used to play fine for hours on end, but has now found this glitch.

  • I can't play certain videos from the internet on my macbook

    I can't play certain videos from the internet on my macbook.
    When using Sarfari or Google Chome, I am unable to play some videos on the internet. News clips, posted videos on blogs, and tv episodes from their own network websites. Youtube videos are fine. I doesn't make sense.
    I tried downloading an update for quicktime, but the computer claims that quicktime is up to date. Yet, the videos and tv episodes don't play.
    I have checked for the most recent software updates, and everything is up to date. Nothing is wrong with the hardware either.
    Any suggestions would be awesome! Thank you!

    In addition to Flash, you might need some other plugins.  Microsoft videos are mostly in Silverlight, and you'll want Flip4Mac to play WMVs.  Perian contains codecs for pretty much every video online.
    http://www.microsoft.com/getsilverlight/Get-Started/Install/Default.aspx
    http://windows.microsoft.com/en-US/windows/products/windows-media-player/wmcompo nents
    http://perian.org/

  • HT4437 Can I play a video from the remote app onto apple tv whilst simultaneously stra,ing music to other speakers via express?

    Can I play a video from the remote app onto apple tv whilst simultaneously stra,ing music to other speakers via express?

    Thank you for that, I wanted to make sure I was trying to replicate the same thing as you. Just tried it now, works fine for me.
    Of note though, this will take a relatively well performing network to achieve this, I have such a network, if your network is not as good as it might be, you might encounter problems.
    For the avoidance of doubt, I used the remote app on my phone to get my iTunes library on my computer to stream music to 3 of my Apple TVs, I then used the remote app to control another Apple TV and get it to stream a music video from my computer to it. Of interest I managed to do this while my wife was using yet another Apple TV (not with the remote app) to watch something else from iTunes on my computer.

  • How to effectively remove a loaded SWF from the stage?

    I can not figure out a proper coding to remove a loded SWF from the stage.
    Here is my set up.
    I have a layout segmented into labeled section. In the section labeled "products" I have a layout consisting of product images acting as buttons which bring a user to another labeled section "prdctsPopUps"
    In the "prdctsPopUps" section I have placed an instance of LoaderMax placed into an mc container. Placing LoaderMax into an mc container automatically resolved an issue of clearing loaded SWFs from stage when I come back to "products" section.
    I specified the variable in the "products" section with the following set up:
    var sourceVar_ProductsPopUps:String;
    function onClickSumix1PopUp(event:MouseEvent):void {
                        sourceVar_ProductsPopUps="prdcts_popups/sumix1-popup_tl.swf";
                        gotoAndPlay("prdctsPopUps");
    So each button has its own "....swf" URL and they all open fine and I can come back to "products" section without any issues.
    However inside the swf (which loads through LoaderMax which is placed into an mc) there are other buttons which bring a user to labeled section "xyz". Which also functions properly. It opens as it is supposed to be and without any previously loaded "...swf" on the stage.
    At the labeled section "xyz" there is a limited set of buttons repeating from section "products" which has to bring a user back to the same set up in the "prdctsPopUps" labeled section and open a corresponding "...swf" .
    However only the last opened "...swf" will appear in that section. Effectively the one which was originally opened from the "prdctsPopUps" section and not the one which was supposed to be opened from the "xyz" section.
    I can not understand why it would work from one labeled section and not from another. I can not figure out on which section which code/function needed to be placed.
    Here is the set up from a button from the "xyz" section whcih supposed to bring a user to the same "prdctsPopUps" section but to load a different "...swf"
    var sourceVar_ProductsPopUps_fromXYZ:String;
    function onClick_floralytePopUp_fromXYZ(event:MouseEvent) :void {
                        sourceVar_ProductsPopUps_fromXYZ="prdcts_popups/floralyte-popup_tl.swf";
                        gotoAndPlay("prdctsPopUps");
    Here is the code set up for the LoaderMax from the "prdctsPopUps" section:
    var loaderProductPopUps:SWFLoader = new SWFLoader(sourceVar_ProductsPopUps,
                                                                                                        estimatedBytes:5000,
                                                                                                        container:holderMovieClip,
                                                                                                        onProgress:progressHandler,
                                                                                                        onComplete:completeHandler,
                                                                                                        centerRegistration:true,
                                                                                                        alpha:1,
                                                                                                        scaleMode:"none",
                                                                                                        width:540,
                                                                                                        height:730,
                                                                                                        crop:true,
                                                                                                        autoPlay:false
    function progressHandler(event:LoaderEvent):void{
              progressBarPopUp_mc.gradientbarPopUp_mc.scaleX = loaderProductPopUps.progress;
    function completeHandler(event:LoaderEvent):void{
              var loadedImage:ContentDisplay = event.target.content;
              TweenMax.to(progressBarPopUp_mc, 1.5, {alpha:0, scaleX:0.25, scaleY:0.25});
    loaderProductPopUps.load();
    Is there something which needs to be imported, or specific function needs to be specified in a specific labeled section?

    actually, i think you'll need to use something like:
    var loaderProductPopUps:SWFLoader;
    if ((loaderProductPopUps){
    if(loaderProductPopUps.content)){
       loaderProductPopUps.unload();
    loaderProductPopUps= new SWFLoader(sourceVar_ProductsPopUps, //the value of sourceVar_ProductsPopUps allows to load mulitple SWFs from the products page.
                                                                                                         estimatedBytes:5000 ,
                                                                                                         container:holderMov ieClip,// more convinient and easier to manage if to place the LoaderMax into an empty mc (holderMovieClip)
                                                                                                                                                                         // if not will work as well. Then the line container:holderMovieClip, has to be replaced with container:this,
                                                                                                                                                                         // can be any size, can not be scaled as it distorts the content
                                                                                                         onProgress:progress Handler,
                                                                                                         onComplete:complete Handler,
                                                                                                         centerRegistration: true,
                                                                                                         //x:-260, y:-320, //no need for this is if used: centerRegistration:true,
                                                                                                         alpha:1,
                                                                                                         scaleMode:"none",
                                                                                                         //scaleX:0, scaleY:0,
                                                                                                         //vAlign:"top",
                                                                                                         width:540,
                                                                                                         height:730,//scales proportionally but I need to cut off the edges
                                                                                                         crop:true,
                                                                                                         autoPlay:false
    function progressHandler(event:LoaderEvent):void{
              progressBarPopUp_mc.gradientbarPopUp_mc.scaleX = loaderProductPopUps.progress;
    function completeHandler(event:LoaderEvent):void{
              var loadedImage:ContentDisplay = event.target.content;
              //TweenMax.to(loadedImage, 1.5, {alpha:1, scaleX:1, scaleY:1});//only need this line if corresponding values are changed in SWF loader constructor
              TweenMax.to(progressBarPopUp_mc, 1.5, {alpha:0, scaleX:0.25, scaleY:0.25});
    loaderProductPopUps.load();

  • How to do you control lower levels from the Stage?

    How to you control lower levels from the Stage?
    I have a button on the main stage and I have a symbol that has another symbol inside that I want to control that timeline or label.
    I have had success with going one level deep but not two or three deep.
    sym.getSymbol("symbol01").stop("label01");
    Any help would be great!
    Thanks.

    Can you explain the hierachy of your symbols? By this I mean, name of your symbol and any symbol inside and any symbol inside nested symbol and what event you are triggering from where?

  • I am trying to play some videos from the internet and I get the message missing plug in.  I click on "missing plug in" and download adobe flash player.   When i try to log in again to play videos, I still get the message missing plug in.  Any suggestions?

    I am trying to play some videos from the internet and I get the message "missing plug in".  I click on the message and downlaod adobe flash player as prompted.   When I log in again to play the videos,  I still get the missing plug in message.  Any suggestions??

    that used to happen to me all the time! I would recommend going to a different sight or attempting to download it again ( you may have missed a step it can be tricky).

Maybe you are looking for

  • Using a custom menu button on the slide to open and close TOC in Captivate 7

    HI I have a custom menu button. When the user clicks I want to show TOC, ( I see there is a state to show TOC) but when the user clicks the same menu button again on that slide how can I hide the TOC. ie toggle between hide and show. thanks

  • HP laptop can't connect to AirPort Extreme

    My dad has an HP laptop with an 802.11G wifi card. When I enabled AirPort Disk and restarted the router, the laptop came up with a "Limited or no connectivity" error. I tried resetting the network, unplugging the router, and even extending it with an

  • Javascript problem with update

    I just recently update to Snow Leopard on a 17" iMac Intel Core 2 duo. Now netflix won't load their sliding images or load a movie online in any brower (Safari, Chrome or Firefox.) Youversion.com will also not load across all browsers. When I look at

  • 2710 Display Questions

    Hi, I have 2 questions 1) Can I adjust the brightness of my 2710 display? 2) How can I stop the display from turning off, especially when I am trying to read a long SMS or a text file. It gets very annoying if I have to turn it on again (and again, a

  • Binary Search Help

    Below is the coding for the binary search: public class Binary_Search_ public int binarySearch(int arr[],int key) int low=0; int high=arr.length-1; while(low<=high) int middle=(low+high)/2; if(key==arr[middle]) return middle; else if(key<arr[middle])