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 02-20-2005, 03:03 AM   #1
Hosma293
Registered User
 
Hosma293's Avatar
 
Join Date: Sep 2004
Location: *Slaps hand on the Map* HERE!
Posts: 41
Default Take on THIS Challange!

Hi All

If you think of yourself as an ActionScript Guru then take on this challange.
The Challange is quite simple..
Make a Text2Binary and Binary2Text converter!
And that may sound easy but unless you know your ActionScript it is no easy task!
It does not have to be done completely in ActionScript because its extremely hard to get everything right and it must NOT use PHP!

If anyone takes on this challange post your converter here. The best one wins!

PS: You don't actually win anything, its just for fun.
Hosma293 is offline   Reply With Quote
Old 02-20-2005, 03:11 AM   #2
CyanBlue
Super Moderator
 
CyanBlue's Avatar
 
Join Date: Jan 2002
Location: Centreville, VA
Posts: 24,879
Default

Uh... What do you mean by 'Text2Binary and Binary2Text converter'??? Can you explain???
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer
http://CyanBlue.FlashVacuum.com
http://www.FlashVacuum.com
http://tutorials.FlashVacuum.com

Do NOT PM, Email or Call me... Your question belongs right in this forum...
CyanBlue is offline   Reply With Quote
Old 02-20-2005, 04:02 AM   #3
Laguana
Well known nobody
 
Join Date: Jul 2004
Location: Australia
Posts: 818
Default

I think he means turning the text into it's binary representation (like an A is actually represented by some number in ascii, which then has it's own representation in binary)
Laguana is offline   Reply With Quote
Old 02-20-2005, 03:19 PM   #4
Xeef
Off-Line
 
Xeef's Avatar
 
Join Date: Aug 2004
Location: Ibiza/Spain language :Hungarian/German/ abit English
Posts: 6,539
Default

ActionScript Code:
t = "Hope understand right"; function T2B(T) {     A = T.split("");     for (a in A) {         A[a] = ord(A[a]).toString(16);     }     return A.join(""); } function B2T(T) {     A = "";     for (a=0; a<T.length; a += 2) {         A += chr((Number("0x"+T.substr(a, 2))));     }     return A; } trace(T2B(t)); trace(B2T("5468697320697320746f6f6f6f6f206561737920212121"));
Xeef is offline   Reply With Quote
Old 02-20-2005, 03:31 PM   #5
Xeef
Off-Line
 
Xeef's Avatar
 
Join Date: Aug 2004
Location: Ibiza/Spain language :Hungarian/German/ abit English
Posts: 6,539
Default

PS.

T2B --> will fail on Characters which has a ASCii Nr below 15 (woud need to put a "0")
Xeef is offline   Reply With Quote
Old 02-21-2005, 08:00 AM   #6
Hosma293
Registered User
 
Hosma293's Avatar
 
Join Date: Sep 2004
Location: *Slaps hand on the Map* HERE!
Posts: 41
Default

Xeef, Could you make it use two text boxs and two buttons to do the conversions?
e.g.
_______________ _______________




_______________ _______________

|convert to binary| |convert to text|

Say if you clicked on 'Convert to Binary' then flash would read the text from the left textbox and the binary text would appear in the right box and vise versa for 'Convert to Text'

Last edited by Hosma293; 02-21-2005 at 08:03 AM..
Hosma293 is offline   Reply With Quote
Old 02-21-2005, 08:24 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

heheheeeeee
this was done by pixelwit so long ago
http://www.actionscript.org/forums/s...3&page=2&pp=15
see post #23
__________________
â€* 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 02-21-2005, 08:38 AM   #8
Hosma293
Registered User
 
Hosma293's Avatar
 
Join Date: Sep 2004
Location: *Slaps hand on the Map* HERE!
Posts: 41
Default

Its supposed to be a competion, People aren't making this for me because I can make one myself
Hosma293 is offline   Reply With Quote
Old 02-21-2005, 09:11 AM   #9
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

lol
sorry mate but IMO this can't be a competition for it needs no talent
only one or two ways to do it
so if somone did it b4, no need for new entries
__________________
â€* 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 02-21-2005, 09:20 AM   #10
Hosma293
Registered User
 
Hosma293's Avatar
 
Join Date: Sep 2004
Location: *Slaps hand on the Map* HERE!
Posts: 41
Default

Good Point.. Bugga, I wanted to make a competion thats never been heard of!
Hosma293 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 05:31 PM.


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.