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
ProMusicLoops
Add Your file to windows Startup
DirMPEG
Send OSA Script
Sprite Blender - Time
Dither Black and White Image - Imaging Lingo
Set PlayBackMode of a Flash Member
Back Button - All In One
cXtraWindowsConf
CloneIt
 

 

 

Behavior Flash Sprite -- Simple Controller [Play, Pause, Rewind]

Added on 2/20/2002

 

Compatibilities:
D7 D8 D8_5 Mac PC

This item has not yet been rated

Author: tushonline (website)

Attach this Behavior to the buttons to control the Flash Sprite like Play, Pause, Rewind.

--Simple Flash Controller Behavior-----------------------------
------------------------------- Written on Feb 20th 2002
------www.Run4Fx.com------------------------------------
-------------------------------tushonline@hotmail.com---




Property pSprite  -- this is used for Selecting your Flash Sprite Number
Property pEvent   -- this is used for Controlling the Flash Sprite

on getPropertyDescriptionList me
  tSpriteList = []
  repeat with i = 1 to 100
    tSpriteList.add(i)
  end repeat
  
  list = [:]
  
  addProp list, #pSprite, [#comment: "Choose a Flash Sprite", #format: #integer,#default: "1", #range: tSpriteList]
  addProp list, #pEvent, [#comment: "What to do", #format: #string,#default: "Pause", #range: ["Play","Pause","Rewind"]]
  
  return list
end

--This Checks if the Sprite you want to control is a Flash Sprite or not.
On PrepareFrame me
  if sprite (pSprite).member.type = #Flash then nothing
  else
    alert "ERROR : Sprite You selected is not a Flash Sprite.*_*"
    halt
  end if
end

-- This Event Makes ur Flash Sprite to Play, Pause or Rewind
on mouseUp me
  -- The user clicked on a sprite
  if pEvent = "Play" then play (sprite pSprite)
  else
    if pEvent = "Pause" then pause (Sprite pSprite)
    else
      if pevent = "Rewind" then rewind (sprite pSprite)
    end if
  end if
end

end mouseUp

-- This Detects your Sprite type & attaches the Behavior,[No chance for Frame Scripts here]
on isOKToAttach (me, aSpriteType, aSpriteNum)

tIsOK = 0  
if aSpriteType = #graphic then
tIsOK = 1
end if  

return(tIsOK)  
end on

-- Behavior Description
on getBehaviorDescription me
return "Simple Flash Controller" & return & "Use this behavior to Play, Pause, Rewind your Flash Sprites" & return & "Attach this Behavior to your Buttons" &return& "www.run4fx.com"&return&"Tushar - tushonline@hotmail.com"
end

-- Behavior ToolTip
on getBehaviorTooltip me
return "Simple Flash Controller" & return & "Use this behavior to Play, Pause, Rewind your Flash Sprites" & return & "Attach this Behavior to your Buttons"
end

 


Contact

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

Send e-mail