Button symbol "Hit" duration

I have a button which has two appearances in the button symbol editor.
On the "Over" frame there is a highlighted rectangle for mouse hover - works great.
On the "Hit" frame I have added some type (a short sentence to indicate the user has selected incorrectly, that they have hit the wrong button), and I have a short sound to help with feel/feedback - this works great also.
However - the type on the "Hit" frame only shows during the very short instant while the mouse is clicked, or if the mouse is held down the type will show and the sentence can be read. - This is not great.
Basically I need a longer duration for the appearance that is in the "Hit" part of the button instance to show slightly longer; say one second , long enough for the type to be read.
These Buttons are used at a point in the timeline where the action has been stopped; the user clicks incorrect answers until they select the correct button and are brought to a later part of the timeline/movie.
Is there a way to lengthen the duration of the "Hit" state of a button symbol?
Currently using Flash CS4.

You cannot place code in the inner timeline of a button symbol... visuals only.
Load from library
First you need to designate the object in the library as an item that can be loaded dynamically.
Right click on it in the library and select Linkage from the menu that appears. In the interface that appears, select Export for Actionscript. A Class name will automatically be assigned, which you can change as you like (lets just say you name it MyObject). This is the name you will use to call in the item from the library.
When you click OK to close that interface, it may come up with an indication saying it can't find the class so it will create one at complie time... click OK there to.  You're done preparing the object in the library.
To add the item to the stage, treat it like any other new object instance:
var newObject:MyObject = new MyObject();
newObject.x = .... etc...
this.addChild(newObject);

