Monday, April 21, 2008

Gradient on Dynamic Text

text_mc.myText_txt.text ="this text has a gradient";
mask_mc.setMask(text_mc);

Put 'mask_mc' (which is a box with a gradient) on the layer under text_mc.

Kerning Dynamic Text

var fmt:TextFormat = new TextFormat();
fmt.letterSpacing = 3;

myText_txt.text = "THIS TEXT NEEDS TO KERN";
myText_txt.setTextFormat(fmt);

Tuesday, April 15, 2008

The Super Gallery

I combined the two previous galleries I've posted and made one super gallery.

Take a look at it

This gallery is driven 100% from xml.

Download Filezzzz

Wednesday, April 9, 2008

Flash Shared Object (aka Flash Cookies)

This will enable you to create a variable and have flash remember it when the page is reloaded. You can even do it across multiple swfs. This code is for a flash scavenger hunt I made, where I had to keep track of which easter eggs had been found, and which easter egg to point the user to next. It also has to be able to know when all 3 have been found:

the_so=SharedObject.getLocal("scavenger","/"); //the "/" makes it so it works across multiple swf's
// set the new variables to 0 by default
if (the_so.data._sumoTask == undefined) {
the_so.data._sumoTask=0;
the_so.flush; //this saves the shared object immediately as opposed to when the swf shuts down
}
if (the_so.data._computerTask == undefined) {
the_so.data._computerTask=0;
the_so.flush;
}

if (the_so.data._vanTask == undefined) {
the_so.data._vanTask=0;
the_so.flush;
}


//The following sets up variables to match the shared object variables
sumoTask = the_so.data._sumoTask;
computerTask = the_so.data._computerTask;
vanTask = the_so.data._vanTask;

vanMorph_mc.button_btn.onRelease = function(){
vanMorph_mc.gotoAndPlay("morph");
the_so.data._vanTask = 1; //sets this so variable to 1. now when you come back or go to another task, it knows this task has already been completed.
}

clear_btn.onRelease = function(){
the_so.clear(); //This will clear the cookies
}

You can make any variable you want to remember a number of different things...such as scores, backgrounds (if you have multiple bg, you can remember which one the user had selected), etc.

Friday, December 7, 2007

Dynamic Expandable Menu

GO HERE NOW: [LINK]

This is a pretty rockin' expandable menu I made for the good men at Agency Fusion. The coolest part about this is that it is COMPLETELY DYNAMIC! (well, the sub-nav anyway). All you have to do is update an XML file and your menu is changed. Once the menu gets longer than 4 links, it becomes scrollable. holla!

download files: [CLICK HERE]

Here's what's even cooler. Agency fusion has this nav plugged into a CMS. All the client needs to do to update is create a new page in the CMS and it automatically updates the xml...which updates the flash. Pretty slick!! Here is how it was implemented: www.odysseyrealestatecapital.com

Monday, November 26, 2007

IE Flash Plugin Fix (quick fix)

This is a quick fix you can use to stop IE from putting that annoying box around flash movies that you have to click before the flash works. Yeah, that thing pisses me off...

go here: http://www.amarasoftware.com/flash-problem.htm