Thứ Hai, 4 tháng 1, 2010

FlepCharCode

Text special effect






Description


Typewriter special effect to embellish titles or contents on your site


Simple to use.



File package


flepstudio/FlepCharCode.as


main.fla ( example of how to use FlepCharCode )



Main.as ( example of how to use FlepCharCode )


leggimi.txt (readme)


Download source files at downloadssection of this site.



Important


Recommended speed of 1 to 10




How to use the FlepCharCode class:


Insert the flepstudio folder with the FlepCharCode class in it, following this path:


C:\Program Files\Adobe\Adobe Flash CS3\en\Configuration\ActionScript 3.0\Classes\


I have the English version of Flash, it’s easily guessed where it should go for any other language


- import the class like so: import flepstudio.FlepCharCode;


- create a MovieClip



- make sure that the SWF includes the used fonts ( see this article )


- initiate the classes passing the needed parameters


- add the MovieClip to the DisplayObject with addChild()





See following examples:
















Code:

import flepstudio.FlepCharCode;
var clip:MovieClip=new MovieClip();
var frase:String='Luna Rossa è la barca più bella';
var font:String='Arial';
var colore_font:Number=0x000000;
var misura_font:Number=24;
var spazio_lettere:Number=0;
var velocita:Number=5;
var colore_sfondo:Number=0;
var colore_bordo:Number=0;
var sfondo:Boolean=false;
var bordo:Boolean=false;
var bold:Boolean=true;
var allineamento:String='sinistra';

var flep:FlepCharCode=new FlepCharCode(clip,frase,font,colore_font,misura_font,
spazio_lettere,velocita,colore_sfondo,colore_bordo,sfondo,bordo,
bold,allineamento);

clip.x=100;
addChild(clip);











Code:
import flepstudio.FlepCharCode;
var clip:MovieClip=new MovieClip();
flep=new FlepCharCode(clip,'FlepStudio.org','arial',0xFFFFFF,30,0,5,
						 0xFF0033,0,true,false,true,'centro');
clip.x=100;
clip.y=20;
addChild(clip);

var clip2:MovieClip=new MovieClip();
flep=new FlepCharCode(clip2,'risorse gratuite per Flash CS3','arial',0x666666,20,0,5,
						 0,0,false,false,false,'sinistra');
clip2.x=100;
clip2.y=clip.y+50;
addChild(clip2);

var clip3:MovieClip=new MovieClip();
flep=new FlepCharCode(clip3,'prova la classe FlepCharCode','arial',0x333333,16,0,5,
						 0,0x333333,false,true,false,'sinistra');
clip3.x=100;
clip3.y=clip2.y+50;
addChild(clip3);

var clip4:MovieClip=new MovieClip();
flep=new FlepCharCode(clip4,'utile e semplice da utilizzare','arial',0x333333,16,0,5,
						 0xCCFF00,0x333333,true,true,false,'sinistra');
clip4.x=100;
clip4.y=clip3.y+50;
addChild(clip4);

0 nhận xét:

Đăng nhận xét