Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Radians to degrees, degrees to radians
Mastering Macromedia Director 6
A Lingo Timer Script
SamplePlayer
Install QuickTime
Increase/ Decrease FrameRate of a Flash Member
Forward and Reverse (Shitf+Tab) between Fields
File Save Button
Adventure
tea Xtra
MediaMacros Xtras Mall
 

 

 

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.

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail