Flash Multi File Upload
By admin | June 30, 2008
import com.adobe.serialization.json.JSON
// button name browsebtn,uploadbtn
browsebtn.addEventListener(MouseEvent.CLICK,browse);
uploadbtn.addEventListener(MouseEvent.CLICK,upload);
//var fileRefList:FileReferenceList = new FileReferenceList();
var instance:Object = new Object();
instance.fileList = new Array();
instance.multiple = true;
instance.queued = true;
instance.fileList = new Array();
instance.fileProgress = new Array();
instance.progress = {
filesFinished: 0,
filesTotal: 0,
bytesFinished: 0,
bytesLoaded: 0,
bytesTotal: 0
};
function browse(typeFilter:Object = null):Object {
if (instance.fileReference) return false;
instance.fileReference = new FileReferenceList();
//instance.fileReference.addEventListener(Event.SELECT,selectHandler);
//instance.fileReference.addEventListener(DataEvent.UPLOAD_COMPLETE_DATA, completeHandler);
//instance.fileReference.addEventListener(Event.COMPLETE,completeHandler);
addEvents(instance.fileReference);
if (instance.fileReference.browse()) return true;
//instance.fileReference.browse();
//trace(’browsing’);
return false;
}
function upload(options:Object = null):Object{
trace(’Upoading’);
if (!instance.fileList.length) return false;
for (var i:Number = 0; i < instance.fileList.length; i++){
uploadFile(instance.fileList[i]);
}
return true;
}
function selectHandler(event:Event):void
{
if (instance.fileList.length) removeFile();
//var request:URLRequest = new URLRequest("http://localhost/fupload/myupload.php");
var file:FileReference;
var files:FileReferenceList = FileReferenceList(event.target);
var selectedFileArray:Array = files.fileList;
for (var i:uint = 0; i < selectedFileArray.length; i++)
{
file = FileReference(selectedFileArray[i]);
addEvents(file);
// here i added this
instance.fileList.push(file);
//file.addEventListener(Event.COMPLETE, completeHandler);
// commented and taken to upload
/*
file.addEventListener(Event.COMPLETE, completeHandler);
try
{
file.upload(request);
}
catch (error:Error)
{
trace("Unable to upload files.");
}
*/
}
instance.fileReference=null;
}
function completeHandler(event:Event):void {
trace("completeHandler: " + event);
}
function uploadCompleteDataHandler(event:DataEvent):void {
//var file:FileReference = FileReference(event.target);
var mydata:Object = JSON.decode(event.data);
trace("uploadCompleteData: " + mydata.size);
//trace('helo');
}
function indexOfFile(file:Object):Number {
var list:Array = instance.fileList;
for (var i:Number = 0; i < list.length; i++){
if ((list[i].name == file.name) && (list[i].size == file.size)) return i;
}
return -1;
};
function uploadFile(file:FileReference):void {
var request:URLRequest = new URLRequest("http://localhost/fupload/myupload.php");
var data = new URLVariables();
request.data=data;
request.method='POST';
file.upload(request);
}
function finishFile(file:FileReference):Boolean {
var removeFiled:Boolean = removeFile(file, true);
if (removeFiled) instance.uploading = false;
return removeFiled;
};
function valueOfFile(file:FileReference):Object {
return {
name: file.name,
size: file.size,
type: file.type,
creationDate: file.creationDate.valueOf(),
modificationDate: file.modificationDate.valueOf()
};
}
function removeFile(file:Object = null, finished:Boolean = false):Boolean {
if (file){
var num:Number = indexOfFile(file);
if (num == -1) return false;
instance.fileList[num].cancel();
instance.fileList.splice(num, 1);
instance.fileProgress.splice(num, 1);
if (finished){
instance.progress.bytesFinished += file.size;
instance.progress.filesFinished++;
} else {
instance.progress.bytesTotal -= file.size;
instance.progress.filesTotal--;
}
} else {
if (!instance.fileList.length) return false;
for (var i = 0; i < instance.fileList.length; i++) instance.fileList[i].cancel();
instance.fileList.length = instance.fileProgress.length = 0;
if (finished){
instance.progress.bytesFinished = instance.progress.bytesTotal;
instance.progress.filesFinished = instance.progress.filesTotal;
} else {
instance.progress.bytesTotal = instance.progress.filesTotal = instance.progress.bytesFinished = instance.progress.filesFinished = 0;
}
}
if (!instance.fileList.length) instance.uploading = false;
return true;
};
function addEvents(ref):void {
//ref.addEventListener(Event.CANCEL, cancelHandler);
//ref.addEventListener(Event.OPEN, openHandler);
//ref.addEventListener(ProgressEvent.PROGRESS, progressHandler);
//ref.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
//ref.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
//ref.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
ref.addEventListener(Event.SELECT, selectHandler);
ref.addEventListener(Event.COMPLETE,completeHandler);
ref.addEventListener(DataEvent.UPLOAD_COMPLETE_DATA,uploadCompleteDataHandler);
}
function cancelHandler(event:Event):void {
}
function openHandler(event:Event):void {
}
function securityErrorHandler(event:SecurityErrorEvent):void {
}
function ioErrorHandler(event:IOErrorEvent):void {
}
function httpStatusHandler(event:HTTPStatusEvent):void {
}
function progressHandler(event:ProgressEvent):void {
}
Topics: My Code | No Comments »
If Hairloss is the major problem you have
By admin | October 22, 2007
You are searching for a product to overcome your hair loss problem.
You want to compare a a large number of products before you buy any of them.
You want to read the writings and review about the products by them who has used the product.If you will visit the site as mentioned below you will get the products , you are looking for.You will read review of a number users of the products, with star ratings against each of them.You will be able provide your own comments on the product.
You will also be able to rank them based on your best choice.
You will also get hairloss guide at this site.Please see
http://www.justsayhi.com/bb
provillus
Topics: My Opinion | No Comments »
cashadvance1500.com-pay day loan
By admin | October 12, 2007
you need a loan which is unsecured, short in term, consumer loans in nature.
you will find a thousands of cash advance stores nationwide.
you want a loan to be processed faster,and sent via wire to the destination
you want the loan to be applied online over internet
then you are looking for a loan called pay day loan or cash advance.
You will find these advances in pay day loan
- Usually processed faster
- Apply anonymously from the public
- Complete the application in the privacy of your own home
- No difficult handwriting that may confuse the lender
- Have time to find ALL the information you need at home
- No standing in line at a store for hours
Requirements for pay day loans processing:
personal information, employment information, current banking and financial information, and references.
All online payday loans require applicants to meet minimum criteria in order to successfully complete the application. These minimum requirements usually consist of:
- Being Employed for at least 3 consecutive months.
- Earning at least $1,000 per month in income.
- Having a valid checking account open for at least 3 months
You will find this site which grants pay day loan is the best choice.
Topics: My Opinion | No Comments »
you are not able to decide if to take insurance for boats you have
By admin | October 6, 2007
you are not able to decide if to take insurance for boats you have
purchased.
One day when you were talking with one of your friend, you came
to know that , your friend has taken one insurance.
You thought that, the cost of taking insurance is not so much,
You will not expend too much on it, why not to take it. You asked
your mind.
You also talked with your friend on this. Your friend said that
one web site covermyboat.co.uk provides online boat insurance for
every situation. They have comprehensive boat insurance policies.
And also third party liability options.
Within minutes you can obtain online boat insurance, Most of them are instantly approved
And they need 24 hours only to supply an accurate boat insurance quote for older or mjore valuable
vessels
You will get Insurance for canoes up to yachts, and No complicated forms to complete.
You visited the site boat insurance, said to your mind yes I will take one boat insurance cover when I will be able to draw a good balance sheet for my business transactions.
Thanks
Topics: My Opinion | No Comments »
travel insurance for the elderly- travel insurance of your choice
By admin | September 29, 2007
if insuring yourself while on travel is something you
expect from an organisation, then you will find this
very much informative.
You are looking for widest ranges of travel insurance policies
with exceptional customer’s care.
You are looking for an insurance which covers any medical conditions
which no other agencies covers. You will feel not to go any where
Please see this site
Up to 92 days cover on Annual Multi Trip policies
Competitive level of cover - see schedule of benefits
Low Excesses (with the excess waiver option)
Many hazardous activities included at no extra cost
Dedicated 24 hour medical emergency service
Over 65 insurance, Family Insurance, Annual Insurances and much more.
Additional savings are possible with Cover My Travels Family travel insurance policies.
If you are planning a gap year or you have purchased a holiday home to escape the harsh British winters, you may require travel insurance for a longer period than is catered for with Annual Multi Trip policies. Here you will find long stay insurance policies is very much helpfull.
And much more…
Just see this site…
travel insurance for the elderly
travel insurance for the elderly
Topics: My Opinion | No Comments »
Need home improvement, your search is over
By admin | September 23, 2007
Very often some of you searched for some good quality
home improvement products.
You might have come across number of sites on the net on
your good effort.
Some of you may or may not like to invest a lot on home improvement.
Some of you may or may not have been able to find a product suitable
to your need.
You will have searched a lot on the net for uPVC windows, iPVC Doors,
Conservatories, Roomtrims, Driveways, Garage Doors, Garage COnservations, Kitchens
products each.
If you will visit anglianhome you will find a product of your choice, you might not
have found it before.
They offer a window style to suit every home. We install replacement uPVC Casement, Sash and Tilt and Turn double glazing - with a huge choice of different finishes, glazing and security options.
Whatever your needs, you will get right door for you. As manufacturer and also with installation aervice , many different styles of uPVC Front Doors, Patio Doors, French Doors and Sliding Doors - and they offer you a choice of security, glazing and furniture options.
extensive range of kitchens,Turn your garage into a warm habitable room ,A range of GRP (Glass Reinforced Plastic) doors ,great range of driveway designs,replacement for softwood fascias, soffits, bargeboards and cladding
what ever you need , you will get at this site
Within your family budget this site is good for all, for products of home improvement.
conservatory
http://www.anglianhome.co.uk/
Topics: My Opinion | No Comments »
VisionBedding.com- Your search for beddings for home is over..
By admin | September 21, 2007
VisionBedding.com- Your search for beddings for home is over..
You are looking for bedding. You are looking for photo bankets,pillows,dog beds
personalised photo gifts for your home.
And you found this site on net, what you will do is to see if you can
find a double layered blanket that will preserve your memories forever!
if you can choose a border size and color as well as the bottom fabric color of your blanket.
And then you may look for how to
personalizing your bedroom! you need Top layer (image side) , a soft & breathable celtic fiber while
the bottom layer is 320 Thread Count cotton in either black or white.
You are looking for duvets having an invisible zipper that encloses your comforter allowing for easy
removal.
you may also want to search for an offer of Photo Pillows if available in sham or throw pillow style.
Made of a plush microsuede top (image side) & your choice.
You want to personalise your dog bed even.
you are searching for Styles & Themes for Children, Kids, Teens, and Adults!
a Design to fit anyones hobby, style, or personality!
If you are tired of the limited selection at Bed Bath & Beyond or other bedding superstores…
This site has all to look no further!
you find at one site all beddings need and your search for home beddings are over…..
Bedding

