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
Tint bitmap behaviour
Basic 4 direction environment navigation
De-Xplode that text position relative
Show Time
SplashScreenX Pro
getSystemTime
SpaceShooter
XAdKey xtra
Dual Button With Rollover Effect
Spam and Faoul language filter for shockwave
 

 

 

Behavior Stream FlashMember (Frame Script,Cast member as Reference)

Added on 5/31/2000

 

Compatibilities:
behavior D8 Mac PC Shockwave

This item has not yet been rated

Author: KumarK

Stream FlashMember (Frame Script,Cast member as Reference)

---- written for Director 8 ---
---- Kumar.K kumark@icode.com ----
------ Custom Properties ------
property  theMember, percentage,MyAction

------ Events ------
on ExitFrame me
  If the percentStreamed of member theMember < percentage then
    stream(member theMember)
    go the frame
  else
    case(MyAction) of
      "Go to NextFrame": Go the Frame+1
      "Go to Next Marker": Go Next
      "Quit": quit
    end case
  end if
end ExitFrame
------ Events ------

------ Get Behavior Description List ------
on getPropertyDescriptionList me
  if the currentspritenum <> 0 then exit  
  flashmememberlist = searchflashMember(me)
  if  flashmememberlist.count() > 0 then
    set description = [:]
    addProp description, #theMember, [#format:#String, #comment: "Which Flash Member ?",
  #range:flashmememberlist,#default:flashmememberlist[1]]
    addProp description, #percentage, [#format:#Integer, #comment: "Set Stream Percentage :",
  #range:[#Min: 1,#max: 100],#default:50]
  addProp description, #MyAction, [#comment: "What Next ?" ,#format:#String,
#range:["Go to NextFrame","Go to Next Marker"],#default:"Go to NextFrame"]    
    return description
  else
    exit
  end if  
end getPropertyDescriptionList
------ Get Behavior Description List ------

-- Get Behavior description --
on getBehaviorDescription
  return "This Frame Behavior Waits in a frame for a percentage of a Flash Member to be streamed into memory." & RETURN & RETURN &
  "Parameters" & RETURN &
  "* Flash Member Which has to be streamed." & RETURN &
  "* Percentage of Flashmember to be streamed." & RETURN &
  "* What to do next"
end

------ Availbale for both Frame and Sprite Script ------
on isOKToAttach (me, aSpriteType, aSpriteNum)
  case aSpriteType of
    #graphic:
      return false
    #script:
      return true
  end case
end isOKToAttach
------ Availbale for both Frame and Sprite Script ------

------ Search for Flash Member ------
on searchflashMember me
  FlashMembersList = []
  maxCastLib = the number of castLibs
  repeat with theCastLib = 1 to maxCastLib
    maxMember = the number of members of castLib theCastLib
    repeat with memberNumber = 1 to maxMember
      theMember = member(memberNumber, theCastLib)
      if theMember.type = #Flash then
        if theMember.name = EMPTY then
          FlashMembersList.append(theMember)
        else
          FlashMembersList.append(theMember.name)
        end if
      end if
    end repeat
  end repeat
  return FlashMembersList
end
------ Search for Flash Member ------  

 


Contact

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

Send e-mail