A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: I only want button instance on hit state

  1. #1
    Junior Member
    Join Date
    Feb 2001
    Posts
    6
    Hi all
    I'm trying to script to create the effect of dragging a movie clip with mouse rollover action. To do this, the button cannot be visible when playing the movie. When I delete the button on Up state in symbol editing mode, it deletes it from the movie's library. ??????? I can't figure this one out, and so far haven't found any tutorials that cover buttons in this much detail. hurrumph.

    Cheers for any suggestions

  2. #2
    Senior Member
    Join Date
    May 2001
    Location
    Ithaca, NY
    Posts
    107
    drag actions can only be performed on movie clips, so put your button inside the movie clip that you want to drag and then give the button the following action to make it drag:

    on(press) {
    startDrag("/") {
    // some code can go here
    }
    }

    if you wanted it to drag on rollover, just change the 'press' to rollover, but then i can't see how you would ever get it to 'let go' of the button since it would follow your mouse and you would be stuck in a rollover state :-)

  3. #3
    Senior Member
    Join Date
    Jan 2001
    Posts
    591
    Don't delete it.
    Make it transparent

  4. #4
    Retired SCORM Guru PAlexC's Avatar
    Join Date
    Nov 2000
    Location
    NJ
    Posts
    1,387
    You guys are making this way to complicated.

    You can draw only in the hit frame of the button. This defines the area recognized by the cursor, as the button. Leave the up, over, and down frames blank. You now have an 'invisible' button. Flash will show this in the FLA as a turquoise area the shape of what you drew on the hit frame, so you can work with it, but it will not render.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center