View Full Version : Ilyas
pom
May 8th, 2003, 10:12 AM
Recycling...
Even more recycling...
MuHaAHaHAHaHAaa!! I'll win this! :evil: (evil credits go to Zemax)
pom
May 8th, 2003, 10:25 AM
In case you're interested:
cellSize=3;
radius=10;
damp=.85;
dampR=.8;
numLetter=0;
letterSpacing=40;
shift = .5;
letterP=new Array(
[1,1,1,1,1,0],
[1,1,0,0,0,1],
[1,1,0,0,0,1],
[1,1,1,1,1,0],
[1,1,0,0,0,0],
[1,1,0,0,0,0]);
letterO=new Array(
[0,1,1,1,1,0],
[1,1,0,0,0,1],
[1,1,0,0,0,1],
[1,1,0,0,0,1],
[1,1,0,0,0,1],
[0,1,1,1,1,0]);
letterM=new Array(
[1,1,0,0,0,1],
[1,1,1,0,1,1],
[1,1,0,1,0,1],
[1,1,0,0,0,1],
[1,1,0,0,0,1],
[1,1,0,0,0,1]);
function containerRollOVer(){
delete this.onRollOver;
for (var clip in this) this[clip].explode();
}
function displayCell(letter){
var num=1,i,j,mc;
clip=this.createEmptyMovieClip("container"+numLetter,numLetter++);
clip._x=30+numLetter*letterSpacing;
clip._y=20;
clip.createEmptyMovieClip("cell",0)._visible = 0;
clip.cell.lineStyle(cellSize,0xcccccc,100);
clip.cell.lineTo(.15,.45);
for (j=0;j<letter.length;j++){
for (i=0;i<letter[0].length;i++){
if (letter[j][i]==1){
mc=clip.cell.duplicateMovieClip("cell"+num,num);
mc.i=i;
mc.j=j;
mc._x=i*(cellSize+shift);
mc._y=j*(cellSize+shift);
num++;
}
}
}
clip.cell.removeMovieClip();
this.clip.onRollOver=containerRollOver;
}
MovieClip.prototype.explode=function(){
this.vx=(Math.random()-.5)*2*radius;
this.vy=(Math.random()-.5)*2*radius;
this.onEnterFrame=function(){
this.resizeCell();
this._x+=this.vx;
this._y+=this.vy;
this.vx*=damp;
this.vy*=damp;
if (Math.abs(this.vx)+Math.abs(this.vy) < .08)
this.onEnterFrame=spinningAround;
}
}
function spinningAround(){
var diffx=this._x-this.i*(cellSize+shift);
var diffy=this._y-this.j*(cellSize+shift);
this.resizeCell();
this.vx-=diffx/7;
this.vy-=diffy/7;
this.vx*=dampR;
this.vy*=dampR;
this._x+=this.vx;
this._y+=this.vy;
if (Math.abs(this.vx)+Math.abs(this.vy) < .01){
this._x=this.i*(cellSize+shift);
this._y=this.j*(cellSize+shift);
delete this.onEnterFrame;
this._parent.onRollOver=containerRollOver;
}
}
MovieClip.prototype.resizeCell=function(){
var diffx=this._x-this.i*cellSize;
var diffy=this._y-this.j*cellSize;
var dist=diffx*diffx+diffy*diffy;
this._xscale=this._yscale=this._alpha=(10000-dist)/100;
// you can try that instead:
// this._xscale=this._yscale=this._alpha=(1000-dist)/10;
}
displayCell(letterP);
displayCell(letterO);
displayCell(letterM);pom :)
ahmed
May 8th, 2003, 12:47 PM
whoa!!
that's trippy! :A+:
lostinbeta
May 8th, 2003, 12:56 PM
Hehe... that looks quite familiar Ilyas =)
senocular
May 8th, 2003, 01:05 PM
Originally posted by lostinbeta
Hehe... that looks quite familiar Ilyas =)
heh I was gonna say that then reference ^
ahmed
May 8th, 2003, 01:09 PM
yeah.. your entry should be disqualified :P
senocular
May 8th, 2003, 01:10 PM
... unless obtained through osmoses
lostinbeta
May 8th, 2003, 01:11 PM
Why should it be disqualified?? Ilyas created that effect a long time ago when we were trying to figure out how to do it off of orisinal.com :P The coding is all his :)
pom
May 8th, 2003, 01:12 PM
Hey, I told you I was recycling... :beam:
ahmed
May 8th, 2003, 01:13 PM
lol :P
Jasninder
May 8th, 2003, 03:33 PM
wish i was that good at scripting, m only good wid animation n music :(
great one ilyaslamasse, wish i cud understnd a word of wat was in tht code hehehe
mdipi
May 8th, 2003, 04:39 PM
aww. now i really want to learn action script@!
noxious
May 9th, 2003, 10:27 AM
hi pom! your's great! nice and smooth!
very nice and clean scripting!
as i have said, im just telling the truth.. you are really great!
just browsing your codes gives me some "headache" tho it was laid plain and clean.. maybe i need some more "exploits" to fathom those. :P (no kidding :))
keep up the great exploit! :thumb:
pom
May 10th, 2003, 04:17 PM
The last one is inspired by a file by Rolf Ruiz from Alesys.net :)
mdipi
May 10th, 2003, 04:27 PM
i love the last one!
Alex
May 10th, 2003, 04:29 PM
I loved both of them, Its awsome, im using the same effects on my site. (cough cough :P)
lol they are great. :)
andr.in
May 11th, 2003, 02:18 PM
This is not fair! I don't stand a chance!
darkstarclone
May 13th, 2003, 01:17 AM
SSSSSSSSSIIIIIIIIIIICCCCCCCCCCCKKKKKKKKKKK. Awesome. They are both great. :A+:
Jasninder
May 13th, 2003, 07:10 AM
:stunned: :angry:
NoT fAiR :(
heheheh
it looks nice man, can u plz send me the source plz:trout:
hehhee, great 1 dude.
pom
May 19th, 2003, 06:13 PM
Sorry for the delay :)
All you need is a symbol called "pom" on the scene and this code on the first frame of the movie (and a high frame rate):
// Inspired by Rolf Ruiz from Alesys.net
nClips = 10;
Mouse.hide();
pom._visible = 0 ;
this.onEnterFrame = function(){
rota = 20*Math.sin(t+=.2)*Math.cos(b+=.05);
for (var i = 0; i < nClips; i++){
var clip = pom.duplicateMovieClip("pom"+i,i);
var dx = _xmouse - pos.x;
var dy = _ymouse - pos.y;
clip._x = pos.x + dx*i/10;
clip._y = pos.y + dy*i/10;
clip._rotation = i/nClips*rota;
clip._alpha = i/(nClips)*100;
updateAfterEvent();
}
pos = {x:_xmouse,y:_ymouse};
}pom :phil:
lostinbeta
May 19th, 2003, 06:57 PM
Thats awesome Ilyas. I hope you don't mind if I experiment with this ;)
pom
May 19th, 2003, 07:07 PM
Please do, my friend :)
lostinbeta
May 19th, 2003, 07:15 PM
Yippie! Now just to get ideas on what to do. Which shouldn't be hard.
Jasninder
May 20th, 2003, 08:56 AM
Thanx for the source ilyaslamasse, i never expected u wud do that :) u r cool :)
i tried that and my mouse arrow disappears when i take it over the movie.Am i missing something?
:q:
i m attaching my fla file, dunno if i did something wrong,but was it suppose to hide my mouse pointer only???(-:
pom
May 20th, 2003, 10:27 AM
Originally posted by ilyaslamasse
All you need is a symbol called "pom" on the scene and this code on the first frame of the movie (and a high frame rate)If you don't have that pom clip, all it will do is hide the mouse... :phil:
Jasninder
May 20th, 2003, 02:44 PM
oh ok kool, well that pom symbol is everything :)
anyway, thanx m8
pom
May 29th, 2003, 12:52 PM
I've updated the first one a tiny bit :)
Jasninder
May 29th, 2003, 01:34 PM
Hi pom
This is exactly what i m looking for a client, not even 1 % change in it.Amazing as ever, hopefully i can find something like this.Great job and it was an amazing entry at the flash menu battle too, thanx for the same =)
pom
May 29th, 2003, 01:55 PM
Do you want the source? (pretty much the same as posted before).
Jasninder
May 29th, 2003, 02:41 PM
i have the source m8,but u know i am so dumb wid action scripting, dont know how it works and stuff, last time i tried it and u said i need tht symbol :P hehehe, thanx for the offer tho :) i kno tht's the main thing.
Neo-Geo
May 31st, 2003, 12:44 AM
thatS AmaZInG!! GrEat PieCe of Art
Jasninder
May 31st, 2003, 12:44 PM
http://www.nettersolutions.com/kirupa/homer.gif
Still have'nt found anything even close..................
we 'v got a winner, 2nd entry kicks some serious butt.
:stunned: jaz
pom
May 31st, 2003, 01:11 PM
Thanks Neo Geo :) By the way, where are you from in Malaysia? :)
Neo-Geo
June 1st, 2003, 02:47 AM
I'm from Kuala Lumpur.. capital city of malaysia..
been here before?
pom
June 1st, 2003, 02:01 PM
Yep, I spent some time in Singapore last year, so I took a few trips through Malaysia. I didn't really like KL so much, it's definitely too hot for me :P, I prefered Malacca and the Cameron Highlands (I froze my *** up there but ****! It's beautiful!).
Cheers.
Ilyas :)
pom
June 1st, 2003, 06:56 PM
Can you see the font in the last one??
Code:
// code by Zemax
cs = function (r, x, y) {
this.createEmptyMovieClip("S"+z, (++z));
var M = this["S"+z];
M._x = x;
M._y = y;
for (var i=0; i<250; i++) {
var a = i/8 * 1.5707963267948966192313216916398;
var x = 1/5 * i * Math.cos(a);
var y = 1/5 * i * Math.sin(a);
var c = Math.round(255 * i / 500);
M.lineStyle(5, (c<<16) + (c<<8) + c);
M.lineTo(xo+x, yo+y, x, y);
var xo = x;
var yo = y;
}
M.onEnterFrame = function () {
this._rotation += r;
}
}
cs( 10, 50, 30);
this.createTextField("T", 1000, 130, 25, 300, 20);
//T.embedFonts = true;
var tf = new TextFormat();
tf.size = 8;
tf.font = "FFF Galaxy";
tf.selectable = false;
tf.color = "0";
T.text = "You are under control";
T.setTextFormat(tf);
lostinbeta
June 1st, 2003, 07:20 PM
Ilyas: No I cannot see the font in the last one. I don't have FFF Galaxy installed and if it is created via AS you will have to import the font into the library and set embedFonts to true.
Also, maximum amount of entries is 2... you will have to remove 1 :-\ :(
pom
June 1st, 2003, 07:24 PM
Lost >> Nevermind, I've figured it out (yipee! I suck with fonts, I know... :( )
And I know I'm only allowed to 2, this was just for fun...
pom :phil:
lostinbeta
June 1st, 2003, 07:30 PM
OMG I HAVE THE SAME PROBLEM!!!!! I thought I was just being stupid, but I cannot at all get it to work!
Just to double check if I was doing it right I check out this tutorial from actionscript-toolbox...
http://actionscript-toolbox.com/flashmx_createtext.php
My code was almost exactly the same and it still didn't work.
lostinbeta
June 1st, 2003, 07:34 PM
Geez, you coulda replied to me instead of editing your last post and making me look like an idiot :P
So how did you fix your problem? I would REALLY like to know.
pom
June 1st, 2003, 07:38 PM
I'm not sure we're talking about the same thing because what I was doing was stupid :P In fact I had forgotten to export my font for Actionscript ( :shame: )
Very nice tute by the way. actionscript-toolbox is an amazing site...
lostinbeta
June 1st, 2003, 07:40 PM
I exported mine for actionscript. I set it's linkage settings and everything, but it wouldn't work, then if I set embedFonts to false it worked fine for me, but of course not for people without the font.
Argh..... eh, perhaps I will give it a try later tonight. I gotta go now, all of your footers are great man.
Oh and yeah, as-toolbox rocks.
pom
June 1st, 2003, 07:42 PM
Yep, fonts are evil...
See you, man :) (and thanks :love: )
pom
June 2nd, 2003, 04:07 PM
Just testing: can you see the font now?
lostinbeta
June 2nd, 2003, 06:22 PM
Yes sir...
pom
June 2nd, 2003, 08:32 PM
Thanks, my boy :cowboy:
Clown Staples
June 10th, 2003, 03:44 PM
happy birthday Ilyas... youve been here a whole year
pom
June 11th, 2003, 05:18 AM
Haha! True :) But I was already there before, on the previous board :beam:
comicGeek
June 11th, 2003, 05:40 AM
Yeah you are pom on actionscript.org right?
pom
June 11th, 2003, 09:06 AM
Yes I am :) I haven't been on as.org for quite as long as I've been here tough. This is the place that got me started :beam:
comicGeek
June 11th, 2003, 11:44 PM
yeah! AS.org is for too serious stuff for serious people looking for too serious stuff! :)
pom
June 12th, 2003, 06:31 AM
Actually, I like their Cool Sites section :) Other than that, it's true that there are very few people who hang out in their random forum :-\
comicGeek
June 12th, 2003, 06:34 AM
yeah, but it's still a great place to learn. I first stated learning intermediate scripting there then continued here!
Jasninder
June 15th, 2003, 05:36 PM
are u guys talkin about some site where i can learn action script?
cool, is it rite from the basic??
as.org opened- american singles dotcom :p
ahahhaa
http://actionscript.org/
?????
hey i m gona pm either of u guys to help me n stuff:P
thanx in advance :bad:
lostinbeta
June 15th, 2003, 07:06 PM
Yea, AS.org is a dating service, but when we say it on a flash forum it is automatically mentally converted to actionscript.org ;)
Great place indeed.
Jasninder
June 16th, 2003, 06:32 PM
Originally posted by lostinbeta
Great place indeed.
Hmmm... i wonder wich site are u talking about :P
hahahah
just kiddin m8 i know wat u meant
lostinbeta
June 16th, 2003, 06:34 PM
Are you sure ;)
lostinbeta
July 3rd, 2003, 03:37 PM
Ilyas: Since I have been experiencing much modem down time I have been experimenting with your motion blur code, I must say, that is some fun stuff to play around with!!!! Here is one example of what I created....
http://www.lostinbeta.com/experimental/motionBlur2a.html
For anyone interested the code I used is...
TextField.prototype.updateTimeValue = function() {
myTime = new Date();
h = myTime.getHours();
m = myTime.getMinutes();
s = myTime.getSeconds();
ms = myTime.getMilliseconds().toString();
h == 12 || h == 0 ? hours=12 : h<10 ? hours="0"+(h%12) : hours=h%12;
m<10 ? minutes="0"+m : minutes=m;
s<10 ? seconds="0"+s : seconds=s;
ms.length<2 ? milliSeconds="00"+ms : ms.length<3 ? milliSeconds="0"+ms : milliSeconds=ms;
h<12 ? amPM="AM" : amPM="PM";
this.text = hours+" . "+minutes+" . "+seconds+" . "+milliSeconds+" . "+amPM;
};
nClips = 10;
time._visible = false;
time.timeBox.autoSize = true;
this.onEnterFrame = function() {
rot = 810*Math.sin(t += .01)*Math.cos(b += .01);
for (var i = 0; i<nClips; i++) {
var clip = time.duplicateMovieClip("time"+i, i);
clip._x=275, clip._y=200;
clip._rotation = i/nClips*rot;
clip._alpha = i/(nClips)*100;
clip.timeBox.autoSize = true;
clip.timeBox.updateTimeValue();
clip._name == "time"+(nClips-1) ? myColor=new Color(clip).setRGB(0xff0000) : null;
updateAfterEvent();
}
}; You may have to adjust the position of the textbox in the pom clip, you can get some interesting effects with that :)
pom
July 3rd, 2003, 03:49 PM
Haha! that's sweet, Lost :)
lostinbeta
July 3rd, 2003, 03:51 PM
=) Thanks Ilyas!!!
Means a lot coming from you (my mentor) :beam:
pom
July 3rd, 2003, 03:54 PM
:blush: :blush: :blush: Just don't get much better than me, please :P
lostinbeta
July 3rd, 2003, 03:58 PM
HAHAHA!!! Wow, I needed that laugh. Although that was funny it is very mean of you to get my hopes up :(
j.k :P
:trout:
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.