Simple button to play symbol....?

I have a symbol "NA". It is an animated map that scales up and then back in place when closed. I have added a button to the main stage to play this symbol with the following code on the "click" event:
sym.getSymbol("NA").play();
What am I missing? Something, because it doesn't work for some reason.
Simple button for a simple mind?
Any and all help would be appreciated.

Hi OneHorse,
I've uploaded a file showing my above code working. Instead of just using "play", I'm telling it to play from a label: play("in"). If your "NA" symbol has autoplay unchecked, there may be some weird action when you tell it just "play()".
www.timjaramillo.com/code/edge/_source/test.zip

Similar Messages

  • Can someone provide a simple button which plays a sound for ios?

    I need a sample fla or the code for a button that plays a sound when touched, adobe air for ios.
    I have tried multiple tutorials and nothing seems to go right.
    a sample fla would be awesome.
    i used to be an actionscript 2 programmer so everything is new to me in actionscript 3.

    actually i just seen you cant put actionscript for iOS...is that true?
    well to develop this for android i have this code.
    but when i hit the button nothing plays, yet it plays find on the computer.
    import flash.events.MouseEvent;
    import flash.media.Sound;
    import flash.net.URLRequest;
    Multitouch.inputMode=MultitouchInputMode.TOUCH_POINT;
    var mySound1:Sound = new Sound();
    var mySound2:Sound = new Sound();
    var myChannel:SoundChannel = new SoundChannel();
    mySound1.load(new URLRequest("myFavSong.mp3"));
    mySound2.load(new URLRequest("myFavSong2.mp3"));
    mission_btn.addEventListener(TouchEvent.TOUCH_TAP, onClickPlay1);
    stop_btn.addEventListener(TouchEvent.TOUCH_TAP, onClickStop);
    ntl_btn.addEventListener(TouchEvent.TOUCH_TAP, onClickPlay2);
    function onClickPlay1(e:TouchEvent):void{
              myChannel.stop();
              myChannel = mySound1.play();
    function onClickPlay2(e:TouchEvent):void{
              myChannel.stop();
              myChannel = mySound2.play();
    function onClickStop(e:TouchEvent):void{
    myChannel.stop();

  • I'm trying to play Symbol A and it's nested Symbol B and C with one button, and play Symbol B and C without playing Symbol A with a second button...

    I can't seem to get the nested symbol to play without it's parent playing too.
    This works for getting both symbols to play on button 1
    sym.getComposition().getStage().getSymbol("marketing_buttons").getSymbol("online").play();
    sym.getComposition().getStage().getSymbol("marketing_buttons").getSymbol("promotions").pla y();
    Everything I've done to play just B and C play all three. Is what I'm trying to do even possible?
    Thanks in advance.
    -h

    sym.getComposition().getStage().getSymbol("marketing_buttons").getSymbol("online").play();
    sym.getComposition().getStage().getSymbol("marketing_buttons").getSymbol("promotions").pla y();
    This works now to play all three from one button. With a different button, I want to play just the nested "online" and "promotions", plus add an completely new animation to both. All without effecting the animation in "marketing_buttons".

  • How do I include an entire hour-long performance on a DVD and also have menu buttons for playing isolated sections of the performance?

    How do I include an entire hour-long performance on a DVD and also have menu buttons for playing isolated sections of the performance?
    So far, I've already done the individual menu buttons for sections of the performance. How do I set up some kind of "play" button that will play the video of the entire performance straight through? Will this be too much material for the DVD to hold? Does the program recognize and not replicate material to save space? If so, will it interfere with that if  I add edits to individual sections that will not be in the video of the entire performance?   

    Hi
    If You only need
    • Play movie in full
    • Start into the movie at specific places e.g. Chapters - then play to movie ends
    Then this is fairly simple - Just add Chapters in Your Video-editor (iMovie or FinalCut)
    (some quirks to keep in mind - No Chapter mark in any transition or within 2 sec from it - AND - only Lettera A to Z and 0 to 9 - no other letters/symbols at all)
    BUT
    If You want to
    • Play full movie (with or without Chapters)
    • Play an individual Chapter then return to Menu
    This function is not standard in iDVD - but has to be faked one way or another.
    Please read my notes on this and be aware of the 60 minutes / 12 minutes limit in iDVD (THIS is including the Menu and it can take 15 minutes or more from the movie time)
    Play all resp one chapter at a time
    Play All Button
    1. There are NO - Play All - button in any version of iDVD
    2. It can be faked in several ways
    • Easiest and most fault proof way is to make a doublet movie containing All and with
    Chapters set to match. It will take up x2 space but is easy to understand and produce.
    Cons: Tried this in iMovie’11 by Exporting out each part as a full Quality QT.mov then Importing back into new events and putting these into a new project (Play All project). Resulting DVD had Audio that was OK (as parts) - BUT the picture was very bad and standing photo were cut of in hight. So the Play All movie has to be created from same material and exactly in the same way as the individual parts + then Chapters has to be set to match.
    • It's said that one can put all movies into a Photo/SlideShow and this will also
    give the function of a Play All button - Tested - and ONE HAS TO un-cheque - Scale pictures to TV-Safe area else it will be a black frame all around and a small picture !
    Cons: BUT - When tested with music videos - the same video on main Menu played nicely with OK Audio. The Play All version in SlideShow had a signifcant Distortion - as on telephone or worse.
    Mike Evangelist1
    You might be able to get close to what you want by using a slideshow in iDVD. (It's not widely known, but you can put videos in a slideshow.) If you set the slide duration to manual, playback will pause after each movie/slide, and you can continue with the 'next' button.
    3. Using another program to do this e.g.. Roxio Toast™ where there is a Play All button option.
    Summary
    a. Making a Play All movie with same care as the individual Part movies - gives a very Good Result
    b. Using Roxio Toast™ - also an usable way to go
    Yours Bengt W

  • Simple button script not working

    I am using AS2 and need help figuring out why this simple button script is not working:
    stop();
    buttonWS1.onRelease = function(){
                        gotoAndStop("Stage1and2_Boss",4);
    buttonWS2.onRelease = function(){
                        nextFrame();
    //end
    My buttons are the square letter-puzzles below. They are images that I converted to "symbols" (specifically, buttons). I put their names as above (buttonWS1, buttonWS2, etc.) in the "instance names" boxes.
    I have no idea what is going on. Please help!

    Hi -
    1. Yes, buttonWS2 is the instance name
    2. The only code attached to it is the code I pasted above.
    3. onRelease does not execute because my trace statement does not appear in the output
    Here is the modified code for buttonWS2:
    buttonWS2.onRelease = function(){
                        trace("clicked!");
                        nextFrame();
    Question: It shouldn't matter if I have commented-out code within that set of codes should it?:
    buttonWS2.onRelease = function(){
              //if (puzzleschosenarray[0] == 2 || puzzleschosenarray[1] == 2) {
              // cannot be chosen -- make button non-functional
              //else{
                        //puzzleschosenarray[roundnumber-1] = 2;
                        trace("clicked!");
                        nextFrame();

  • Simple button not functioning?

    I've been staring at this code for an hour. Maybe I need a break? This is a very simple button that just won't accept my touch events.
    I have a movie clip. It's instance name is "boardA." The name of the symbol is "letterA" and it is linked to a class file called "Letters" (which is properly linked, I checked).
    This is the code in the class file:
    public function Letters() {
                this.addEventListener(TouchEvent.TOUCH_BEGIN, createLetter);
                trace (this.letter);
            public function createLetter(e:TouchEvent): void {
                trace ("You clicked it!");
                trace ("eName = " + e.target.letter);
    Yet nothing happens when I click the button. The constructor for the file never executes.
    I even moved the touch event to the main frame "boardA.addEventListener(TouchEvent.TOUCH_BEGIN, createLetter)" and it still didn't work. Nothing when I touch the button.
    What am I missing here?
    Thanks
    Amber

    No. Letters.as is in com/freerangeeggheads/spellmaster. It's linked as such - here is the text.
    The base class is: com.freerangeeggheads.spellwhiz.Letters
    The class is: letterA
    When I click the green check box it tell me it can find the class, and when I click the edit class button it takes me to the proper script file.
    I also have the file imported into my main frame.
    This is the Letters.as file:
    package  com.freerangeeggheads.spellwhiz {
        import flash.display.*;
        import flash.events.*;
        import com.freerangeeggheads.spellwhiz.*;
        public class Letters extends MovieClip {
            public var letter:String = "";
            public function Letters(): void {
                this.addEventListener(TouchEvent.TOUCH_BEGIN, createLetter);
                trace (this.letter);
            public function createLetter(e:TouchEvent): void {
                trace ("You clicked it!");
                trace ("eName = " + e.target.letter);
    Thanks!

  • Simple button help needed!

    I want to make a simple round button that glows when you
    mouse over it and depresses when you click it.
    Apparently to do this I need to use Filters to make the glow
    and bevels. But Filtersonly work on movie clips, buttons and text.
    So I make a circle and convert it into a button symbol
    (Btn1). Then I make another button symbol (Btn2) and use the first
    button symbol (Btn 1) on the Up Over and Down frames of Btn 2.
    Assorted Filters are applied to Btn 1 on the Up Over and Down
    frames to get the effects I want.
    I test the button (Btn2) using Enable Simple Buttons. It
    works perfectly - glows on mouse over and depresses on click. Then
    I try Test Movie -- and the button doesn't work!!!
    Not does it work when exported as a SWF file!!!
    I watched a tutorial video that came with my Flash Pro 8
    Hands-On-Training (HOT) book and he used pretty much the same
    technique -- except he only tested his button with Enable Simple
    Buttons. I'll bet my house his didn't work with Test Movie either!
    The stupid thing, is I was just able to achieve exactly what
    I wanted very quickly using LiveMotion 2!
    What is wrong here? Why is it so impossible to create a glow
    button in Flash? Why has it been easy in Live Motion for years?
    All help appreciated!
    Thanks
    craig

    I thought the nesting button situation might be the problem
    BUT there is no other way to apply Filters to Up, Down, etc. Also,
    a freaking tutorial book described that as a valid method, but
    obviously it ain't.
    I tried using movieclips as well but basically had the same
    problem.
    I mentioned LiveMotion 2 because that ancient program can do
    easily what Flash Pro 8 seems incapable of.
    What is the logic behind not allowing Filters to be applied
    to simple graphics? It's absurd!
    There's got to be a way...

  • Can't switch buttons when playing on a dvd player

    I searched the discussions and was unable to find an answer to my problem.
    How do you get the dvd to select different buttons when played on a dvd player? When I play the dvd on a computer the buttons are highlighted when the mouse is placed on them, but when I play the dvd on a dvd player, I can't get it to navigate through the different buttons on the menus. I can only select the first button on the page. I'm sure this is a simple fix, but I can't seem to figure it out. Any help would be greatly appreciated.
    Thanks,

    Choose the button and go into the advanced tab in the inspector. You can then set the Up, Down, Left and Right function for your dvd buttons. DVD SP will set it up automatically if you like BUT if you have a more complex menu you can set your button navigation manually. Manually gives you a little more control and creativity. When you simulate in DVD SP the buttons will highlight as if on a computer if you use your mouse. If you were to use the button keys (up down arrows) in the simulator you would notice they don't work either. Set you button navigation in the advanced tab in the button inspector...

  • On my ipnone 3gs the ipod play symbols appear on screen in locked mode???

    when my ipnone 3gs is in lock mode, sometimes the play symbol from the ipod apperas on top half of the screen? anyone know why is it doing this? please help

    Double-tapping the "Home" button at the bottom of the iPhone when in locked mode displays/hides the play/pause etc symbols, so that you can control your music without having to unlock your phone

  • Play symbol from label to label

    Hi all!
    I'm looking for a simple way to play a symbol from one label to another. it seems pretty basic to me, but I couldn't find a simple solution in Edge API or online.
    I'm looking for a simple bind function if available, nothing with trigger functions inside the symbol's timeline with some kind of if statements and stops. I'm trying to avoid that.
    So if you guys know of a built-in function that does that, ill be happy to hear it! and if there is none, Adobe needs to get on that, cause it's called for.
    cheers! thanks!
    Asaf

    I am wondering what you are trying to do.
    It seems to me that you should just use a stop where you want the animation to stop and play a label directly after the stop. This way your animation would play from that label to almost the next label. Not sure I am making sense.
    Example   label1   stop(); label2 stop()    label3() stop();
    When playing label2 it would play until reaching the stop right before label3 - I assume you would not have a difference in the animation between a label and a stop.
    sym.getSymbol('symbolName').play('label2');

  • Creating a simple button in CS4...I'm missing something

    Okay....I'm just trying to create a simple button to test. I create a square, convert it to a button symbol. I click on the button and open the Actions window. The window says "current selection cannot have actions applied to it." Have I missed a step? I can add an action to a keyframe okay, but when I click a button, even just a simple button, it will not allow me to add an action to it?
    Anybody know what I'm missing?

    again, you cannot attach code to objects in as3.  you are going to attach code to a frame or you're going to create external as files/class files and i'm pretty sure that will be a bigger jump out of your comfort zone than attach code to a frame.
    you've already given your button an instance name (mybutton), so attached to the first frame that contains mybutton, in the actions panel paste the following:
    mybutton.addEventListener(MouseEvent.CLICK,f);
    function f(e:Event){
    navigateToURL(new URLRequest("http://www.adobe.com"));  // better to use adobe than apple in this forum.

  • Simple click to play flash player?

    I'm trying to create a simple click-to-play function for a
    flash movie, so I don't have to use a whole player skin. Is there a
    simple way to do this?

    Do you mean a way to control a video without a skin?
    First create a play button, move it to the stage, give it an
    instance name like vidplay.
    Give the flv playback component an instance name like vid and
    use the following AS on the frame:
    vidplay.onPress = function(){
    vid.play();
    dats it

  • Button inside a symbols

    Hello
    I have a button inside a symbol and I would when you click to play this symbol.
    The symbol is "Anim_Perso".
    https://creative.adobe.com/file/47b82617-3124-4eab-9482-ac94b30674c4
    https://creative.adobe.com/file/47b82617-3124-4eab-9482-ac94b30674c4
    Thank you
    Stephane

    Hi there.
    Inside your symbol, uncheck Autoplay and, on the button's actions panel, select click and add this line of code:
    sym.getComposition().getStage().getSymbol("Anim_Perso").play();
    pmfr

  • Simple Button Hit Zone not working

    I am somewhat new to Flash CS4 andt am having a problem making simple buttons in Flash CS4 on a Macintosh: I have made a few buttons with a graphic and can go into them and successfully create the Up, Over and Down stages of the graphic. Then when I create a new box for the hit state (which is larger than the graphic and I have deleted the graphic itself from the hit state) it doesn't want to appear correctly when I test the movie. When I test the movie, the hit state is correct everywhere around the graphic (to the bounds of my hit state box), but is not active where the graphic is. When I go under the Control menu, down to Enable Simple Buttons, the hit zone looks great right in my Flash file, but when I preview it or publish it and look it on different browsers (PC and Mac), I don't get my pointer right over the actual graphic, but get it everywhere around the graphic to the boundaries of my hit box. Why can't I get the actual graphic to be a hot spot in this situation? I have tried leaving the graphic in the hit timeline, and tried putting both the larger box and the graphic in the hit timeline, and still can't get them to respond correctly with the pointer in the browser window. Thank you....

    Well, since the graphic itself doesn't activate my pointer in a web browser, I thought maybe I needed to add both the box and the graphic itself to the hit state. That's what has me puzzled - the box that I use for the hit zone is "active" everywhere but where the actual graphic is...

  • Simple button problem

    I am having a real problem creating a simple button - I have
    created a Flash file using Action script 2, and when I create a
    simple button - text with a rectangle as a background, (see
    http://www.elkhavenestate.com),
    and the over state is behaving in a bizarre fashion. This is my
    first time using CS3, so is there a new control that I'm
    missing?

    I take it that it's the Home button. It appears to have a
    selectable text field or something in it, which is causing the
    problem. Either change that to a static text field or set its
    selectable property to false. The other two buttons appear to be
    fine, so maybe you can just duplicate one of them and turn it into
    the Home button.
    If I picked the wrong button, let me know.

Maybe you are looking for