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
Atom
Acrobat in Director
Hex to integer
ProMix Xtra for Authorware and Director
Gravis MouseStick
Filtering - Valentina
Go Frame X
CD Everywhere
Icon Forge
Xtras Mall From MediaMacros
 

 

 

Behavior Hold on a frame till Flash finishes playing

Added on 5/29/2000

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: KumarK

This will hold on the frame till the specified flash finishes Playing

Download PC Source    Download Mac Source
----written for Director 8----
----Kumar.K----
----kumark@icode.com----

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

------ Get Behaviour Description List ------
on getBehaviorDescription me
  return
  "This Behavior will hold on the frame till the specified Flash Sprite Finishes Playing." & RETURN & RETURN &
  "Parameters." & RETURN &
  "*  Flash Sprite" & RETURN &
  "*  Action(What Next after Flash sprite finishes playing)"
end getBehaviorDescription
------ Get Behaviour Description List ------

------ Get Behavior Description List ------
on getPropertyDescriptionList me
  if the currentspritenum <> 0 then exit
  flashmememberlist = searchflashsprite(me)
  propslist=[:]  
  if flashmememberlist.count() > 0 then
    SetaProp propslist, #FlashSprite, [#comment:"Flash Sprite :",#format:#integer,
  #range: flashmememberlist,#default: flashmememberlist[1]]
  else
    SetaProp propslist, #FlashSprite, [#comment:"Flash Sprite :",#format:#integer,#default: 1]
  end if  
  SetaProp propslist, #MyAction, [#comment: "What Next ?" ,#format:#String,
#range:["Go to NextFrame","Go to Next Marker","Go to Previous marker","Go Loop","Quit" ],#default:"Go to NextFrame"]
  return propslist
end getPropertyDescriptionList
------ Get Behavior Description List ------

----Available for only Frame Script----
on isOKToAttach (me, aSpriteType, aSpriteNum)
  case aSpriteType of
    #script:
      return true
  end case
end isOKToAttach
----Available for only Frame Script----

----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----

----Events----
on ExitFrame me
  if member(sprite(FlashSprite).member).type = #flash then
    if the frame of sprite(FlashSprite) < the framecount of member sprite(FlashSprite).member then
      go the frame
    else
      case(MyAction) of
        "Go to NextFrame": Go the Frame+1
        "Go to Next Marker": Go Next
        "Go to Previous marker": Go Previous
        "Go Loop": go loop
        "Quit": quit
      end case
    end if
  end if
end ExitFrame
------ Events ------  

 


Contact

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

Send e-mail