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
Vector Shape - Create Ellipse
Accessing Keys to Control a Sprite
Non-repeating random list
Arca Database Xtra
SaveScripts Xtra
Trigonometry Class v0.6
Memory Info
Sliding menu
DirGames Discussion List
Set BroadCast Property of a Flash Sprite
 

 

 

Behavior Preload within Markers v.BETA

Added on 12/12/2001

 

Compatibilities:
behavior D8 D8_5 PC Shockwave

Rating:

Author: tushonline (website)

TO Preload content within the Markers Specified, This will work for shockwave although may work for projectors too, but if not worked let me know

Download PC Source
-- This behavior Preloads data from the markers
-- put the marker names from which and upto which marker you want to Preload
-- Beta version
-- tushonline@vsnl.net





Property preload, markerlist, mymarker, from, to,

on resolve me
  --This handler is used to convert non-English languages to Lingo terms.
  case myMarker of      
    "next":
      myMarker = #next
    "previous":
      myMarker = #previous
  end case  
end on




on getPropertyDescriptionList me
  
  currentMember = sprite(the currentSpriteNum).member
  
  markersList = GetMarkers (me)
  if markersList.count() = 2 then -- [[], []]
    ErrorAlert (me, #getPDL_DuplicateMarkers, markersList[2])
  end if
  
  tLabelList = []
  tLabelList.add("next")
  tLabelList.add("previous")
  
  repeat with i = 1 to count(the markerList)
    tLabelList.add((the markerList).getProp((the markerList).getPropAt(i)))    
  end repeat
  pList = [:]
  addProp pList,#from,[#default:#getmarkers, #format:#marker,#comment:"Select the Marker you want to 'Preload From'"]
  addProp pList,#to,[#default:#getmarkers, #format:#marker,#comment:"Select the Marker for 'Preload To'"]
  return pList
end




--get markers

on GetMarkers me -- Sent by getPropertyDescriptionList
  localMarkerList = []
  duplicatesList = []
  markerString = the labelList
  delete the last char of markerString
  markerCount = the number of lines of markerString
  repeat with i = 1 to markerCount
    theMarker = markerString.line [i]
    if localMarkerList.getPos(theMarker) then
      -- Duplicate marker name
      if not duplicatesList.getPos(theMarker) then
        duplicatesList.append(theMarker)
      end if
    else
      localMarkerList.append(theMarker)
    end if
  end repeat
  if duplicatesList.count() then
    return [localMarkerList, duplicatesList]
  else
    return [localMarkerList]
  end if
end GetMarkers

on EnterFrame me
  preload from, to
end

on getBehaviorDescription me
  return "THIS BEHAVIOR PRELOADS DATA in to THE MEMORY WITHIN, SPECIFIED MARKERS" & RETURN & "THIS IS A BETA VERSION & THIS IS as is AND AUTHOR DOESNOT TAKE ANY RESPONSIBILITY IF THIS WON'T WORK" & RETURN && RETURn & "use this as a FRAME SCRIPT or attach it to any sprite...This works on EnterFrame handler" & RETURN & "ANY SUGGESTIONS OR BUG REPORT ARE GREATLY APPRECIATED" & RETURN & "tushonline@vsnl.net"
end

on getBehaviorTooltip
  return "THIS BEHAVIOR PRELOADS DATA in to THE MEMORY WITHIN, SPECIFIED MARKERS" & RETURN & "THIS IS A BETA VERSION & THIS IS as is AND AUTHOR DOESNOT TAKE ANY RESPONSIBILITY IF THIS WONT WORK"& RETURN && RETURn & "use this as a FRAME SCRIPT or attach it to any sprite...This works on EnterFrame handler" & RETURN & "ANY SUGGESTIONS OR BUG REPORT ARE GREATLY APPRECIATED" & RETURN & "tushonline@vsnl.net"
  end

 


Contact

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

Send e-mail