Previous - dirCastLibAttach Section Home - Director Miscellaneous Next - dirMemExport


dirCastLibDetach ( )

Detaches an existing cast library from the current movie

Usage:

dirCastLibDetach (object me, string castName )

Parameters:

castName (string) - a string to identify the existing cast library

Returns:

(integer) - The success code

Example:

-- example asks user for an existing saved file, then detaches the active cast library before attaching the new saved file
xtRose = xtra("Rosetta").new( )

strPath = xtRose.dlgFile( 2, the moviepath, "untitled.dat", "Project User Data (*.dat)|*.dat", "dat" )

-- detach existing library if it exists
Repeat with i = 1 to the number of castLibs
  If ( castLib(i).name = "UserData" ) Then
    xtRose.dirCastLibDetach( castLib(i).name )
  End If
End Repeat

-- attach the new cast library
xtRose.dirCastLibAttach( "UserData", strPath)

Notes:

For cast member xtras, it is up to the individual xtra developer to implement their load and save method. If you plan on attaching cast libraries with xtra cast members, you should thoroughly test for compatibility problems. The recommendation is to hold only native Director cast member types in the cast library.


Previous - dirCastLibAttach Section Home - Director Miscellaneous Next - dirMemExport