SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Jul 2008
    Posts
    288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question run flash button animation once

    Hey all. I have created an animation in flash, imported it and added a button. I have used the following code to activate the animation when the button is clicked - however the animation plays continuously rather than just once. Does anyone know how to run it just once? ..thanks one & all..

    This is my code:

    Code Actionscript:
    DecimalOdds.stop();
     
    StartButton.addEventListener(MouseEvent.MOUSE_DOWN,StartClip);
     
    function StartClip(e:MouseEvent):void {
    	DecimalOdds.play();
    }

  2. #2
    SitePoint Addict
    Join Date
    Jul 2008
    Posts
    288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK I have realised how to do it - anyone experiencing the same dilemma should put:

    Code Actionscript:
    stop()

    in the last frame of the animation - a simple one this time..regards


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
  •