January 2013

فلیش میں سونامی مینو بنانا



// Copy the below ActionScript & Paste it in the first frame of your movie

menutriggerdist = 150;
// This is the distance under which the movie clips will start to change scale and move.
menumaxscale = 300;
// This is the maximum scale for each clip.
menumultiplier = 1.5;
// This is an arbitrary variable that affects the scaling rate.

// Copy the above ActionScript & Paste it in the first frame of your movie

 
 // Copy the below ActionScript & Paste it on any movie clips

on (press) {
// here starts normal movie clip event handlers
getURL("http://www.urdupages.com");
}
on (rollOver) {
this._alpha = 100;
}
on (rollOut) {
this._alpha = 25;
// here ends the normal movie clip event handlers
}
//sets event to mousemove or you'll get strange wobbling of your movie clips.
onClipEvent (mouseMove) {
//calculates distance from mouse to movie clip
dist = Math.sqrt(Math.pow(Math.abs(_xmouse), 2)+Math.pow(Math.abs(_ymouse), 2));
// if within a certain distance, triggerdistance, then start changing the clips scale
if (dist<=_root.menutriggerdist) {
currscale = (1-(dist/(_root.menumultiplier*_root.menutriggerdist)))*(_r oot.menumaxscale-100);
this._xscale = currscale;
this._yscale = currscale;
// if outside of triggerdistance, then make the scale equal to 100
} else {
this._xscale = 100;
this._yscale = 100;
}
}
// Copy the above ActionScript & Paste it on any movie clips



فلیش میں ماؤس ٹریل بنانا


 // Copy the below script
Text = "UrduPages.com is the best Urdu website!!!";
letters = Text.split("");
letterformat = new TextFormat();
letterformat.font = "Verdana";
letterformat.align = "center";
letterformat.size = "10";
spacing = 8;
speed = 3;
for (var LTR = 0; LTR<letters.length; LTR++) {
mc = _root.createEmptyMovieClip(LTR+"l", LTR);
mc.createTextField(letters[LTR]+"t", LTR, LTR*spacing, 10, 20, 20);
with (mc[letters[LTR]+"t"]) {
text = letters[LTR];
setTextFormat(letterformat);
selectable = false;
}
if (LTR) {
mc.prevClip = _root[(LTR-1)+"l"];
mc.onEnterFrame = function() {
this._x += (this.prevClip._x-this._x+5)/speed;
this._y += (this.prevClip._y-this._y)/speed;
};
} else {
mc.onEnterFrame = function() {
this._x += (_root._xmouse-this._x+10)/speed;
this._y += (_root._ymouse-this._y)/speed;
};
}
}
// Copy the above script





فلیش میں برف باری کا منظر بنائیں

آج کل خوب سردی پڑ رہی ہے۔۔۔۔ سردیوں میں برف باری کا منظر بہت خوب صورت لگتا ہے۔ مگر ہر ایک کو کہاں برف باری دیکھنا نصیب ہوا کرتی ہے؟۔۔۔۔آئیے آج ہم ایڈوبی فلیش میں برف باری کا منظر بناتے ہیں۔ اس کے بعد آپ کو برف باری دیکھنے کے لیے مری نہیں جانا پڑے گا بلکہ صرف اپنی خود کی بنائی ہوئی فلیش فائل کو اوپن کرنا پڑ ےگا۔۔۔۔اس ٹیوٹوریل کو سردیوں کا تحفہ سمجھ کر قبول کیجئے!۔۔۔۔۔۔

 





// ActionScript # 1.......................................
// Copy & paste this actionscript .................................................. .....

onClipEvent (load) {
//specifies the size of the movie stage
movieWidth = 300;
movieHeight = 200;
//variables that will modify the falling snow
i = 1+Math.random()*2;
k = -Math.PI+Math.random()*Math.PI;
//giving each snowflake unique characteristics
this._xscale = this._yscale=50+Math.random()*100;
this._alpha = 75+Math.random()*100;
this._x = -10+Math.random()*movieWidth;
this._y = -10+Math.random()*movieHeight;
}
onClipEvent (enterFrame) {
//putting it all together
rad += (k/180)*Math.PI;
this._x -= Math.cos(rad);
this._y += i;
if (this._y>=movieHeight) {
this._y = -5;
}
if ((this._x>=movieWidth) || (this._x<=0)) {
this._x = -10+Math.random()*movieWidth;
this._y = -5;
}
}



// ActionScript # 2 .......................................................................
// Copy & paste this actionscript ..................................................

for (k=0; k<50; k++) {
duplicateMovieClip(_root.snow, "snow"+k, k);
}





فلیش میں دائرے کی حرکت والی ایفیکٹ بنانا






























// Copy the below ActionScript
onClipEvent (load) {
var radius = 10 + Math.random() * 50;
var speed = 5 + Math.random() * 20;
var xcenter = this._x;
var ycenter = this._y;
var degree = 0;
var radian;
}
onClipEvent (enterFrame) {
degree += speed;
radian = (degree/180)*Math.PI;
this._x = xcenter+Math.cos(radian)*radius;
this._y = ycenter-Math.sin(radian)*radius;
}
// Copy the above ActionScript






<<< پچھلا صفحہ اگلا صفحہ >>>

کچھ میرے بارے میں

Powered by Blogger.