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
Avance de imagenes continuo - Continuous advance of imagenes
Cinemac
Copy Progress handler for Buddy API
Bitbull
A cool button
Copy My Text
Animate Text By Font Size
Imaging Lingo Table
Timeline re-direction and navigation
Set WarpMode of a QTVR Sprite
 

 

 

Behavior Sprite Player v.2

Added on 9/8/2000

 

Compatibilities:
behavior D7 D8 Mac PC

This item has not yet been rated

Author: TommiBdckgren

Plays what ever Sprite recorder recorded after an amount of time you specify.

property inum, pStartCounter, pListCounter,ptimer
property beginhunt,x,horisontallist,verticallist,playme,rotationlist
property skewlist,memberlist,blendlist,inklist,widthlist,heightlist,rectlist,quadlist
property Hlistcount, Vlistcount, Rotlistcount, Blendlistcount, memberlistcount, skewlistcount
property inklistcount,widthlistcount, heightlistcount,rectlistcount


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
  
  ----------- ***
  
  -- Checks for last word in horisontallist
  put the number of words in (horisontallist) into Hlistcount
  
end beginSprite


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


on Iplay me
  ---------------------------------------------
  -- if horisontallsit played trough then stop
  ---------------------------------------------
  if sprite(inum).locH = value(horisontallist.word[Hlistcount]) then
    exit
    
  else
    
    
    --------------------------------------------
    -- 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])
  end if
  
  
  
  
  
  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
end

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