View Full Version : My first completed experiment!!
Jubba
June 23rd, 2003, 03:56 AM
Ok, well first I would like to thank LostinBeta for his help in optimizing my Flash code.
Next here is a link to the file: http://www.bluefinatlantic.com/egTest/imageFunc/imageFunc.php
Warning: May be processor intensive on slower machines. Be careful!
Click on the image and move the pixels around. You can see that you are actually taking the image apart pixel by pixel.
What is happening in the file:
A php script reads the image file. It gets the color of every pixel in the .jpg and then sends the color information to Flash. Flash then attaches movieclips and sets their color to that of the cooresponding pixel in the .jpg file.
here is a link to the JPG file: http://www.bluefinatlantic.com/egTest/imageFunc/avatar.jpg
I was pretty happy with this. Its the first successful experiment that I have ever completed (i usually lose focus after about 3 hours) but this one only took about 2.5 hours so thats why I actually finished it.
The next stop is to allow people to upload their own images and do some sort of effect with them. :)
Source files are on next page.
ahmed
June 23rd, 2003, 04:14 AM
THAT IS **** AWESOME!!
wish this was MY experiment.. i LOVE it... very smart! :beam:
telekinesis
June 23rd, 2003, 04:15 AM
Holy crap, that is awesome jubba, the script had to be some hardcore stuff!
Great job, can't wait to see the version where you can upload your own image!
:thumb: :thumb: <<<< Two thumbs up!
Kitiara
June 23rd, 2003, 04:17 AM
Wow, that's fantastic Jubba. :)
Jubba
June 23rd, 2003, 04:19 AM
thanks. I'm glad you all like it. :) I'm happy with it as well. I am hoping I will have time to finish the next version tomorrow or the day after. I'll post once its finished. :)
eyeinfinitude
June 23rd, 2003, 04:51 AM
I got to see it before he posted it here on the forum. :love: Nice job, Jubba. =)
asphaltcowboy
June 23rd, 2003, 06:23 AM
teehee! *zooms in and makes Jubba all spotty* :beam:
lol, really nice work. I wish I could do something like that. In fact.. I wish I actually knew some ActionScript. My knowledge extends to play, stop, gotoandplay, gotoandstop lol ;)
:thumb:
Kitiara
June 23rd, 2003, 06:39 AM
Out of curiosity Jubba, just how complex a picture can this cope with? :)
pom
June 23rd, 2003, 10:19 AM
That's very nice :) It reminds me of something Bit did some time ago, did you check it? It was pretty spectacular too!
andr.in
June 23rd, 2003, 11:06 AM
wow man! This is awesome! How many lines are there in this php script? I wish I could do that! Next you could figure out a way to make the pixels that are dragged out disappear (I mean from the pic so that it leaves a white spot). ...ummm... nevermind It's actually no problem if you make it get the x and y pos of the mouse when it's clicked copy a white pixel there... nevermind...
Cool effect man!
Who/How did you came up with the idea anyway?
thoriphes
June 23rd, 2003, 11:07 AM
Spectacular! I didn't know you could do that with PHP. How did you send the information to flash?
Alex
June 23rd, 2003, 11:49 AM
Wow, Great job jubba!!!!
Jubba
June 23rd, 2003, 11:53 AM
Originally posted by Ilyas
That's very nice :) It reminds me of something Bit did some time ago, did you check it? It was pretty spectacular too!
Pom: Really? I'll have to check that out!
Syko: Actuallly, you could just set its _visible to 0 when you click on it. Much easier :);)
Thor: I'll attach the files in a few minutes.
lostinbeta
June 23rd, 2003, 11:57 AM
Originally posted by electrongeek
I got to see it before he posted it here on the forum. :love: Nice job, Jubba. =)
Me too :love:
That's great Jubba, no more Unresponsive AS errors!!!! It definitely runs a lot smoother now. And if I can say that on my PC, you know it's true ;)
:a+: Cognrats!
Jubba
June 23rd, 2003, 12:01 PM
yeah, thanks for the help with optimizing that code. I think I finally understand setInterval now ;)
oh, and Syko: I'm not really sure how I came up with the idea. I just new there was a huge list of image functions in PHP and I searched around until I found one that picked out the colors of pixels. Then I was like, "oh, well I do a loop here, and read the variables, and voila!" ;)
lostinbeta
June 23rd, 2003, 12:02 PM
If you want me to explain setInterval to you later I can definitely do that :)
Jubba
June 23rd, 2003, 12:10 PM
Here are the updated files!
lostinbeta
June 23rd, 2003, 12:10 PM
:thumb: cool.
Jubba
June 23rd, 2003, 12:13 PM
Originally posted by Kitiara
Out of curiosity Jubba, just how complex a picture can this cope with? :)
Well, since it is just reading the color at each pixel and then The flash displays it pixel by pixel, in theory it can deal with any complexity of imagery ;)
I'm not sure how processor intensive something larger will be. Well, we're going to find out eventually huh? I'll get working on the new version after I eat breakfast. :)
pom
June 23rd, 2003, 12:21 PM
Originally posted by Jubba
"oh, well I do a loop here, and read the variables, and viola!"Err... it's "voila" :P You don't want to know what "viola" means... :evil:
Jubba
June 23rd, 2003, 12:22 PM
I don't know what you're talking about! :P
:):):)
ahmed
June 23rd, 2003, 01:11 PM
can you make a dragging effect similar to the one on bit-101's Sept. 12, 2002 expriment? :)
Jubba
June 23rd, 2003, 01:16 PM
well, I'm sure it would be possible, but could you imagine 2500 pixels all having their own onEnterFrame command? Processors would die.
I wanted to do an explosion type thing, but Lost pointed out to me the drastic consequences of such a thing. His computer would jump out the window..
ahmed
June 23rd, 2003, 01:18 PM
lol :P true... great experiment nonetheless :)
Jubba
June 23rd, 2003, 01:25 PM
thanks, I enjoyed making it. Maybe i'll be able to find a way to get something cool like that to work... :)
Digitalosophy
June 23rd, 2003, 01:31 PM
nice job jubba
hojo
June 23rd, 2003, 02:28 PM
cool
Kitiara
June 23rd, 2003, 02:34 PM
Hmmm, wonder how well it would cope with a larger line art piece maybe? :) Or are we in exploding computer territory there? :P
Jubba
June 23rd, 2003, 02:50 PM
i'm sure it could handle it, but it would take longer for Flash to display it. :)
Niann
June 23rd, 2003, 03:33 PM
Very nice! It ran smooth on the 550MHz machine on my desk at work. =)
Cheers!
-Niann
andr.in
June 23rd, 2003, 04:09 PM
<i>Originally suggested by Jubba:</i>
Syko: Actuallly, you could just set its _visible to 0 when you click on it. Much easier
... like I said... Jubba always knows the easiest way!
Very cool experiment!
ahmed
June 23rd, 2003, 08:44 PM
did anyone here ever use MING library? you can create an swf with probably the very same effect, but it would all be programmed with php from scratch..
I wanted to try it but it needed some server config, so i didn't bother :nerd:
Jubba
June 24th, 2003, 01:41 AM
hmmmm MING is enabled on my server... I'll have to look into that...
if it works I can let you have some space on my server to test it out. :)
Jubba
June 24th, 2003, 02:02 AM
HOLY CRAP! It works on my server!
http://www.bluefinatlantic.com/egTest/swfFunc/swfTest.php
that Flash file was create completely with PHP! w00t!
its not my code, I got it from the manual but dam thats awesome!
ahmed
June 24th, 2003, 02:29 AM
that IS awesome..
thanks a lot, i will let you know whenever i come up with something ;)
seems like something new for you to master :P
Jubba
June 24th, 2003, 02:30 AM
well if you want I can create a place for you to upload your own files to my server... that way you wouldn't need me to upload stuff for you or whatever... let me know. :)
thoriphes
June 24th, 2003, 02:31 AM
jub, that link crashed my IE :-\
Jubba
June 24th, 2003, 02:32 AM
really?! huh... thats weird... works fine for me in IE, avant, and net.
Since its a php thing, the browser shouldn't affect it. I wonder why it did that...
thoriphes
June 24th, 2003, 02:33 AM
just tried it again, same thing. it might be on my end.
ahmed
June 24th, 2003, 02:37 AM
worked fine on my side :)
jubs-
currently im working on a few projects that are taking up most of my time, but in a month or so, i might start experimenting with MING, i will you let you know then =)
Jubba
June 24th, 2003, 02:39 AM
awesome. I'll be here! :)
thoriphes
June 24th, 2003, 02:39 AM
it was probably my .NET installation. dammit microsoft, can't you get anything right?
Jubba
June 24th, 2003, 02:39 AM
no, I don't think so... :P
ahmed
June 24th, 2003, 02:40 AM
Originally posted by Jubba
no, I don't think so... :P lol :beam:
javadi82
July 26th, 2003, 03:03 AM
experiment doesn't work?
the pixels in the white background are not visible when they are dragged onto the image.is this a feature of the experiment or am i experiencing an anamoly?
susheel.j
DigitalPimp
July 26th, 2003, 04:52 AM
that is incredible DUDE!!! Good job!! I hope be as good as you guys 1 day!
mdipi
July 26th, 2003, 08:08 AM
yeah jubba. your PHP to Flash integration never ceases to amaze me!
senocular
July 26th, 2003, 08:46 AM
wow, Im a little late on seeing this! Very cool :) good work!
This really doesnt apply so much here, because you're adding points pixel by pixel, but you can increase performance in adding a lot of attached clips if you add them in groups within empty movieclips since Flash starts chugging in the more clips you add in any one scope. For example, if with every column you added those pixels in their own movieclip you could spit later clips out faster.
Heres something I did a while ago showing that - this adds pixels row by row. One adds them all in the main timeline, and the other adds each row to its own movieclip.
http://userpages.umbc.edu/~tmccau1/flash/test/asciislow.swf
http://userpages.umbc.edu/~tmccau1/flash/test/asciifast.swf
These are based on ASCII images, not bitmaps though ;) (and yes thats me =) ... :P ) but you can really see the difference in speed between the two.
mdipi
July 26th, 2003, 08:55 AM
so we finaly see who this coding genus is...a guy with his tounge out :P
those aer pretty cool too. but with jubba's wouldnt it be a bit hard because they arent all the same colour...or even b&w.
senocular
July 26th, 2003, 09:00 AM
the color really doesnt matter, thats all parsed before attaching. but also, Im not saying Jubba's needs it. I think its great the way it is - pixel by pixel works for the experiment because it adds a kind of destructive-reconstructive aspect to the process involved in making it. This is just something Id figure Id throw out there since it can be an issue to deal with when messing around with a lot of attached pixels or clips of any kind.
fluid_0ne
July 26th, 2003, 09:35 AM
:thumb: :geek:
incredible...
lostinbeta
July 28th, 2003, 11:11 AM
Sen: Jubba and I worked for quite a bit on getting that thing to run without crashing a system (just to note, jubba did this whole thing himself, him and I just worked together on getting it to run without it crashing the flash plugin) ... and I hadn't even thought about doing it that way... it makes total sense too!!!!!
ARGH!!!!
hehe... smart guy you...
Mik3
July 29th, 2003, 12:57 AM
MUHAHAH IM PULLING JUBBA APART!
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.