Rotating device fonts using flash actionscript

Posted by Vineela | Flash, as3, utils | Monday 30 November 2009 6:38 am

package druva{
import flash.display.Sprite;
import flash.text.TextField;
import flash.text.TextFormat;

public class textEffect extends Sprite {

	public function textEffect () {

		for (var i:int = 2; i <= 12; i++) {
			var txt:TextField = new TextField();
			txt.selectable = false;
			txt.width = 400;
			txt.text = "blog.totusinfo.com";
			txt.setTextFormat(new TextFormat("Georgia", 2*i,(2 + 0.35*i) * 0xCCCC00,false,true ));

			txt.x = 4.5*(i*(i+1)/2);
			txt.y = 3*(i*(i+2)/2);
			txt.rotationZ = 20;
			addChild(txt);
		}

	}
}
}

This movie requires Flash Player 9

 

inverse kinematic (IK) animations

Posted by druva | uncompleted | Wednesday 18 November 2009 6:08 am

k@i@r/developer/flashcs4/using_bone_tool_shapes_pg1.htm

 

Create Rounded Corners Rectangle with Actionscript 3.0 – AS3

Posted by druva | Flash, Flex, as3, utils | Saturday 7 November 2009 8:14 am

Rounded Corner Rectangle

import flash.display.*;

function round_rectangle(){

var shape:Shape = new Shape();
addChild(shape);

shape.graphics.beginFill(0xFF0000FF, 1.0);

shape.graphics.drawRoundRect(50, 10, 200, 100, 30, 30);

shape.graphics.endFill();
}

round_rectangle();

(more…)

 

Image rotating in Y direction with tweener using flash actionscript

Posted by Vineela | Flash, as3, utils | Friday 6 November 2009 6:01 am

To see the effect please click on the below image


import caurina.transitions.Tweener;

var values:int=0;

heart.addEventListener(MouseEvent.MOUSE_DOWN,rotate);

function rotate(evt:MouseEvent):void
{
	values = values - 1;
	Tweener.addTween(heart,{rotationX:values*0,rotationY:values*180,time:1,transition:"easeInCubic"});
}

This movie requires Flash Player 9

 

Image rotating in X direction with tweener using flash actionscript

Posted by Vineela | Flash, as3, utils | Thursday 5 November 2009 5:58 am

To see the effect please click on the below image


import caurina.transitions.Tweener;

var values:int=0;

heart.addEventListener(MouseEvent.MOUSE_DOWN,rotate);

function rotate(evt:MouseEvent):void
{
	values = values - 1;
	Tweener.addTween(heart,{rotationX:values*180,rotationY:values*0,time:1,transition:"easeInCubic"});
}

This movie requires Flash Player 9

 

Image rotating in Y direction using flash actionscript

Posted by Vineela | Flash, as3, utils | Wednesday 4 November 2009 5:26 am

heart.addEventListener(Event.ENTER_FRAME,rotateY);

function rotateY(evt:Event):void
{
	evt.target.rotationY = evt.target.rotationY + 2;
}

This movie requires Flash Player 9

 

Image rotating in X direction using flash actionscript

Posted by Vineela | Flash, as3, utils | Tuesday 3 November 2009 1:19 am

heart.addEventListener(Event.ENTER_FRAME,rotateX);

function rotateX(evt:Event):void
{
	evt.target.rotationX = evt.target.rotationX + 2;
}

This movie requires Flash Player 9

 

tick interval in Slider using flash actionscript

Posted by Vineela | Flash, as3 | Monday 2 November 2009 4:19 am
import fl.controls.Slider;

var slider:Slider = new Slider();
slider.tickInterval = 2;
slider.move(100, 100);
addChild(slider);
 

custom context menu in flash using actionscript

Posted by Vineela | Flash, as3, utils | Sunday 1 November 2009 2:59 am

import flash.display.*;

var red:ContextMenuItem = new ContextMenuItem("red");
var green:ContextMenuItem = new ContextMenuItem("green");

red.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, red_Select);
green.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, green_Select);

var contextmenu:ContextMenu = new ContextMenu();

contextmenu.customItems.push(green);
contextmenu.customItems.push(red);
contextmenu.hideBuiltInItems();

var sprite:Sprite = new Sprite();

sprite.contextMenu = contextmenu;
sprite.graphics.beginFill(0x0000FF);
sprite.graphics.drawCircle(60, 30, 20);
addChild(sprite);

function green_Select(evt:ContextMenuEvent):void {
    sprite.graphics.beginFill(0x00FF00);
    sprite.graphics.drawCircle(60, 30, 20);
}
function red_Select(evt:ContextMenuEvent):void {
    sprite.graphics.beginFill(0xFF0000);
    sprite.graphics.drawCircle(60, 30, 20);
}

(more…)