How to preform a string search and replace in flash using actionscript prototype
Continue Reading »
Flash string search replace using prototype
Tweening color using AS3 Tweener Class
// import as3 tweener import caurina.transitions.*; // to get the color tweener to work, import ColorShortcuts properties import caurina.transitions.properties.ColorShortcuts; // initiate the ColorShortcuts ColorShortcuts.init(); // define a spite var mySprite:Sprite = new Sprite(); mySprite.x = 50; mySprite.y = 50; mySprite.graphics.lineStyle(); mySprite.graphics.beginFill(0xff0000); mySprite.graphics.drawRect(0,0,200,100); addChild(mySprite); // add the mouse actions mySprite.buttonMode = true; mySprite.addEventListener(MouseEvent.MOUSE_OVER, makeBlue); mySprite.addEventListener(MouseEvent.MOUSE_OUT, makeRed); // define the interactive effects function makeBlue(e:MouseEvent):void{ Tweener.addTween(mySprite, {_color:0x0000ff, time:1, transition:"easeOutQuart"}); } function makeRed(e:MouseEvent):void{ Tweener.addTween(mySprite, {_color:null, time:1, transition:"easeOutQuart"}); }