Similar Messages

  • GS-12: Creating button symbols | Learn Flash Professional CS5 & CS5.5 | Adobe TV

    Create a button symbol from text, a bitmap image, or a vector shape. Define keyframes for the up, over, down, and hit states of the button, and swap out the artwork for the different states.
    http://adobe.ly/AsOppx

    I am watching the tutorial over "creating button symbols." When it gets to the part where while in the over keyframe you are supposed to click on swap, my properties panel looks different and does not have a swap button. Any suggestions?

  • ComboBox and button symbol interaction

    (Sorry-- I had this posted in ActionScript as well -- not
    really an AS issue...)
    I thought it would be easier for folks if they didn't have to
    create this from scratch:
    Here is the
    Sample
    SWF
    and the
    Souce
    FLA
    Greetings --
    I traced back a bug that I was having to its most basic level
    and was surprised that it happens with only a ComboBox component
    and a button symbol... I traced it back so far that it got rid of
    all of my ActionScript and was left with only these two interface
    elements:
    Set-up: Create a new Flash document, ActionScript 2 / Flash
    8. Drag in a combobox component and add a label. Create a new
    button symbol and define up, over, down and hit states and drag
    this in as well...
    When you try test this movie, you get strange behavior...
    Give the button a few clicks to see that it is working properly.
    Then, click on the combobox to open it and then go back to the
    button. The button will work the first time tried, but will not
    work properly with subsequent attempts. It seems that the states of
    the button are getting confused after the combobox is used?
    (help!?)
    Could there be a work-around to this? Thank you in advance
    for you assistance with this issue...!

    I have Flash Player 9 (9,0,115,0) on my Mac, and am getting
    the same behavior on Windows XP...
    Perhaps try not moving the mouse between subsequent clicks
    will make it more apparent... I select something from the combobox.
    Then, the first click on the button works properly... but when you
    release the button (and don't move the mouse) it returns to the "up
    state" (not "over state"). Additional clicks don't respond with a
    "down state"... it just flashes the "over state" momentarily.
    It's causing me troubles because my interface asks users to
    first select from a combobox to navigate and then they can click to
    subsequent items with a button: next, next, next... to page through
    the selection. But this strange interaction is hanging up the next
    button on the second click (it never gets the down state).
    Thanks for checking it out... I sure would appreciate any
    thoughts on the matter...

  • Putting Hyperlinks into Flash Button Symbols

    Hi there,
    I just wanted to know how to put Hyperlinks into Flash Button
    symbols
    For example;
    I have a button which is named Home, and i have the UP, OVER,
    DOWN and HIT stages and wanted to put a
    Hyperlink to lets say Google so www.google.com.au and wanted
    it to open in the same page not a new tab.
    And if possible would like to know how to put multiple
    Buttons as one Flash File and have them all Hyperlinked to
    DIFFERENT Pages.
    I know very little Actionscript, but know what it is and
    other basics on it.
    I am using Adobe CS3 Flash 9 and would prefer a simple
    answer, Thank You

    Hi,
    There is a video tutorial for this on my website below.
    Hope this helps.
    Thanks
    Alan

  • Embedding Button symbol from swf

    Hi,
    I am embedding a Button Symbol into Flex from from a swf. The Button inside the swf has an up and over state. Now I embed the symbol into an image in Flex. The image is in one of my states.
    All works fine initially  in Flex as far as the up over state. Now the  The problem is when I go back to the base state and then back to the state with the embedded swf symbol.....it initializes still in the over state, until I mouse over then mouse out and now its in the Up state.   What could be the probelm here??
    thanks for taking time to look at this!
    -Mike
    // -- SWF EMBED ---
                [Embed(source="skins/ICD9_ReferenceCodes_v2_3_blue.swf", symbol="back_btn_button")]
                [Bindable]
                public var BadApple:Class;
    // -- SWF EMBED END --
    <mx:State name="search_code">
                <mx:RemoveChild target="{vbox1}"/>
                <mx:SetProperty target="{text1}" name="text" value="Code Search:"/>
                <mx:SetProperty target="{text1}" name="x" value="130"/>
                <mx:SetProperty target="{text1}" name="y" value="136"/>
                <mx:RemoveChild target="{image1}"/>
                <mx:AddChild position="lastChild">
                    <mx:Image  id="image_BackBtn1" x="11" y="74.95" source="{BadApple}"
                              click="OnClickNewSearch(event)"
                              />
                </mx:AddChild>
                <mx:SetProperty target="{image_BackBtn1}" name="y" value="74.95"/>
            </mx:State>

    Alex,
    I'm not  following  you, why do I need a button?.....can create Mouse over and out events like this?:
    var event:MouseEvent = new MouseEvent(MouseEventMouseEvent.MOUSE_OVER.);
    myImage.dispatchEvent(event);
    var even2t:MouseEvent = new MouseEvent(MouseEventMouseEvent.MOUSE_OUT.);
    myImage.dispatchEvent(event2);
    would this work?
    BTW any idea if this is a Bug or known issue that I'm experiencing?
    -Mike

  • JSAPI: How can I edit a button symbol?

    Hi,
    I have written an export script for Flash CS3 using the
    Javascript API, and now I want to port it to Fireworks CS3. The
    first problem I ran into was that I could not access a button
    symbol's state frames via script - the closest I get is up to the
    Instance object, but I could not access the frames or layers
    inside. I used a for-each-loop to trace all of the Instance
    object's properties but did not find anything that could have
    helped me.
    Then I had another idea: I noticed that unlike Flash,
    Fireworks opens button symbols as a new document when I edit them.
    And the Fireworks Document object does indeed have a property
    called "isSymbolDocument" that returns true if a document "is a
    symbol-editing window."
    But once again I stumbled upon a problem, namely that I did
    not manage to find a "symbol editing command" (the equivalent to
    double-clicking it) in the Javascript API. :(
    I'd be grateful for any hints, maybe there is even a much
    easier way to access button symbol states?
    Greetings,
    Jochen

    I'm not sure if I fully understand your question, but I'll give a shot at what I think it is. If you want a button that can be pressed so that its states go from
    "on, off, red., on, off, red." etc. you will have to use a bit of trickery. In this case it is best to use a picture ring to give the controls the image you want and place a boolean button OVER the ring control. Make the boolean control completly transparent, resize it to cover the entire picture ring, and make sure the boolean is ABOVE the ring by using "move to front". You will then have to have a loop checking the boolean button for a press, and then modify the pic ring accordingly and take your "control value" off of the pic ring. I'd suggest finding a work-around if you can, as this is a lot of work to go
    through.

  • Mask layers in button symbols not working?

    Hi!
    I am making a button symbol with many graphical elements
    placed in separate layers. I also want to use regular (not
    scripted)mask layers inside the button symbol but it doesn't work
    when I test the movie. In the authoring environment tha masking
    effect shows up properly but when I test the movie it just stacks
    the layers on top of each other as regular layers.
    Is this a bug? In previous falsh versions I think this method
    was working fine.
    Why is this happening? Attila

    reinhat wrote:
    > Hi!
    > I am making a button symbol with many graphical elements
    placed in separate
    > layers. I also want to use regular (not scripted)mask
    layers inside the button
    > symbol but it doesn't work when I test the movie.
    that is correct. If you search the forum by "mask button" you
    will find posts
    going back many years saying that flash does not support
    masking within button.
    To work around that limitation, you can place your mask in
    movie clip and than
    that clip inside a button.
    Regards
    Urami
    Happy New Year guys - all the best there is in the 2006 :)
    <urami>
    http://www.Flashfugitive.com
    </urami>
    <web junk free>
    http://www.firefox.com
    </web junk free>

  • How do I make this program generate a new problem once the button is hit

    Here is the code... appreciate any help given
    How do I make this program generate a new set of problem when the "NEXT" button is clicked and continue until the END button is hit
    package javaapplication3;
    import java.awt.GridLayout;
    import java.awt.Window;
    import javax.swing.*;
    import java.awt.event.*;
    * @author Sylvester Saulabiu
    class Grid extends JFrame{
        final int score = 0;
        final int total = 0;
        Grid(){
            //Set Layout of Flashcard
            setLayout(new GridLayout(4, 4, 2 , 2));
            //Create Panels
            JPanel p2 = new JPanel();
            JPanel p3 = new JPanel();
            final JPanel p1 = new JPanel();
            //Create Radio buttons & group them
            ButtonGroup group = new ButtonGroup();
            final JRadioButton ADD = new JRadioButton("Addition");
            final JRadioButton SUB = new JRadioButton("Subtraction");
            final JRadioButton MUL = new JRadioButton("Multiplication");
            final JRadioButton DIV = new JRadioButton("Division");
            p2.add(ADD);
            p2.add(SUB);
            group.add(ADD);
            group.add(SUB);
            group.add(MUL);
            group.add(DIV);
            p2.add(ADD);
            p2.add(SUB);
            p2.add(DIV);
            p2.add(MUL);
            //Create buttons
            JButton NEXT = new JButton("NEXT");
            JButton END = new JButton("End");
            //Create Labels
            JLabel l1 = new JLabel("First num");
            JLabel l2 = new JLabel("Second num");
            JLabel l3 = new JLabel("Answer:");
            JLabel l4 = new JLabel("Score:");
            final JLabel l5 = new JLabel("");
            JLabel l6 = new JLabel("/");
            final JLabel l7 = new JLabel("");
            //Create Textfields
            final JTextField number = new JTextField(Generator1());
            final JTextField number2 = new JTextField(Generator1());
            final JTextField answer = new JTextField(5);
            //Add to panels
            p1.add(l1);
            p1.add(number);
            p1.add(l2);
            p1.add(number2);
            p1.add(l3);
            p1.add(answer);
            p1.add(l4);
            p1.add(l5);
            p1.add(l6);
            p1.add(l7);
            p3.add(NEXT);
            p3.add(END);
            //Add panels
            add(p2);
            add(p1);
            add(p3);
            //Create Listners
      NEXT.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
             int answer1 = 0;
             //Grab the numbers entered
             int numm1 = Integer.parseInt(number.getText());
             int numm2 = Integer.parseInt(number2.getText());
             int nummsanswer = Integer.parseInt(answer.getText());
             //Set the score and total into new variabls
             int nummscore = score;
             int nummtotal = total;
             //Check if the add radio button is selected if so add
             if (ADD.isSelected() == true){
                 answer1 = numm1 + numm2;
             //otherwise check if the subtract button is selected if so subtract
             else if (SUB.isSelected() == true){
                 answer1 = numm1 - numm2;
             //check if the multiplication button is selected if so multiply
             else if (MUL.isSelected() == true){
                 answer1 = numm1 * numm2;
             //check if the division button is selected if so divide
             else if (DIV.isSelected() == true){
                 answer1 = numm1 / numm2;
             //If the answer user entered is the same with th true answer
             if (nummsanswer == answer1){
                 //add to the total and score
                 nummtotal += 1;
                 nummscore += 1;
                 //Convert the input back to String
                 String newscore = String.valueOf(nummscore);
                 String newtotal = String.valueOf(nummtotal);
                 //Set the text
                 l5.setText(newscore);
                 l7.setText(newtotal);
             //Otherwise just increase the total counter
             else {
                 nummtotal += 1;
                 String newtotal = String.valueOf(nummtotal);
                 l7.setText(newtotal);
      //Create End listener
    END.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            // get the root window and call dispose on it
            Window win = SwingUtilities.getWindowAncestor(p1);
            win.dispose();
    String Generator1(){
         int randomnum;
         randomnum = (1 + (int)(Math.random() * 20));
         String randomnumm = String.valueOf(randomnum);
         return randomnumm;
    public class Main {
         * @param args the command line arguments
        public static void main(String[] args) {
            // TODO code application logic here
            JFrame frame = new Grid();
            frame.setTitle("Flashcard Testing");
            frame.setSize(500, 200);
            frame.setLocationRelativeTo(null);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setVisible(true);
    }Edited by: SirSaula on Dec 5, 2009 4:39 PM

    Extract code into methods, so that when an action is performed a method is called. That way you can reuse the method for purposes such as resetting textfields to their default values, scores to default values, etc.
    You can go one step further and seperate the GUI layer from the processing layer, by deriving classes that for example maintain and calculate a score.
    Mel

  • There is a infinity loop when the 'Accept' button is hit in the Terms of Use of the Icloud in the Apple TV.

    There is a infinity loop when the 'Accept' button is hit in the Terms of Use of the Icloud in the Apple TV. Does anybody know how to solve it?

    My region is set to Australia (which is correct) Still getting the loop when trying to accept iCloud terms and condition son apple tv.

  • Button Symbol and text change.

    Hi,
    I have a button symbol with an Instance name of myButton that
    has a text field in it. The text field is dynamic and an Instance
    name of myText.
    I'm trying to change the text from a class I've created like
    so...
    myButton.myText.text = "Changed Text";
    I'm getting this...
    1119: Access of possibly undefined property myText through a
    reference with static type flash.display:SimpleButton.
    Can someone please tell me where I'm going wrong please.
    Thanks in advance for any help.
    Regards
    Simon.

    Is the TextField added in design time - that is you placed it
    using the Flash IDE? In that case you might not be able to
    reference it.
    Rather you need to add it in a DisplayObject container during
    runtime using the various SimpleButton state properties such as
    downState and upState. See the example at SimpleButton doc.
    SimpleButton

  • Flash Button Symbol with As3 - Relevant or not!

    I see no point of using Buttons symbols anymore as i script in AS3 using MovieClips and instance name.
    Simple question: can we send Button Symbols in the limbs?
    Thanks for answering this easy one, maybe not so easy after all....

    Some people never use button symbols and have always used movieclips instead, so whatever the limbs might be, your buttons could probably be sent there.

  • Cannot add an action after I select my "Button" Symbol

    Ok, I have been following a whole bunch of tutorials, and a
    lot of the tutorials I've found are using Flash 8. I downloaded the
    trial for Flash CS3 and when I'm following the tutorial on adding
    an action, or link, to a button, they say...
    "Click the button"
    "Hit F9, to open the actions panel"
    Then for them, the action panel opens up and gives them the
    ability to add an action to their button, and in the upper left
    corner tab, they say to MAKE SURE IT SAYS "Actions - Button" and
    NOT "Actions - Frame"
    Well, in Adobe CS3 and actionscript, if I click on the button
    and hit F9, the action panel opens up, but I can't add an action to
    the button for some reason. I can only add it to "Action - Frame".
    Am I doing something wrong or what because I follow the
    tutorial exactly, but it seems like something changed in
    Actionscript 3.0 verses 2.0.
    If I Open a new file using Actionscript 2.0, everything works
    ok with the tutorial, but if I open a file withh 3.0 and try adding
    an action to a button, it doesn't work. Could anyone help me please
    or tell me what I'm doing wrong, thanks.

    AS3 no longer supports the attachment of code to Object
    instances, and requires code to be placed on the timeline, which is
    proper. Additionally, you will need to use the eventDispatcher
    model to 'connect' a responding function to the event and add an
    'event listener' to the Object. So basically the format for AS3
    code is something like:
    function stopTheThing(event:MouseEvent) {
    stop();
    my_btn.addEventListener(MouseEvent.CLICK,
    stopTheThing);

  • Ibook give power button symbol and forces shut down...why?

    I will be using my ibook for maybe 5mins less sometimes, and then all of a sudden the whole screen goes grey and a box with the power button symbol comes up and says that i have to forcable shut down my computer. This happens even when plugged in and its says the computer battery is fully charged.
    Any clues???

    This message is called a kernel panic, and some troubleshooting suggestions are available here.
    (14677)

  • How do I install recommended updates, when I click on adobe flash plugin update now buttons, I hit a dead end on oracle's website, how do I complete the update?

    How do I install recommended updates, when I click on adobe flash plugin update now buttons, I hit a dead end on oracle's website, how do I complete the update?

    First, grab the Adobe uninstaller from here:
    http://helpx.adobe.com/flash-player/kb/uninstall-flash-player-windows.html
    Then download Flash 10.3.183.90 from here - about halfway down the page:
    http://helpx.adobe.com/flash-player/kb/archived-flash-player-versions.html
    (Released 6/11/2013) Flash Player 10.3.183.90 (61.1 MB)
    IMO, the best version of Flash for WinXP. Adobe kept up with security updates for 10.3 for WinXP users long after Flash 11.0 came out in 2011 for Vista and newer versions of Windows.
    Run the uninstaller, then reboot your operating system.
    Then you can run the Flash installer, with Firefox closed, of course.
    ''Note, if you still use IE you'll need to reinstall the ActiveX version of Flash for IE. That uninstaller removes all versions of Flash that might be installed,''

  • Button Symbol Editting Mode

    I am new to Flash CS4 and have been practicing creating buttons. I am using a JPEG image for the actual button. The image changes color and size depending on the up state or down state or over state. Everything looks exactly as I want it but now I wish that I would had added text next to the button to let the user know what the button does when they mouse over. Herein lies my question. If I go back into the button symbol editting mode, can I add some text next to the JPG for the "over" state? That way when the user mouses over that "contact us" would appear off to the side of the button? Thanks!

    Some things are easiest resolved by trying.  Yes, you can put just about anything you want in a button frame.  You can add extra layers if it makes it easier to isolate different pieces.

Maybe you are looking for

  • Measuring point and characteristics

    what are the measuring points and characteristics to be created for the thermal power station , sap plant maintenance

  • Why am i having problems since changing from snow leopard loading maverick

    why am i having problems since changing from snow leopard downloading maverick

  • Exception whiling sending the  message to XI..

    Guys,   Here is what we have: We have a ICWC application, where in the agents enter some data about the customer. As soon as the agent saves the customer data,  a function module defined at the back end system  is called. The function module at the b

  • How do I add jpg file extension?

    I recently exported some photos from iPhoto. Some of the photo thumbnail's have normal thumbnails and some only show up as white squares. I searched for these files and they look the same way in the iPhoto Original folder. The files that don't have a

  • 10.4.6 Finder forgets "open with program " entry

    Working well since 10.2 now in 10.4.6 my selection "open file with <my REALbasic program>" in the Info-window works only once; when I have stored the file again, then the opening program-selection toggles back to the former (wrong) program - in my ca