A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: CS5 Action script 3 Go next and repeat frames again

Hybrid View

  1. #1
    Junior Member
    Join Date
    Apr 2012
    Posts
    6

    CS5 Action script 3 Go next and repeat frames again

    0
    down vote
    favorite
    i have flash cs5 and this is my action script code and i wants to repeat my frames after 5 second in the end

    last frame code :

    stop();


    button_1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_5);

    function fl_ClickToGoToAndPlayFromFrame_5(event:MouseEvent) :void
    {
    gotoAndPlay(376);

    }
    button_2.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_6);

    function fl_ClickToGoToAndPlayFromFrame_6(event:MouseEvent) :void
    {
    gotoAndPlay(469);
    }


    button_4.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_7);

    function fl_ClickToGoToAndPlayFromFrame_7(event:MouseEvent) :void
    {
    gotoAndPlay(562);

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    I am not sure this is what you want but this script would repeat going to the fame one time.
    PHP Code:
    import flash.utils.Timer;
    import flash.events.TimerEvent;

    button_1.addEventListener(MouseEvent.CLICKfl_ClickToGoToAndPlayFromFrame_5);

    function 
    fl_ClickToGoToAndPlayFromFrame_5(event:MouseEvent):void
    {
        
    gotoAndPlay(376);
        var 
    myTimer:Timer = new Timer(5000,1);
        
    myTimer.start();
        
    myTimer.addEventListener(TimerEvent.TIMERtimerHandler);
    }
    function 
    timerHandler(event:TimerEvent):void
    {
        
    gotoAndPlay(376);
        
    event.currentTarget.removeEventListener(TimerEvent.TIMERtimerHandler);

    - The right of the People to create Flash movies shall not be infringed. -

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