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
Macromedia Director 8 Shockwave Studio- Illustrated Introductory
Icon Shop
Ceiling and Floor
DirectTransition3D Xtra Set I
Editable Field/Text AutoTabbing
Color Picker MIAWs
BehaviorChecker
Camtasia
Sliding menu
Swirl-Alphamania
 

 

 

Article External Casts in Shockwave

Added on 8/14/2000

 

Compatibilities:
D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: Shehal (website)

How can I get my external casts to show up in Shockwave?

We often use external cast libraries and Director movies in Projector-based presentations. In the web, we might want to use the same cast library or Director movies in multiple movies.

As in other network lingo applications, what ever file that is to imported must be preloaded. That is, before importing, Director makes sure that the file it is dealing with is actually present in the local cache.

On frame X:  

global interfaceCast
global defaultSite

on exitFrame
  defaultSite = "http://www.unixville.com/~shehal/03rd_site/files/"
interfaceCast = preLoadNetThing(defaultSite& "interface.cct" )
end

This frame behavior preloads interface.cct cast library. We are now ready to add it to our director movie. As in other preLoadNetThing situations, downloading to the local cache is done on the background and the movie can continue to run. However, before importing or downloading in to the Director movie, we must make sure that the cast library has been properly preloaded.

global interfaceCast
global defaultSite

on exitFrame
if netDone(interfaceCast) = 1 then
go (the frame + 1)
  else
    interfaceCast = preLoadNetThing(defaultSite& "interface.cct" )
end if
end

Thus, if interface.cct has not been preloaded, the movie will preload interface.cct again. The pointer will not proceed beyond this frame until the cast library has been properly preloaded. Depending in your server reliability, you might want to add another handler to deal with timing out or giving up trying to preload. Perhaps your cast library or Director movie might be quite large in size.

Now, when the pointer moves to the next frame or marker or where ever the previous script has directed the pointed to, the cast library – interface.cct is cached.

on exitFrame me
downLoadNetThing(defaultSite&"interface.cct" , "interface.cct" )
= "interface.cct"
end

downLoadNetThing( "http://www.lala.com/abcd.cct" , "efgh.cct" )

The above statement downloads abcd.cct from http://www.lala.com/ in to the local cache as efgh.cct.

set the fileName of castLib "interface" = "efgh.cct"

Now we add efgh.cct as an external cast, named “interface”.

In CD ROMs, downLoadNetThing and preLoadNetThing is not required. However, the relative path of the cast library being added must be specified. By default Director will search the parent directory.

 


Contact

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

Send e-mail