Archive for the ‘actionscript’ Category

Be my Lovefool

Saturday, March 8th, 2008

In collaboration with No Two The Same based in London, England, Iconise was asked to design and develop a Valentine’s Day e-card to promote the release of ‘The Cardigans Best Of’ album for Universal Music.

The Cardigans Love Fool

The concept for the ecard was relatively simple. Send a message to a loved one or friend with a picture of yourself uploaded from your computer. However it was a pretty challenging project to implement. Iconise combined flash (Actionscript 3.0) with some php programing and a mySql back end to create a card that was fun, easy to use and send, and most importantly, secure. With any file upload situation, Iconise made sure that no other files other than .gif’s and .jpg’s could be uploaded on to the server. We also gave the user the ability to drag and zoom the image in and out in order to make sure their face fit properly into the designated area. We also came across a few bugs along the way. For anyone using FileReference keep this mind for mac users!

To see the results click here to tell your loved one what a Lovefool you are.

Customizing the menu tree component in flash

Tuesday, February 20th, 2007

If you like to customize (skinning) the look of your menu tree component in flash please take a look at the following examples of the properties you can change.

public var myTree:Tree;

myTree.setStyle(”fontSize”, “10″);
myTree.setStyle(”fontFamily”, “Verdana”);
myTree.setStyle(”backgroundColor”, “0xEBEBEB”);
myTree.setStyle(”borderStyle”, “none”);
myTree.setStyle(”color”, “0×666666″);
myTree.setStyle(”rollOverColor”, “0xE3E3E3″);
myTree.setStyle(”selectionColor”, “0xE3E3E3″);
myTree.setStyle(”textRollOverColor”, “0×666666″);
myTree.setStyle(”textSelectedColor”, “0×666666″);

If you want to customize the icons in your tree component you can by creating your own icon. Convert your icon to a movie clip symbol and it’s important that you give it a unique Linkage Identifier name. You can do this by clicking on the Advanced button in the Symbol Properties box. If you don’t you will not be able to customize the look of your icons. These are the 5 icons you can customize.

myTree.setStyle(”defaultLeafIcon”, “LinkageIdentiferName”);
myTree.setStyle(”folderClosedIcon”, “LinkageIdentiferName”);
myTree.setStyle(”folderOpenIcon”, “LinkageIdentiferName”);
myTree.setStyle(”disclosureOpenIcon”, “LinkageIdentiferName”);
myTree.setStyle(”disclosureClosedIcon”, “LinkageIdentiferName”);

For more infomation on customizing the tree component in flash click here.

Creating a simple rotating text banner in flash

Friday, February 2nd, 2007

I needed to create a simple banner for a client where text would fade in and slide in from the left. So here’s a simple way to rotate text in a textfield. Now it’s easy to update text later down the road and you don’t have to manually tween every text box. I’ve added a nice fade in and slide transition to make it more pretty.

On your timeline window be sure to create a movieclip called “mc_instancename“. In the movieclip “mc_instancename” create a textbox called “txt_instancename”. Adjust the x and y coordinates and alpha amounts yourself in the tween class. Please note that this does not loop. But you can easily adjust the code to have it loop.

function tweenText() {

new mx.transitions.Tween(mc_instancename, “_alpha”, mx.transitions.easing.Regular.easeOut, 0, 100, 2, true);
new mx.transitions.Tween(mc_instancename, “_x”, mx.transitions.easing.Regular.easeOut, 533, 276, 1, true);

}

var intervalId:Number;
var count:Number = 0;
var maxCount:Number = 6;
var duration:Number = 5000;

var rotatingtext:Array = new Array();
rotatingtext[0] = “Place text here”;
rotatingtext[1] = “Place text here“;
rotatingtext[2] = “Place text here“;
rotatingtext[3] = “Place text here”;
rotatingtext[4] = “Place text here“;
rotatingtext[5] = “Place text here“;
rotatingtext[6] = “Place text here“;

function rotateText(param:String) {

tweenText();
mc_instancename.txt_instancename.htmlText = param;
clearInterval(intervalId);

if (count<maxCount) {

count++;
intervalId = setInterval(this, “rotateText“, duration, rotatingtext[[count]);

} else if (count=maxCount) {

clearInterval(intervalId);

}

}
if (intervalId != null) {

clearInterval(intervalId);

}
intervalId = setInterval(this, “
rotateText“, 0, rotatingtext[count]);

Adobe’s Apollo

Friday, February 2nd, 2007

Mike sent me this sexy Overview on Adobe’s Apollo. Apollo will aparently let you create desktop applications using Flash, Flex, Actionscript, HTML, and more. Looks very cool.

Check out the sexy pdf “Understanding Apollo”

Flash MX 2004: Trouble removing movie clips that have a level set by getNextHighestDepth()?

Wednesday, May 18th, 2005

To remove these movie clips you must swap depths. Try swapping your movie clip to a level of 0 and then remove the clip like so:

instanceName.swapDepths(0);
instanceName.removeMovieClip();

* Please note that to remove a movie clip it must have been originally placed on the timeline by the attachMovie() or duplicateMovieClip() function. For example:

this.attachMovie(”IndentiferName”, “instanceName”, this.getNextHighestDepth());