Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
Drop Shaddow Animating Lame Button-Alphamania
ZGTSB-Slider Button
Frame Trigger-Alphamania
AppActive
Toggle ImageEnabled Property of a Flash Member
cXtraShapeWindow
Multi lists sorting
Killing Moon / Director
AutoCropper v1.2
Setup Anim
 

 

 

Behavior Sprite player

Added on 8/23/2000

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: TommiBdckgren

Plays recorded data from a field. The recording can be made with the Sprite recorder behavior

property inum, pStartCounter, pListCounter,ptimer
property beginhunt,x,horisontallist,verticallist,playme,rotationlist
property skewlist,memberlist,blendlist,inklist,widthlist,heightlist,rectlist,quadlist


on beginSprite me

  --------------------------------------------
  -- inizialize, make lists to put data in...
  --------------------------------------------
  inum = the spritenum of me
  pStartCounter = 0
  pListCounter = 0
  set pTimer = the ticks
  set horisontallist=[]
  set verticallist=[]
  set rotationlist=[]
  set skewlist=[]
  set memberlist=[]
  set blendlist=[]
  set inklist=[]
  set widthlist=[]
  set heightlist=[]
  set rectlist=[]
  --set quadlist=[]

  -- puts data in lists...

  put line 2 of field (x) into horisontallist
  put line 5 of field (x) into verticallist
  put line 8 of field (x) into rotationlist
  put line 11 of field (x) into blendlist
  put line 14 of field (x) into memberlist
  put line 17 of field (x) into skewlist
  put line 20 of field (x) into inklist
  put line 23 of field (x) into widthlist
  put line 26 of field (x) into heightlist
  put line 29 of field (x) into rectlist
  -- put line 32 of field (x) into quadlist

  ----------- ***

end beginSprite


on exitframe
  -------------------------------------------
  -- when to start playing the recorded data
  -------------------------------------------
  if the ticks - pTimer > playme then
    Iplay
  end if
  ---------- ***
end


on Iplay me
  --------------------------------------------
  -- Reads data and plays it on the screen...
  --------------------------------------------
  pListCounter = pListCounter+1

  sprite(inum).locH = value(horisontallist.word[pListCounter])

  sprite(inum).locV = value(verticallist.word[pListCounter])

  sprite(inum).rotation = value(rotationlist.word[pListCounter])

  sprite(inum).blend = value(blendlist.word[pListCounter])

  sprite(inum).membernum = value(memberlist.word[pListCounter])

  sprite(inum).skew = value(skewlist.word[pListCounter])

  sprite(inum).ink = value(inklist.word[pListCounter])

  sprite(inum).width = value(widthlist.word[pListCounter])

  sprite(inum).height = value(heightlist.word[pListCounter])

  sprite(inum).rect = value(rectlist.word[pListCounter])

  --sprite(inum).quad = value(quadlist.word[pListCounter])

  updateStage

  --------------- ***

end

on getPropertyDescriptionList
      set description = [:]
  addProp description,#x, [#default:"Data record 1", #format:#field, #comment:"Play recorded data from wich field?"]
  addProp description,#playme, [#default:180, #format:#integer,#range:[#min:0, #max:999], #comment:"How long to wait(in ticks) before starting to play?"]
  return description

on getbehaviordescription
  return " Plays recorded sprite data from a field. The recordings can be made with the -Sprite recorder- behavior."
end

 


Contact

MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA

Send e-mail