PDA

View Full Version : preloading not working with imported font symbols!!!


openeyes
01-11-2006, 08:33 PM
I have a movie that uses 3 font symbols that are imported from an external library. I believe these fonts are preloaded before my _root movie even starts to load so my preloader doesn't really serve a purpose. The user just sees a blank screne until the font symbols are imported. Has anyone run into this problem before. Is there a way to dynamically import the font symbols at a later time so that the preloader works? Any ideas or support would be greatly appreciated.

Right now I am using the bare minimum for my preloader so that I can display at least some data for the user who is waiting for the movie to load. This code works for other movies without importing font symbols so why are they giving my trouble with this. I thought importing font symbols were supposed to cut down the movie's size to make it run faster???

Below is my preloader code


_root.onEnterFrame = function() {
stop();

var percent:Number = Math.floor(_root.getBytesLoaded()/_root.getBytesTotal()*100);

if (percent>99) {
_root.gotoAndStop(2);
_root.loadText_txt.text = percent+"%";
} else if (percent<99){
loadBar._width = percent;
_root.loadText_txt.text = percent+"%";
}
}

flashead
01-11-2006, 08:43 PM
Anything in your library that has a linkage ID and is exported in the first frame for AS is going to wreak havoc on your preloaders.

For most things, I just uncheck the 'Export in first frame' and put all my mc's, sounds, and other symbols with linkage inside an mc on the second frame of my movie, before my movie needs that symbol.

However for a font, I'm not sure just how you initiate it... you can try unchecking the "Export in first frame" and see if you're textFormats still work.

Worst case scenario, make a 'shell' fla, that loads in the fla you're working with now. Your preloader will work then, since your shell has nothing exported in frame 1.

openeyes
01-11-2006, 08:55 PM
Wow thanks. That made a huge difference. I also unchecked the export in first frame for all mc's that I exported for actionscript in the linkage dialogue box. Thanks. This is very helpful and not so document information.

flashead
01-11-2006, 09:36 PM
just remember to add all those symbols to the second frame. otherwise, your attachMovie's may not work since the symbol hasn't been exported.

openeyes
01-11-2006, 09:45 PM
just remember to add all those symbols to the second frame. otherwise, your attachMovie's may not work since the symbol hasn't been exported.


I see what you mean. All of the symbols that I unchecked for exporting in frame 1 are now not showing up at all. How do you add these in the 2nd frame? Note: My root movie only consists of 2 frames the first being the preloader and the 2nd being most of the actionscript referencing those sybmols that I wanted exported for actionscipt by attaching them to dynamically created clips.

Again I really appreciate you taking the time to answer.

openeyes
01-11-2006, 11:09 PM
How do you create a wrapper clip for an entire movie? I just dragged the clips that I needed exported just off the stage in frame 2 but the fonts cannot be exported that way. They require exportation in the first frame.

I am thinking the solution to this is to export my entire movie into another fla making a wrapper for everything that is currently in my _root target movie, but I am not sure how to do this. I exported my movie file>export>export movie into swf file but I am not sure how to load this entire clip into a wrapper clip in my new fla. How if possible is this accomplished?