Contolling a button instance

Ask a Question related to Macromedia Flash Actionscript, Design and Development.

  1. #1

    Default Contolling a button instance

    I thought that one of the new things in scripting w MX was the ability to talk
    to button instances just as you do to Movie clip ones. For some reason I am
    having a hard time getting this to work.

    I am trying to move the play head in a button instance to oh lets say the 6th
    frame
    (obviously my button has 2 more frames with graphics in them that are after
    the 4 standard frames).
    Normally if it was a Movie Clip I would use dot syntax to say something like:
    _root.MovieClipInstanceName.gotoAndStop (6);

    Can I do the same w/ a button instance?
    like this:
    _root.ButtonInstanceName.gotoAndStop (6);

    So in an example I would have 2 buttons on the stage
    the 1st button would make the 2nd buttons play head to go the 6th frame in
    that button.

    HELP?



    J-DAX Guest

  2. Similar Questions and Discussions

    1. Problem with dynamic text inside button instance
      Hi people I want to have dynamic text inside the button because when my program initiates, it loads the data (from XML file) to put inside the...
    2. New Instance button does not do anything
      I recently installed Flash Media Server on a Linux machine to test it before buying. The install went smoothly and I was able to connect to the...
    3. New Instance button does nothing
      Did you ever get this to work? I just installed FLash server and i am getting the same thing. No documentatino, no nothing. Not sure what to do.
    4. Embed button instance inside movie clip
      Hi people Currently, I have created an empty movie clip, and loaded it with a jpeg picture. Something like this.. ...
    5. Contolling Browser windows
      HELP I am trying to controll the parametres of a browser window that i open from a flash web site. I have tried doing this with javascript but can...
  3. #2

    Default Re: Contolling a button instance

    buttons do not have timelines,
    the first 3 frames simply act as placeholders
    for button content ( graphics,text,mc's)
    the hit frame holds the hotspot area and is never seen,



    Jack. Guest

  4. #3

    Default Re: Contolling a button instance

    Jack,
    Thank you for that very descriptive narative on buttons.

    However, since you can mannualy switch the property of a button instance to a
    'graphic' and then tell it what frame to send the playhead to in that buttons
    timeline (for lack of a better word), I am looking for an action scripting
    solution to provide me w the same result on a different buttons on release
    comand.

    I know its possible to 'talk' to these button instances telling it to do other
    things.



    J-DAX Guest

  5. #4

    Default Re: Contolling a button instance

    If you want to use that you should use a movie clip instead of a button. The
    only difference is that you MUST have a stop() action and write the code for
    the events.
    Ex: on(RollOver){} , on(RollOut), on(Press) etc etc
    If you do this then you can send the play head to whatever place you want
    within the movie clip button

    Neo75 Guest

  6. #5

    Default Re: Contolling a button instance

    Neo,

    I am familliar w/ that concept and have used many times in the past.
    What I am trying to do here is use one of the NEW features that scripting in
    MX has regarding button instances and being able to controll them.

    Still looking........

    J-DAX Guest

  7. #6

    Default Re: Contolling a button instance

    for the functionality you seek, buttons are useless. use movieclips.

    there is a way to make a clip act as if it were a button,
    Frame#1 // frame label _up and stop();
    Frame#2 // frame label _over
    Frame#3 // frame label _down
    use these labels or it will fail

    give the clip an instance name, and activate from main timeline,
    clip1.onRollOver=function(){ clip2.gotoAndStop("_down"); };



    Jack. Guest

  8. #7

    Default Re: Contolling a button instance

    for a full description of the methods available to the button object,
    check the Reference under -
    Objects > Movie > Button > Methods, Properties, Events
    Jack. Guest

  9. #8

    Default Re: Contolling a button instance

    Jack,
    Perhaps you didn't read my reply to Neo. (I know about using MCs instead)

    Without explaining my entire project scope, I am trying to find out if any of
    the
    new features avaialble in MX scripting that allow you to controll a button
    instance are possible in the simple example I set forth in the bottom of my 1st
    posting.

    I am familiar w/ the workarounds that have been suggested.

    Do you know about this feature I am speaking about?


    J-DAX Guest

  10. #9

    Default Re: Contolling a button instance

    Jack,
    OK ill take a look at the Reference.........
    To see if its the same info I read in the regualr help file.
    Thanks for your time
    J-DAX Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139