AS Button / hit state HELP!

I have a clip with a hit state that I want to target frame 1
of another clip on mouseover. (thumbnail effect) There is a stop
command on frame one of that secondary clip. On click , I want the
secondary clip to play from frame 2, till the end.
My problem is that Im not experienced with actionscript
button behaviors and determining which script commands to use is
confusing.
Can anyone link me or outline what needs to be done here?
Thanks

I prefer to work with mc's on this. The following are the
error codes that were generated.
**Error** Symbol=gallery shots, layer=g1 hit, frame=1:Line 1:
Statement must appear within on/onClipEvent handler
g1.onRelease = function(){
**Error** Symbol=gallery shots, layer=g1 hit, frame=1:Line 5:
Statement must appear within on/onClipEvent handler
g1.onRollOver = function(){
Total ActionScript Errors: 2 Reported Errors: 2
in this example I placed the btn graphic over the gallery
thumb on a separate layer.
Perhaps this requires a different approach because I'm not
seeing something here. (the following is not on the main timeline)
If I create a movie clip named gallery_mc from scratch and
place a thumb on layer 1, convert the thumb to an mc, open the
thumb mc and set the timline as follows: layer1 frame 1 (stop
action), layer 1 frame 10 (stop action), layer 2 frame 1 (static
image), layer 2 frame 2 (image begins tween), layer 2, frame 10
(image ends tween). being this is the thumb effect mc, the symbol
that i created with alpha 0% (is this refered to as the handler?)
should be placed on the thumb on the gallery clip stage. I believe
thats where is should be (on a different layer than the thumb pic
itself). the action should be placed on this symbol.
So there are two mc's in the example , the gallery mc
containing the thumb pic, and the thumb mc.
If this is false, then what would the layout be?
note : the main timeline already has a button link to the
gallery mc and works. I dont want to revert to button symbols to do
this. I prefer this new challenge with btn_mc's.
Thanks

Similar Messages

  • Button Hit State

    Hi,
    I'm trying to make a simple a button with a movie clip as the
    Up state, the same movie clip with a colour tint as the Over state,
    the same again but nudged down and to the right as the Down state
    and then movie clip broken apart so it is just the shape as the Hit
    state.
    I've done this loads of times before with Flash 8 which I was
    previously using and no problem, but for some reason now, the
    button is not affected unless the Hit state exceeds the size of the
    original button and then the only bits that react are the part
    outside of the main Up state. It's almost as though the Hit state
    is at the bottom of the stacking order...
    Has anyone come across this before or am I doing something
    wrong and don't know?
    Cheers

    change your hit-state to a simple solid shape that covers
    your up movieclip.

  • Button hit state inaccurate

    I have made buttons like this hundreds of times, and today it
    does not work.
    Only part of the button works, as if the hit state is
    undersized, but it is not.
    Totally puzzled and seeking advice please.
    It's the home button that only has a part hit state.
    Enable simple buttons works.
    Putting the button elswhere on the page works, just not
    there.
    Any tips are greatly appreciated, thanks.
    flash 7 osx.4.8
    http://www.stevez.biz/foto_fun/early_years/morefunnav.html
    http://www.stevez.biz/foto_fun/early_years/morefunnav.swf
    http://www.stevez.biz/foto_fun/early_years/morefunnav.fla

    Steve Zavodny wrote:
    > I have made buttons like this hundreds of times, and
    today it does not work.
    > Only part of the button works, as if the hit state is
    undersized, but it is
    > not.
    > Totally puzzled and seeking advice please.
    > It's the home button that only has a part hit state.
    > Enable simple buttons works.
    > Putting the button elswhere on the page works, just not
    there.
    > Any tips are greatly appreciated, thanks.
    "Enable simple buttons" never reflect actual functionality so
    don't use it
    if you want to make accurate testing. It's more for authoring
    convenience like
    you would make a map of different shape buttons and like to
    see how the
    OVER states align to each other. It will make button works
    even if it is not
    made properly.
    Your problem is that the HOME button comes on top of the
    invisible button
    and in flash HIT states can't collide or they will cancel
    each other.
    If you extend that invisible button down you will see the sub
    menu will
    work just fine.
    Best Regards
    Urami
    !!!!!!! Merry Christmas !!!!!!!
    Happy New Year
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Button hit state not working

    Hi, I made a few buttons for my .fla and all the states are working but the hit state.
    So just to see what the problem was I made a new button, which is only text at each stage, so for up i wrote up, down down etc,
    all the states work but hit, what gives???
    hit is after someone clicks it it should be at the hit state correct?

    Nope. Hit is the shape that will trigger a rollover/click area.
    Normally the hit state is determined by the artwork in the up state and then the over state once you've rolled over, but sometimes you need to override that with an area different area. That is the hit state. But you don't need to put anything there.
    Test it out. Make a circle on the other states and then put a larger square in the hit. Then check out how it works.

  • MovieClip buttons using e.target method "Under" transparent hit states?

    Hello guys, this is kind of the finale to a line of questions I have been pestering with for about a week. I have multiple buttons that scale up / scale down on rollover (mc btns actually). So, after a lot of help from all of you, I have everything functioning really well.
    My remaining hang up, is how to apply e.target (to abridge my code somewhat) when the movieclip button is now actually below the transparent hit states. (hit states are on the main timeline, buttons under them). Below is some sample code for two of these buttons, and like i said – they work fine, but now that I am trying to use external hit states to get rid of my bugginess, i notice the e.target functions are not being read, since I assume the button is under the hit states.
    the //berenson// below is the code that is speakin to the hit state and the //amylin// still has the previous coding applied to it (when the hit states were not being used quite yet.
    function rollover (e:Event){
        e.currentTarget.gotoAndPlay ("btnOver");
    function rollout (e:Event){
        e.currentTarget.gotoAndPlay ("btnOut");
    function select (e:Event){
        e.currentTarget.gotoAndPlay ("btnClick");
    //amylin//
    btn_amyCase.buttonMode = true
    btn_amyCase.addEventListener (MouseEvent.MOUSE_OVER, rollover);
    btn_amyCase.addEventListener (MouseEvent.MOUSE_OUT, rollout);
    btn_amyCase.addEventListener (MouseEvent.CLICK, select);
    //berenson//
    btn_berHit.buttonMode = true
    btn_berHit.addEventListener (MouseEvent.MOUSE_OVER, rollover);
    btn_berHit.addEventListener (MouseEvent.MOUSE_OUT, rollout);
    btn_berHit.addEventListener (MouseEvent.CLICK, select);
    thanks!

    yup, i was hoping that. However, my buttons were working flawlessly, then i applied the hit state layer, and i am losing the communication.
    But you are saying, that if the buttons work on their own, hit states with the same code applied to them (that was on the buttons) with some tweaks of course, should still function using target?
    so, to sum up: i have mc buttons, and am trying to access "their" timelines. I added the hit state layer (on the main timeline) and made their mouseEvents = the button effects, but my functionality went away.

  • ERROR when hitting the "helpful" or "solved" buttons

    Here's the message I get, any system admins know how to fix it?
    Error
    An error in the system has occurred. Please contact the system administrator if the problem persists.

    KevinC & Others,
    This is a wide spread issue, caused by the recent Maintenance on the  Discussions system.
    See these previously posted Topics in Feedback About Discussions, posted below.
    Please review the responses.
    Error when attempting to click "Solved" button in forum
    Error when trying to mark a reply as "solved"
    Thank you for maintenance and another error
    This Thread ERROR when hitting the "helpful" or "solved" buttons
    ali b

  • Up-Over-Down-Hit states of button gone?

    Hey there,
    Well I've got some problems changing the Up, Over, Down and Hit state of my button. For example when I have created 4 of those states, and I just normally save my flash file, the next time I open it my states are gone but when I play my animation the button still works with the correct states (the created Up, Down, etc. states). But then again when I enter my editor to create those Up, Over, Down, and Hit states they're just missing?
    Might there be a problem in the saving part or so?
    Greetings,
    Coyke

    in your library panel, you double click on your button symbol and your see what?  nothing?  the button "timeline"?  something else?

  • A Btn, A Mc and Hit States.. Plz Hlp! (link incl.)

    Hey ok so I have this file I'm working on (
    http://www.geocities.com/zflategraff/index.swf)and
    I have 3 objects here. I have the dock_Mc that is the dock
    animation, I have the dock_Btn which is essentially just a hit
    state to activate the dock_Mc to animate (redundant I know, but not
    sure where i was going with that at the moment, im fried) and the
    buttons within the dock that grow and shrink. I want the buttons
    and the dock to animate at the same time when the rollOver events
    are triggered and for them to work together. Right now I am only
    able to have one or the other work. If you could help me out in any
    way I would really appreciate it!!
    Thank you!!

    are you trying to achieve something like
    This

  • 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...

  • How flash can remember the hit state of buittons

    How can you use a cookie- flash shared object to remeber the
    hit state of a flash button.
    example: the button is red, once clicked it goes green.-
    stop. when the page is refreshed all the buttons go back to red but
    i want them to stay green.
    CODE BEING USED: Note: timer 15seconds for testing:
    on (press) {
    var currentDate:Date = new Date();
    var so:SharedObject = SharedObject.getLocal("tank");
    if(so.data.name != undefined){
    trace("the cookie already exists");
    gotoAndStop(2);
    trace("The expiry date of the cookie is: " +
    so.data.expirydate);
    if(currentDate > so.data.expirydate){
    trace("delete the shared object");
    so.clear();
    }else{
    trace("set the cookie");
    so.data.name = "tank2";
    so.data.expirydate = new
    Date(currentDate.getTime()+1500000);
    trace("The expiry date of the cookie has been set to : " +
    so.data.expirydate);
    WHERE IT SAYS: GOTOANDSTOP (2), WHAT I WANT IS IT TO GO TO
    THE HIT FRAME WITHIN THE BUTTON.
    NOT EVEN SURE THIS WILL WORK SO ANY COMMENTS MUCH
    APPRECIATED!!
    THANKS ALL

    Sorry i was very wrong, still having problems any ideas???
    anyone!
    followed guide:
    http://board.flashkit.com/board/showthread.php?t=725302&highlight=shared+object+expiry
    but still running into issues. can anyone explain it to a
    child (me)

  • Button Hit Animation Not completing

    So when I click on a button I want a little explosion to happen in the button, where it shatters out. I have created the animation, however when i click the button i only see the animation for a second because it gets cut off by the button over. How do i make it so when there is a click, the button hit animation completes before any other button action can take place?

    You use actionscript to control how the button behaves.  Assign event listeners for the different mouse interactions you wish to respond to and configure the event handler functions of those listeners to do the things you describe... play a sound or show an animation or both.
    If you need help figuring out how to use movieclips as buttons you should search Google using terms like "AS3 movieclip buttons tutorial" and similar terms.

  • Flash Player 9 / Firefox  Hit State bug

    The hit states in flash files lose their position
    registration when a scroll bar is invoked on the browser.
    For an example see navigate to:
    http://www.getloadedonline.com
    Upon entering site with a fully maximized browser, after
    skipping the intro, the menu loads in and the rollover effects
    initiate properly.
    If you vertically resize the browser window invoking the
    scroll bar, and scroll to the top of the page so that the
    navigation area is visible, the hit states are no longer
    registering properly where they are supposed to be.
    Resizing the browser window so that the scroll bar goes away
    brings the hit states of the navigational buttons back to where
    they're supposed to be.
    --edit--
    just wanted to add that as far as i can tell this is only
    going on in Firefox 1.5.0.3 for PC.

    This could have something to do with the JavaScript you are
    using to create the object embed tag.
    Have you duplicated this issue with a basic HTML page?
    -Ken

  • Button hits INACTIVE and objects on screen fade

    Hi:
    Captiv8 rules. EXCEPT for one problem... is there a way to
    make it NOT dim out everything on the screen when the button hits
    the Inactive state? I HATE this, and it is confusing to users. Why,
    why WHY they want to know?
    Is there ANY WAY To make the screens say the same brightness
    and the buttons stay always active? Thanks.

    It could be any object on the screen that has the fade-in /
    fade-out so check every object.
    I have seen issues with the timeline start and stop
    positions. You can set every timeline option to go for the full
    length of the slide. Some objects have an option to "Play for Rest
    of Slide" and some don't. Bu here's a quick way to set that.
    Highlight the timeline items (use the Ctrl key) and click
    each timeline item, or use your mouse and highlight every object on
    the slide. Press Ctrl-E (this is the keyboard shortcut to go to the
    slide end time).
    You might need to have an object start at time 0.0 to get it
    right. I just encountered a similar timing issue where I had two
    stacked captions fading in one after the other and it didn't work
    right for my needs with a small fade. I just let the whole thing
    load all at onece and it is fine now.
    Final possibility is that thr button is not "ON TOP" Graphics
    programs use layers and Captivate supports multiple objects on the
    same screen. Some can overlap, etc. Perhaps another object is on
    top of your button (background image, etc) and perhaps your button
    needs to be on top. Right click on the button and select the layer
    option to Bring To Front. Try it again, etc.
    Joe C.

  • Button hit starts new animation

    Okay,
    I have made a World map with different continents made into
    buttons. You rollover a specific button and a small animation
    plays.
    This is where im stuck...
    I want to click the button in the shape of a continent and an
    array of button that animate onto the screen (two different
    animations) and then turn into buttons. I have already created
    this. I have two files at the moment I just want to link them.
    I go into the continent button, into the Hit state and paste
    the frames that contain the array of buttons. They dont show when i
    publish nor do they stray to far from the main button.

    Set up a trace statement in your button code to check your
    button is working correctly:
    trace("boo!!");
    Cant suggest anything else without looking at the .fla
    file.

  • My imac stops(freezes) everytime when I try to extract ipod nano. So if I quit the connection by force, it stops again. Have no choice but to shut down the imac pushing power supply button. Pls help me solve out this problems.

    My imac stops everytime when I try to extract ipod nano. So if I do it by force it freezes agian. Have no choice but to shut down the computer
    by pushing power button. Pleas help me solve this out!!!
    It's not good to shut off the power forcibly, right? (I dun know what else I can do...)

    Hi Min! I'm having exactly the same issue - have been putting up with it now for months but have finally had enough! Every single time i eject either my iphone, ipad or ipod nano, itunes freezes up, the computer becomes unresponsive. Usually i can use the mouse to highlight icons but the system doesn't respond, the keyboard doesn't work and I have to do a hard reset.
    Arrrrrggggggh!!!!!!! lol
    Someone please help!!!

Maybe you are looking for