Topics: My Opinion | No Comments »
Shopping cart software, shopping cart, ecommerce software
By admin | September 6, 2007
Ashop Commerce is a leading provider of hosted shopping cart software. It offers a complete solution for merchants to sell online.
With all the payment processors and Banks Payment Process intigrated.
If you want a different experience than the other shopping cart software available in the market.
If you are looking for Shopping cart software, shopping cart, ecommerce software
what attracted me is theme editor, 50 editable theme are ready for use. And template system is also customisable.
- 50 editable themes
- Columns editor
- Customisable template system
- Custom page creator
- Unlimited main / sub categories
- Integrated store search
- Customisable product display
- Large image views and auto thumbnail resize
- Supports all external web animation and graphic programs
- Splash homepage option
- Website table and columns background image upload
- Favicon.ico support
and of course the payment option with “Create your own payment options”.
- Easy shopping cart payment gateway setup (2 minutes)
- Accept credit cards, real time payments
- Integrated with all major banks and payment gateways
- Offline (manual) credit card processing
- Cheques, bank deposit
- Create your own payment options
- CVC (Security Code) support
- Confirgurable currency symbol
- Multi currency support
- Google checkout integration
Thousands of features available
And also security with Full HTTPS/SSL support provided and many more…
Full HTTPS/SSL support
- Password-protected SSL secured admin panel
- Geographical IP address location checking
- High risk IP address and e-mail checking
- Post query analysis
Pricing is not so much, if U want a nice ecom application with web hosting with your own domain each.
Please see…. and have a look…..
Topics: My Opinion | No Comments »
digital frames, digital photo frame, digital picture frame
By admin | September 6, 2007
You have digital cameras and camera phones. Please see this site for digital frame which is a plugin
for displaying your digital photos on wall , any where….
Need digital frames, digital photo frame, digital picture frame please see this site.
switch your memory card to the digital frame >> and view.
How to manage the digital frame…..
1. Take your photos
2. Transfer your memory card into your Digital Photo Frame
3. Using your remote control choose your favorite slide show
All frames are compatible with JPEG, MP4, DivX, AVI, MPEG1, MPEG2, MPEG4, MP3, WMA, WAV formats.
Besides your pictures, you can also view movie clips that have been taken with your camera, even play music in the background.
The standard, Five-in-one Card Reader supports CF/XD/MS/SD/MMC cards. In addition, there is also a USB 2.0 connection for maximum compatibility.
With the built-in stereo speakers, you don’t need any extra cables to plug an external speaker. However all products have 1/8” headphone out for more private use.
The infrared remote control (included with the price) offers an easy access to the settings and preferences of your photos.
There is no complex setup required. Plug your 9V adapter (comes with the frame) to your Digital Picture Frame and you are ready to go!
After looking into the above , you will say that this frame is for good tools for your photos and video clips, yes you can afford $100 for a frame, which is worth the product.
Go digital frame here….
Thanks
Topics: My Opinion | No Comments »
Get paid to blog, get paid for blogging, blog advertising, advertise on blogs, blog for money
By admin | September 6, 2007
You searched many times tomake income from your blogs. You might have also been involved with mylot, ibibo each. You said that these sites are blogs , paying for posts on their site.
If you will smorty, it is not a site like any site you might have come across before reading this post.
smorty pays to post opinion on your blogs. these opnions are related to third part sites.
It is a service connecting advertisers with bloggers. Advertisers can pay bloggers to write opinion posts with links back to the advertisers site
Get paid to blog, get paid for blogging, blog advertising, advertise on blogs, blog for money at smorty.
There are many Paid to Blog Programs on the net. Smorty wins , because it only ask for your opinion and payment is weekely and good for all bloggers.
Post some smorty facts on your blogs for opinion and get paid. Best Blog Money Making Ideas on the net.
Just sign up and start generating some income as money from blogs.
Topics: My Opinion | No Comments »

