Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Wait for SWA Member finishes Playing(sprite as reference)
A Lingo Timer Script
File Open Dialog Behavior
SetMouseXtra
Auto Save and Load Text
Allowing Users to Skew an Image
Acrobat in Director
QuickTime Notes
Centipede
Connect 4
MediaMacros Xtras Mall
 

 

 

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

 


Upload Provided by ABCUpload ASP

Contact

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

Fax - (206) 339-5833

Send e-mail