Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Community Boards > Just for Kicks Challenges

Reply
 
Thread Tools Rate Thread Display Modes
Old 08-26-2003, 08:41 AM   #1
farafiro
Addicted To FLASH
 
farafiro's Avatar
 
Join Date: Dec 2001
Location: EGYPT
Posts: 12,439
Send a message via MSN to farafiro Send a message via Yahoo to farafiro
Cool Reusable block of code

ok, the idea is more like JLM wrote on the ADD Line Change Line challange:
Quote:
Originally posted by JLM
suggestion: life, the aim is to create lifeforms that interact on the screen. Mating should be included some how and some how fitness should be defined by 'beauty'. Any one can add or modify a function method or class, but each should try to contain an idea, ie function Movement. the world should aim to be underwater and 3D. no function method or class should be more than 25 lines and where possible it should cram on one line. If there is no post in 1 week a new competition starts. well thats my idea anyway. sure there are some better ideas out there.

JLM
My Idea:
Make any reusable block like prototype, functions,........ that can be used too easy to create something usefull
let's start with only one ruel "25 line", I think it should be more, but let's try it
another thing, what do u think to make it time limit challaenge, for example it lasts for one month from now
__________________
â€* GOD Is Near â€*
Questions Don't PM for Questions . Thanks
An eye for an eye, make the whole world blind
_____________________________________________GHANDI
farafiro is offline   Reply With Quote
Old 08-26-2003, 09:03 AM   #2
farafiro
Addicted To FLASH
 
farafiro's Avatar
 
Join Date: Dec 2001
Location: EGYPT
Posts: 12,439
Send a message via MSN to farafiro Send a message via Yahoo to farafiro
Default

ok, I will start
Aim, is to make a menu/button system that u can built any part of the menu with only one line
ActionScript Code:
//////////////////// Menu, Button System v1001 //////////////// /////////////////// auther : Farafiro <Alfred> //////////////////// //////////////////////////////////////////////////////////////////////// // Variables : // mcNam : The name of the created MC/Button // mcDpth : The depth of the created MC/Button // txtNam : The name of the created textfield in the MC/Button // mcX, mcY : The coordinates of the created MC/Button // mcCol : The color of the created MC/Button // btWidth, btHeight : The dimentions of the created MC/Button //////////////////////////////////////////////////////////////////////// MovieClip.prototype.createMenu = function(mcNam, mcDpth, txtNam, mcX, mcY, mcCol, btWidth, btHeight) {     mc = this;     mc.txtNam = txtNam;     mc.mcNam = mcNam;     mc.mcDpth = mcDpth;     mc.mcX = mcX;     mc.mcY = mcY;     pointsArray = [[0, 0], [btWidth, 0], [btWidth, btHeight], [0, btHeight]];     bt = mc.createEmptyMovieClip(mc.mcNam, mc.mcDpth);     bt._x = mc.mcX;     bt._y = mc.mcY;     bt.beginFill(mcCol);     for (i in pointsArray) {         bt.lineTo(pointsArray[i][0], pointsArray[i][1]);     }     mc.bt.createTextField("txt", 10, _x+2, _y+2, mc.bt._width-5, mc.bt._height-5);     mc.bt.txt.border = true;     mc.bt.txt.text = mc.txtNam; }; ////////////////////////////// Usage ///////////////////////////////// _root.createMenu("a", 1, "First", 50, 100, 0xFF6600, 100, 36); _root.createMenu("b", 2, "Second", 150, 100, 0x336699, 100, 36); _root.createMenu("c", 3, "Third", 250, 100, 0xFF99FF, 100, 36); _root.createMenu("d", 4, "Fourth", 350, 100, 0xFF6699, 100, 36); ////////////////////////////// Testing ///////////////////////// a.onRollOver = b.onRollOver=c.onRollOver=d.onRollOver=function () {     trace(this.txt.text); };
__________________
â€* GOD Is Near â€*
Questions Don't PM for Questions . Thanks
An eye for an eye, make the whole world blind
_____________________________________________GHANDI

Last edited by farafiro; 08-26-2003 at 09:06 AM..
farafiro is offline   Reply With Quote
Old 08-29-2003, 10:07 AM   #3
farafiro
Addicted To FLASH
 
farafiro's Avatar
 
Join Date: Dec 2001
Location: EGYPT
Posts: 12,439
Send a message via MSN to farafiro Send a message via Yahoo to farafiro
Default

over 50 visitors and no additions
I guess no one interested
__________________
â€* GOD Is Near â€*
Questions Don't PM for Questions . Thanks
An eye for an eye, make the whole world blind
_____________________________________________GHANDI
farafiro is offline   Reply With Quote
Old 08-29-2003, 10:13 AM   #4
pom
Allez les Bleus!!!
 
pom's Avatar
 
Join Date: Oct 2002
Location: Paname
Posts: 2,495
Default

I'm afraid it's not precise enough...
Quote:
Make any reusable block that can be used to create something usefull
That's too vague, Fara
pom is offline   Reply With Quote
Old 08-31-2003, 05:01 AM   #5
farafiro
Addicted To FLASH
 
farafiro's Avatar
 
Join Date: Dec 2001
Location: EGYPT
Posts: 12,439
Send a message via MSN to farafiro Send a message via Yahoo to farafiro
Default

so, what do u suggest??
__________________
â€* GOD Is Near â€*
Questions Don't PM for Questions . Thanks
An eye for an eye, make the whole world blind
_____________________________________________GHANDI
farafiro is offline   Reply With Quote
Old 08-31-2003, 05:57 PM   #6
pom
Allez les Bleus!!!
 
pom's Avatar
 
Join Date: Oct 2002
Location: Paname
Posts: 2,495
Default

Well, for instance, "Reusable Actionscript navigation systems" would be a bit more precise
pom is offline   Reply With Quote
Old 09-01-2003, 03:25 AM   #7
farafiro
Addicted To FLASH
 
farafiro's Avatar
 
Join Date: Dec 2001
Location: EGYPT
Posts: 12,439
Send a message via MSN to farafiro Send a message via Yahoo to farafiro
Default

so would u start?? give hints??
__________________
â€* GOD Is Near â€*
Questions Don't PM for Questions . Thanks
An eye for an eye, make the whole world blind
_____________________________________________GHANDI
farafiro is offline   Reply With Quote
Old 09-01-2003, 07:47 AM   #8
pom
Allez les Bleus!!!
 
pom's Avatar
 
Join Date: Oct 2002
Location: Paname
Posts: 2,495
Default

Well, YOU started I'll try to add something tonight...
pom is offline   Reply With Quote
Old 09-22-2003, 01:57 AM   #9
black
flashing vampire
 
black's Avatar
 
Join Date: Dec 2001
Location: nowhere
Posts: 1,406
Default

Quote:
Originally posted by farafiro
so, what do u suggest??
from your content of post on top reusable functions wil be a sensible, i think.
black is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:24 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.