Hi
I'm trying to use an external swf to load a font for use within another swf
but I'm having problems - i suspect the problem is that the swf with the
font in is loading after the swf that is calling it
could you take a look at the object for me please?
in the flash movie:
import com.SharedFontLibrary;
var shared_font_library:String;
if (!shared_font_library) shared_font_library = "shared_fonts.swf"; // if
the containing webpage doesn't pass shared_font_library to this movie
new SharedFontLibrary(shared_font_library);
object:
class com.SharedFontLibrary extends MovieClip {
// Private Properties
private var mcFontContainer:MovieClip;
private var mclFontLoader:MovieClipLoader;
private var objLoaderListener:Object;
private var sPath:String;
// Constructor
public function SharedFontLibrary(path:String) {
trace ("NakheelSharedFontLibrary loaded");
sPath = path;
mcFontContainer = _root.createEmptyMovieClip("mcFontContainer", 10);
objLoaderListener = new Object();
objLoaderListener.onLoadComplete = function(target_mc:MovieClip):Void {
trace("objLoaderListener.onLoadComplete");
};
objLoaderListener.onLoadError = function(target_mc:MovieClip,
errorCode:String, httpStatus:Number):Void {
trace(">> objLoaderListener.onLoadError()");
trace(">> ==========================");
trace(">> errorCode: " + errorCode);
trace(">> httpStatus: " + httpStatus);
};
mclFontLoader = new MovieClipLoader();
mclFontLoader.addListener(objLoaderListener);
mclFontLoader.loadClip(sPath, mcFontContainer);
}
// Private Methods
// Public Methods
}
if it is a timing issue, does anyone know a way around this?
thanks a lot
a
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders