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
Setup Anim
TrackTheColors Xtra Error
XtraHelper
Generic behavior to emulate a Keystroke
Tool Tips/Help popUp box ver 2.1
Generic behavior to change System Desktop Icons
Check For Qt Version
Toggle Button
Go to URL
DiskJockey CD-ROM Builder
 

 

 

Behavior Popup Score

Added on 4/4/2000

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: Thomas (website)

This object creates a score that popups when you create it and then fades away. Very good for shoot "em up games etc. Create it when you want to show the score. The object will destroy itself when it is done fading down.

property pMyMember
property pMySpriteNum
property pMyBlend

on new me, varScore, varLoc, varMember, varSprite
  -- Set the member up
  pMyMember = member(varMember)
  duplicate member("fldPoints"), pMyMember
  pMyMember.name = "Runtime"
  pMyMember.text = string(varScore)
  
  -- Set the sprite channel up
  pMySpriteNum = varSprite
  puppetSprite pMySpriteNum, TRUE
  sprite(pMySpriteNum).member = pMyMember
  sprite(pMySpriteNum).ink = 36
  sprite(pMySpriteNum).loc = (varLoc + point(-40,-15))

  -- Set my blend to 100
  pMyBlend = 100

  -- Add to the actor list to recieve stepFrame events
  -- and to be able to destroy myself
  add the actorList, me

  return me
end  


on stepFrame me
  -- Lower blend
  pMyBlend = pMyBlend - 4
  
  -- If blend is 0 then destroy object, sprite and member
  if pMyBlend = 0 then
    sprite(pMySpriteNum).memberNum = 0
    erase pMyMember
    deleteOne the actorList, me
  else
    sprite(pMySpriteNum).blend = pMyBlend
  end if
end

 


Contact

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

Send e-mail