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
Amplitude Xtra Review
A Simple Coloring Book
LineHiLiter
Checking an open database - Valentina
Show Me the Movie
PixelToolbox Beta - Imaging Lingo Application
Rename for lingo animations
Make Bitmaps from Flash
RADAgent
Icon Shop
 

 

 

Behavior StreamStatus Indicator Bar

Added on 6/10/1999

 

Compatibilities:
behavior D6_5 Mac PC

This item has not yet been rated

Author: Unknown

StreamStatus Indicator Bar

property crawlBar
property displayField
property barWidth, barHeight

on beginSprite me
  tellStreamStatus(TRUE)
  set crawlBar = sprite the currentSpriteNum
  set barWidth to the width of sprite the currentSpriteNum
  set barHeight to the height of sprite the currentSpriteNum
  put "crawlbar = "& crawlBar
end prepareMovie

on streamStatus URL, state, bytesSoFar, bytesTotal, error
  set bytesSoFar = float(bytesSoFar)
  set bytesTotal = float(bytesTotal)
  set partial= float(bytesSoFar/bytesTotal)
  set the width of sprite crawlBar to partial*(barWidth)
  set the height of sprite crawlBar to (barHeight)
  put partial*100 & "% loaded" into field displayField
  put "-" && state after field displayField
  put bytesSoFar && bytesTotal && bytesSoFar/bytesTotal
  updateStage
end

on getBehaviorDescription
  return "Makes a crawl bar grow to indicate downloading, and displays  the percentage downloaded in a field. Drag onto the crawl bar sprite when it"s at its full width!"
end getBehaviorDescription

on getPropertyDescriptionList
  set description = [:]  
  addProp description,#displayField,[#comment: "display field:", #default: "1", #format: #field]  
  return description  
end getPropertyDescriptionList

 


Contact

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

Send e-mail