SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,108
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)

    nextFrame and stop onRelease

    This should be the easiest thing in the world - but cs3 has changed the way this is done and i'm confused

    I have stop(); on every frame and when you click an invisible button I want it to go to the next frame. that's it.

    Thanks for your patience

  2. #2
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Are you using AS2 or AS3?

    AS2(if you want the actions to be on the first frame of the timeline where the 'myButton' clip/button exists)
    Code Actionscript:
    myButton.onRelease = function() {
      nextFrame();
    }
    AS2(if you want to place the actions directly on the button)
    Code Actionscript:
    on (release) {
      nextFrame();
    }

    AS3(i think)
    Code Actionscript:
    import flash.events.MouseEvent;
     
    myButton.addEventListener (MouseEvent.CLICK, btnListener);
     
    function btnListener ($event:MouseEvent) {
      nextFrame();
    }
    Hope it helps. This is all untested and I am not totally sure on teh AS3 example.

  3. #3
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,108
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    Thanks, It does help.

    AS3 is what was really killing me. I've created another flash file in AS2 and you can assign actions to buttons and everything.

  4. #4
    SitePoint Wizard jim_morrison3's Avatar
    Join Date
    Apr 2004
    Location
    UK
    Posts
    2,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In AS3 as well you can assign actions to buttons and everything too (except graphic symbols which is the same in AS 2 as well).
    Good Luck!
    There are things known and Things unknown
    And in between are the Doors.
    I love hand Coding.

  5. #5
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,108
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    Well, when I create a AS3 flash file - select a button and open the actions window I get the message 'Current selection cannot have actions applied to it'. I know it's possible but the method is quite different.


Bookmarks

Posting Permissions

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