File Restructuring and Verdana Bold…

18 05 2010

Well I took a few days off the project to revise for my only exam and my 4d project. With those both behind me this full steam ahead till next Fridays deadline.

So I had a quick file restructure. All of my files were in one big folder. AS discussed earlier, The main swf pulls in a different swf for each module, which in turn pulls in an xml file for its text content.

With only a few modules done, this folder was beginning to get crowded with a fla, a swf, a xml and any other related files sitting in one big heap. So I gave each module its own folder containing just its fla, swf and xml. This makes navigating my folder structure and locating files much easier. It was something I probably should have done in the first place.

It didn’t take long to recode the relevant bits to take into account the new folders. Mostly just adding a modx/ before the name of the swf  and xml (where x is the module number).

It did cause a few problems when testing the modules without running them through the main file. This was quickly fixed by adding the path name without the new folder structure in the else section of the xml loader if statement. So my xml loader function looks something like this now:

function loadXML(loaded) {
if (loaded) {
moduleTitle = this.firstChild.childNodes[4].childNodes[0].firstChild.nodeValue;
pageTitle = this.firstChild.childNodes[4].childNodes[1].firstChild.nodeValue;
pageContent = this.firstChild.childNodes[4].childNodes[2].firstChild.nodeValue;
moduleTitle_txt.text = moduleTitle;
pageTitle_txt.text = pageTitle;
pageContent_txt.text = pageContent;
} else {
trace("file not loaded!");
//xml not loaded. Could be previewing module not through main file so load xml without folder destination
xmlData.load("module1.xml");
}
}

Next problem was that as I was doing this I noticed a lot of missing font warning popping up, specifically my home pc doesnt have verdana bold. Reason I didn’t notice this before was that Ive been doing most of the development on this on the macs’ in uni. Normally this wouldn’t be a huge problem and I would just make sure to publish the final swf’s at uni and not at home, as I think I’m right in saying that static text is rendered as bitmap by flash to avoid such problems.. The problem is that I’m using a lot of dynamic text boxes, so the font needs to be installed on the pc running the program to be displayed properly. And if I don’t have verdana bold, chances are lots of other people wont either.

Course I could just embed the fonts in all the text boxes. I think that would fix it. But it would boost the file size and its a long and boring task. And I would still have to remember to publish at uni and not at home. SO might as well just change away from verdana bold all together.

So next I need to go through and remove all references of verdana bold. Hopefully I can just replace them with verdana and then make it bold. But Im not sure, dont really know a huge amount about fonts and flash. Will research and get back to you.

Oh and just so I dont find I hve the same problems with verdana (the font Ive used on all body text) I did a bit of research and found its 99.34% on Windows (making it the second most common font on that platform) and 96.06% (seventh most common) on computers running Mac OS” So no worries there.

Advertisement

Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s




Follow

Get every new post delivered to your Inbox.