Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
SM scroll slowdown
MD5
Director 8 & Lingo Fast and Easy Web Development (With CD-ROM)
Sub Hunt
Scale Vertexlist
Simatrix Menu
Shockwave Stand Alone Installer
Direct Media Video Slider
Wait for Mouseclick
Draw a line with lingo
MediaMacros Xtras Mall
 

 

 

Behavior Animate Image Sequence

Added on 4/20/2000

 

Compatibilities:
behavior D6_5 D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: StevenSacks

The sprite will swap images at a steady rate, regardless of any updateStage commands (unlike film loops). Place this script on the sprite to animate, then set the rate you want it to animate at, and the number of images to animate. To use the script, sendSprite(whichSprite, #toggleBlink).

property blink, anim, animStart, animEnd, rate, inum, spriteNum, mySprite

global trackAnim

on beginsprite me
  mySprite = sprite(spriteNum)
  blink = TRUE
  animStart = mySprite.membernum
  animEnd = animStart + (inum-1)
  anim = animStart
  trackAnim = anim
end beginsprite

on enterframe me
  if blink = TRUE then
    anim = anim + rate
    trackAnim = anim
    if anim > (animEnd+1) - rate then
      anim = float(animStart)
    end if  
    mc = the number of chars of (string(anim)) - (the floatPrecision + 1)
    theMem = value(char 1 to mc of string(anim))
    mySprite.membernum = theMem
  else
    nothing
  end if
end enterframe

on getPropertyDescriptionList me
  pList = [:]
  pList.addProp(#rate, [#format:#float,#default:.2,#comment:"Rate:"])
  pList.addProp(#inum, [#format:#integer,#default:2,#comment:"Image Num:"])
  return pList
end getPropertyDescriptionList

on toggleBlink me
  blink = NOT blink
end

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail