Reflection Text Effect
************************
In action script, This is Reflection [mirror] effect
how to do this effect?
Wat are the Propery to need ......
Blur x
Blur Y
Distance X
Distance Y
StartingPosition X
EndingPosition X
create a EmptyMovie clip and store into the arrayHolder
and for current movie to create a TExtField
and assign the value to given user text
after that split the text and put into ArrayHolder...
collect the load text movieclip
so that we use for .. loop to to get movieclip to Holder.
and make the text as embed Text
Here,.. the code....
function clipone ()
{
RefHolder = new Array ();
var RefArrTxt:Array = new Array ();
RefArrTxt = EffectContent.split ('');
_root.Effect_mc.createEmptyMovieClip ('Reflect',1);
var Refclips:MovieClip = _root.Effect_mc.Reflect;
for (var i = 0; i < RefArrTxt.length - 1; i++)
{
Refclips.createEmptyMovieClip ('refmc' + i,i);
var reflec = Refclips.createEmptyMovieClip ('refmc' + (RefArrTxt.length + i), RefArrTxt.length + i);
var reffmt:TextFormat = new TextFormat ();
reffmt.font = 'Style1';
reffmt.bold = true;
Refclips['refmc' + i].createTextField ('txt',1,0,0,10,10);
Refclips['refmc' + i].txt.autoSize = true;
Refclips['refmc' + i].txt.text = RefArrTxt[i];
Refclips['refmc' + i].count = i;
Refclips['refmc' + i].txt.embedFonts = true;
Refclips['refmc' + i].txt.setTextFormat (reffmt);
reflec.createTextField ('txt',1,0,0,10,10);
reflec.txt.autoSize = true;
reflec.txt.text = RefArrTxt[i];
reflec.count = i;
reflec.txt.embedFonts = true;
reflec.txt.setTextFormat (reffmt);
if (i == 0)
{
Refclips['refmc' + i]._x = _root.Ref.sp_x.text
Refclips['refmc' + i]._y = _root.Ref.sp_y.text;
reflec._x = Refclips['refmc' + i]._x+Number(_root.Ref.distx.text);
reflec._y = Refclips['refmc' + i]._y + Number(_root.Ref.disty.text);
}
else
{
Refclips['refmc' + i]._x = Refclips['refmc' + (i - 1)]._x + 10;
Refclips['refmc' + i]._y = _root.Ref.sp_y.text ;
reflec._x = Refclips['refmc' + i]._x + Number(_root.Ref.distx.text);;
reflec._y = Refclips['refmc' + i]._y + Number(_root.Ref.disty.text)
trace(_root.Ref.sp_y.text + _root.Ref.disty.text+' :: '+_root.Ref.sp_y.text+' : '+_root.Ref.sp_y.text)
}
reflec._yscale = -100;
reflec._alpha = 30;
RefHolder.push (Refclips['refmc' + i]);
// Reflec._x = _root.Ref.distx.text
_root.Ref.blurx.enabled = true
var blurText = new Tween (reflec, "blur", null, 0, _root.Ref.blury.text, 3, true);
blurText.onMotionChanged = function (ev:Object)
{
ev.obj.filters = [new BlurFilter (ev.obj.blur, ev.obj.blur, 3)];
};
blurText.onMotionFinished = function ()
{
trace ('s! ompleted the Motion');
};
}
pos = 100;
var pos:Number = 0;
}
function reflect ()
{
_root.Effect_mc.createEmptyMovieClip ('Ref',1);
_root.Effect_mc.Ref.createTextField ('Reftxt',1,_root.Ref.sp_x.text,_root.Ref.spy.text,_root.Ref.ep_x.text,_root.Ref.ep_y.text);
_root.Effect_mc.Ref.Reftxt.autoSize = true;
var textFmt:TextFormat = new TextFormat ();
textFmt.font = "style1";
textFmt.bold = true;
_root.Effect_mc.Ref.Reftxt.text = _root.gettxt.text;
trace (_root.Effect_mc.Ref.Reftxt.text + ' : input value');
_root.Effect_mc.Ref.Reftxt.embedFonts = true;
_root.Effect_mc.Ref.Reftxt.setTextFormat (textFmt);
}
call this function to the button click
clipone ()
have a gr8ful to u
Monday, December 31, 2007
-
make text unselectable CSS Code 1 2 3 4 -webkit-user-select: none; /* Safari */ -moz-user-select: none; /* Firefox */ -ms-user-sele...
-
In actionScript, we discus abt the worddrag... In this, first we have create a EmptyMovieClip for store a words... in the listItem Array...
-
Compar : ReactJS vs AngularJS Choosing the right framework for a new JavaScript system, application or website is a top priority for an...
-
Blur Filter: Now, we see the blur Filter Examples... Now we have create a movie clip and give instance name as reflec... Main screen 1: Movi...
-
R eact is a front-end library developed by Facebook. It is used for handling the view layer for web and mobile apps. ReactJS allows u...
0 comments:
Post a Comment