Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Set WarpMode of a QTVR Sprite
Custom Hyperlink Colors And Cursor Change
Macromedia Director 7 - Illustrated Complete
Closing a MIAW
Mile High Table O'Products
Puzzling!
How to find all special system folders
Time Since Midnight
ProgressCopy
Director 8 Primer
MediaMacros Xtras Mall
 

 

 

Behavior Flash Member Controls

Added on 5/24/2000

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: KumarK

Controls a Flash member with play, pause, fast forward, rewind, etc.

------ Custom Properties ------
property  FlashSprite,MyAction,WhereTo

------ Events ------
on EnterFrame me
  if WhereTo = "On EnterFrame" then
    DoAction
  end if
end EnterFrame

on ExitFrame me
  if WhereTo = "On EnterFrame" then
    DoAction
  end if
end ExitFrame

on MouseUp
  if WhereTo = "On MouseUp" then
    DoAction
  end if
end MouseUp

on MouseDown
  if WhereTo = "On MouseDown" then
    DoAction
  end if
end MouseDown

on MouseEnter
  if WhereTo = "On MouseEnter" then
    DoAction
  end if
end MouseEnter

on MouseLeave
  if WhereTo = "On MouseLeave" then
    DoAction
  end if
end MouseLeave
------ Events ------

------ Get Behavior Description List ------
on getPropertyDescriptionList me
  flashmememberlist = searchflashsprite(me)
  if flashmememberlist.count() < 0 then exit
  propslist=[:]
  SetaProp propslist, #FlashSprite, [#comment:"Flash Sprite",#format:#integer, #range: flashmememberlist,#default: flashmememberlist[1]]
  SetaProp propslist, #MyAction, [#comment: "Action", #format:#String,#range:["Play","Pause","Stop","Rewind"], #default:"Play"]
  if the currentspritenum = 0 then
    SetaProp propslist, #WhereTo, [#comment: "Where To Attach",#format:#String, #range:["On EnterFrame","On ExitFrame"],#default:"On EnterFrame"]
  else
    SetaProp propslist, #WhereTo, [#comment: "Where To Attach",#format:#String, #range:["On MouseUp","On MouseDown","On MouseEnter","On MouseLeave"],#default:"On MouseUp"]
  end if
  return propslist
end getPropertyDescriptionList
------ Get Behavior Description List ------

------ Check Whether Flash Member Availabale on the Stage------

on isOKToAttach (me, aSpriteType, aSpriteNum)
  flashmememberlist = searchflashsprite(me)
  if flashmememberlist.count() > 0 then
    case aSpriteType of
      #graphic:
        return true
      #script:
        return true
    end case
  end if
end isOKToAttach
------ Check Whether Flash Member Availabale on the Stage------        

------ Search for Flash Member on the Stage ------
on searchflashsprite me
  set theflashmemlist = []
  repeat with i=1 to the lastchannel
    if sprite(i).member.type = #flash then
      theflashmemlist.append(i)
    end if
  end repeat
  return theflashmemlist
end
------ Search for Flash Member on the Stage ------

------ Custom Function to Perform the Action ------
on DoAction
  Case (MyAction) of
    "Play":
      Sprite(Flashsprite).Play()
    "Pause":
      Sprite(Flashsprite).Hold()
    "Stop":
      Sprite(Flashsprite).Stop()
    "Rewind":
      Sprite(Flashsprite).Rewind()
      Sprite(flashsprite).Play()
  End Case
end
------ Custom Function to Perform the Action ------

 


Upload Provided by ABCUpload ASP

Contact

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

Fax - (206) 339-5833

Send e-mail