Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Macromedia Licensing
Display an objects properties in Director
Get Visual Line Count and Current Visual Line of Insertion
Menus like VB
Clear Embedded Font
Sending Email
Wait for DigitalVideo End
Change Bit Depth of a Member
Find Last Label
Text Shifting
MediaMacros Xtras Mall
 

 

 

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

 


Upload Provided by ABCUpload ASP

Contact

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

Fax - (206) 339-5833

Send e-mail