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
-
5 BEST JAVASCRIPT FRAMEWORKS 2017 JavaScript popularity continues its rising. In 2016 we’ve witnessed such great changes, as AngularJS ...
-
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...
-
15 Interesting JavaScript and CSS Libraries 2017 DisplayJS Tiny framework that makes it easier to sync data with the DOM. Ins...








0 comments:
Post a Comment