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
List of Globals
MIAW Event Leak
Audio Xtra
cXtraStringGrid
Image Magnify
Fast Start Projector
Relative Links
Sprite Drag - Confine to stage
Vector Shape - Create Square Wave
PopUp Menu
 

 

 

Behavior Update text member from remote file

Added on 7/13/2000

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: BrentMoseley

Update a text cast member during runtime from a remote file on the internet

property mymember
property updated  --boolean
property mynet    --getnettext instance

property fileloc   --file location
property loadtext --text displayed while loading

on beginsprite me
  mymember = the member of sprite the spritenum of me
  the text of member mymember = loadtext
  mynet = getNetText (fileloc)
end


on exitframe me
  if updated = false then
    if netdone(mynet)  then
      the text of member mymember = netTextResult(mynet)
      updated = true
    end if
  end if
end

on getPropertyDescriptionList me
  set pdlist to [:]
  addprop pdlist, #fileloc, [#comment:"text file location", #format:#string,#default:"http://myserver.com/text.txt"]
  addprop pdlist, #loadtext, [#comment:"text to display while loading",#format:#string, #default:"Downloading, Please wait."]
  return pdlist
end getPropertyDescriptionList

on getBehaviorDescription
  return "Update a text cast member from a remote file on the internet." &return & return &"Created by Brent Moseley" & return & "brentmoseley@yahoo.com"
end

 


Contact

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

Send e-mail