Results 1 to 3 of 3

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User milev5's Avatar
    Join Date: Jan:2007
    Location:
    Posts: 1,189

    Flash AS2, NEXT,PREV

    Flash AS2.
    NEXT,PREV.
    5 , .
    .. 1 5 , 6 10, .
    , NEXT,PREV .

    NEXT:
    Code:
    on (release) {
    
    if (this._currentframe == this._totalframes) {
    
    gotoAndStop (1);
    
    } else {
    
    nextFrame ();
    
    }}
    PREV:
    Code:
    on (release) {
    
    if (this._currentframe == 1) {
    
    gotoAndStop (this._totalframes);
    
    } else {
    
    prevFrame ();
    
    }}
    ( )?
    , !

  2. #2
    N/A Demoman's Avatar
    Join Date: Sep:2005
    Location:
    Posts: 3,098
    , nextFrame play().

    prevframe() .... prevframe() 4-5 , play() - , .

  3. #3
    Registered User milev5's Avatar
    Join Date: Jan:2007
    Location:
    Posts: 1,189
    Quote Originally Posted by Demoman View Post
    , nextFrame play().

    prevframe() .... prevframe() 4-5 , play() - , .
    !
    play() nextFrame , , prevframe() 4 5 .
    , .


    dit:
    :
    Code:
    var crt:Number = 0;                                     //current picture pointer (starts from zero)
    
    var fpp:Number = 5;                                     //frames per picture (animation delay)
    
    var home:MovieClip = this;                      //root reference
    
    
    next_mc.onRelease = function():Void
    {
            if( ++crt == (home._totalframes / fpp) )
            {
                    crt = 0;
            }
            home.gotoAndPlay( crt * fpp + 1);
    }
    
    prev_mc.onRelease = function():Void
    {
            if( --crt == -1 )
            {
                    crt = home._totalframes / fpp - 1;
            }
            home.gotoAndPlay( crt * fpp + 1);
    }
    , !

Posting Permissions

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

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |