new multiple file uploader with preview

Hi friends,

in the past months i’ve been busy with work & life, so my time on this project was limited.
i managed to do some things , but i’m not so satisfied from the final result, thats why it took long time to upload the version.

new in this version –

xml file for configuration :

<?xml version=”1.0″ encoding=”utf-8″ ?>
<uploaderSettings lang=”en”>
<language id=”en”>
<choose>Choose file to upload :</choose>
<uploading>Uploading ..</uploading>
<uploadFailed>Upload Failed.</uploadFailed>
<encoding>Encoding ..</encoding>
<upload_deny_error_is_encoding>Wait for encoding to end.</upload_deny_error_is_encoding>
<uploadDenyErrorMaxUploadExceeded>Max number of files uploaded.</uploadDenyErrorMaxUploadExceeded>
<no_files_to_upload>No files to upload..</no_files_to_upload>
<size default=”false” name=”640×480″ width=”640″ height=”480″></size>
<size default=”true” name=”1024×768″ width=”1024″ height=”768″></size>

it’s kinda self explainable..

i’m using zend amf for the uploading progress – so you can see each file upload progress (with this i’m not so pleased as each connection takes few milliseconds which causes upload to be delayed a bit)

you can add more languages to the config file (or submit a language in the comments and i’ll add it to the config file)

i really think of dumping the amf + progress and return to the old upload method – waiting for your comments on that.

another improvement – you can specify the height and the flash will stretch to the desired height (means more then 3 file strips)
from now you can upload mp3 files (with client side preview of the songs)

watch the demo, or download the pack here (multiple file uploader)

let me know if you want to be a part of the development for this component, i am thinking of uploading it to an svn server for ppl to contribute.



ByteArray upload – Error #2176 Solved !

as some of you may know one of flash player 10 updates “fixed a security hole” that allowed sending
URLLoader in the oncomplete of the last request.
now every URLLoader load function must be triggered with a mouse click – initiated by the user..

that fix broke some file uploaders (like Jonathan Marston nirvanix bytearray uploader) (and some other pieces of code) creating an exception on the second request.

now – i was looking for a solution that will allow me sending multiple – client side – reencoded images to the server, still showing some progress bar (as i can’t use the filereference.upload method).

after hours of playing with the 2176 Error, i decided to take another approch,
and welp – what do you know – it’s possible doing it with the Zend Amf framework for php, using flash’s Netconnection Object to send byteArray (‘s) to the server !

I’ll upload an example soon – and i’ll connect it to the multiple file upload component i have here on the site , so it will show upload progress for each file ! (plus might add mp3 uploading as well)

Anyway – solution coming soon !


multiple files uploader with preview on client side


well it took a month but i’ve added some features to the image uploader,
so now it support multiple file upload , it still doesn’t have any progress bar as adobe decided to add the security feature (bug ?!) that allows uploading or downloading data from the server only triggered by a mouse click,
ok .. so the upload button supplies the click, but then after the first chunk is uploaded it should (and i read alot about it ..) continue the next chunk as it was triggered by the same click, but no no, it throws Error #2176 !!!
i sat hours trying to break this devil but nada …
so at the end, i packed all of the files in one post being sent to the server all at once to pass the damn bug!

the jpg encoding still needs some tweeking as it causes the computer to freeze for a second,

for now i added only a rotate function to the image, but you can add as much features as you want as you can download the source files.

feel free to comment and request features.

Source : multiple files uploader with preview on client side
Demo : multiple files uploader with preview on client side

update : v2.01 is out (29/9/09)

First i’d like to thank you all for the suggestions, requests and support for the work,

thanks to Swen for the french translation of the uploader , you can download the fla file here with the original v2.0 files here

i came across a great fix for adobe’s JPEGEncoder class , making it async – by Derrick Grigg ,

so i’ve implemented it in my uploader, so now it’s faster and has better performance.
plus some minor bug fixes.

i’ll try to implement xml language file so it will be easier to translate it to any language,
and will implement a better javascript support + hopefully i’ll have time to create uploading preloader …


* if you find this script usefull, help spread the word , use your favorite social bookmark tool to tell the rest ! *


client side image resize flash cs4 – filereference.data

well in the latest version of flash (cs4) there are some improvment to the actionscript classes, with some security changes.
i noticed that there are no sources for client side image manipulation tools that uses this great feature.

i did came accross a brilliant work of someone (i don’t remember where it was :( … ) that used the filereference.data to play mp3 files with some nice mainipulations to the audio from the user hard-drive, i’ll try to find a reference for it soon…

anywayz , i wrote a nice demo that loads an image from the user harddrive , show a preview of the image (scaled to max_height and max_width) , have a rotate option, and upload option that encodes the file to a 90% quality jpg which reduce the image size dramaticly , that way a normal image, that has been take with a camera (around 3-4 megs) will be uploaded as a 80k – 100k jpg file.
that will save alot of time , and eliminates the need for a server side image resizing (wasted server time & disk space)
more, you can use the script to add color transform manipulation to the image (b/w etc…),
cropping features, (maybe content awareness – image retargeting ).

attached is the fla (cs4), actionscript classes, php source files.

still things that i intend doing , upload precentage bar, and status msgs (jpg encoding / image scaling / uploading …)

if you want to use the code, and improve it be my guest. but let me know and it will be nice if you leave some credit.

client side image resize cs4

the demo : Client side image resize demo

package : Client side image resize Source

Important !!

version 2 is up, check out : Multiple files uploader with client side resize


vbook – facebook app

well i did this thing for me & friends few months ago, and decided today to open it to the public.
i’ve lunched the vbook (Vbook) as an expirement.

vbook preview

this app allows to view ‘hidden’ user albums and pictures.
now hidden are simply albums with there privacy setting set to public, connected to a user which disable his profile being watched by others. means, you can see the user’s albums and pictures even if his profile is private.

i’d say it’s a nice feature provided by them users :)

well , have a ride and tell me what you think..



sql joke

A SQL query goes into a bar, walks up to two tables and says, “Can I join you?


as3 scrollbar – free as3 scroller class written in actionscript 3 (flash)

this is a simple scroller class i wrote that helps me in attaching a scroller to every movie clip i want very easily.

the usage is very simple :

var myScroller = new Scroller(source Movie Clip , Width , Height , Scroller Face MovieClip , Align );

the scroller uses the tweenlite tweening class that can be found at : http://www.TweenLite.com

at the moment it only support left side positioning and no horizontal scrolling, but it’s really easy to fix the code so it can fit anyones needs. i might do it one day…

anyways you can download the scrollbar component here



accordion class – flash actionscript3 (as3)

in flash as3 you don’t have any accordion component, not that i like using those components,i’d prefer use a nicely written code instead :)

so there i was looking for a vertical accordion for one of my works, i came accross this nice class, that does everything in a very simple code. the only problem i found it that it had only a horizontal version…

looking at the comments i saw there is a need for a vertical one,

so i fixed the code in a way that it can work both ways.

the new accordion constructor has an extra of 2 parameters :

public function accordion($width:Number, $height:Number, panelNumber:Number=0, navWidth:Number=0,navHeight:Number=0,allignment:Boolean=false)

the navHeight – represent the height of the navigation panel for Vertical mode,

and the alignment flag – false is for horizontal, and true … welp you’ll figure that out yourself.

the only thing left open in working with 2 accordions one inside the other :), i’ve managed to get that one going, but there is a problem with something not allowing the inner accordions btns to work as supposed. i’ll try to give it my time soon.

anyway great thanks to the one who wrote it, feel free to give the original page a visit.

download the sourcecode for my version : vertical and horizontal accordion source code



Combo Box in child swf doesn’t work (flash as2)

Well after struggling for hours on this bug i thought it would be nice to document it here …

maybe i can save some time from other coders.

welp, the problem is that the combo box , in the child swf (loaded dynamicly thru loadMovie or any other method)

is visible and pressed, but it won’t open, and won’t work.

if you run the child swf individually it will work perfectly , but when you combine them both — > NADA!

well, any guesses ? ……

the thing is that for some reason, you need to have a copy of the combo box component in your parent swf in order for it to work in the child swf , strange solution, but it works~!

so in case someone is looking for the answer for this annoying bug — > thats a simple solution for it,

i’d prefer adobe to do some bug fixing to them components …

(i havn’t checked for the bug in as3 compiled clips, maybe they did fix it in avm1 engine ..)

thats all for now .


XAML Browser Application

XAML Browser Application (XBAP) is a new Microsoft technology used for creating Rich Internet Applications.

i recently came across some kewl things made with xaml, so i tried to run some xbap files on my browser (‘s if i’ll count both of them explorer and firefox …) but with no luck.

it ask to download the file, and don’t know how to show it.

after looking abit around i found a fix on microsoft site, it is a registry fix that will allow (hopefully :) ) all of your browsers to run wpf files.

go on and download wpf regtool

then you can search goooogle for “filetype:xbap”,

you will get 300+ xbap applications, some of them are really neat!

looking forward for them to release the new silverlight 2 beta 2 sdk….