Flash Upload File with ASP.NET

Uploading file from Flash to PHP through FileReference is fairly simple.

move_uploaded_file($_FILES[’Filedata’][’tmp_name’], $_FILES[’Filedata’][’name’]);

You can easily find it in any Flash upload file related tutorials or posts. But I spend almost one hour searching for a solution of how to upload file from Flash to ASP.NET.

dim myFile as HttpPostedFile=Request.Files(0)
myFile.SaveAs(Server.MapPath(myFile.FileName))

That’s it. Seems fairly simple. It’s in VB and the C# version you can get from The Algorithmist

It looks like something like this:

foreach(string fileKey in _context.Request.Files)
{
HttpPostedFile file = _context.Request.Files[fileKey];
file.SaveAs(Path.Combine(uploadDir, file.FileName));
}

Attention Singaporeans: StarHub is listed as a SPAM ISP

I was trying to send out some legal bulk mail last night but rejected by spamhous.org. If you have any website hosted in Singapore and by StarHub, please take note you’ll have some problem sending emails especially your contact us form.

Okay, I’m an IT Nerd


NerdTests.com says I'm a Technology Geek.  What are you?  Click here!

3 Firefox add-ons that a Flash developer must get

Web Developer Tool Bar : I find the resize function is very useful.

Tamper Data: If a Flash website involves loading external data or communicating with backend scripts, this is a tool helps to see what Flash is doing.

Flash Tracer: Displays Flash trace function results in FireFox. The setup procedure is in this blog entry.

JSFL - Adjust elements x,y to integer

This script adjust the coordinates (x,y) of all elements on the stage and in the library into integers. (More…)

Flash best practice: stage dimension 1000×570

Before starting on the design a Flash website, first thing first, the dimension of the file must be decided. Even full browser flash (FBF) sites can’t run away from this. I’ve seen sites that have overlapping text due to wrong dimensions, such as this new FWA site. (More…)

Microsoft Photosynth - A super mockup?

Photosynth form Microsoft’s lab looks really amazing. The program analyzes a group of photos and joins them together forming a 3D model view. But it’s too good to be true.
(More…)

Update on VIM for Actionscript

I’ve updated _vimrc and the syntax file to solve the following two issues:

  • Disable pasting using mouse middle button: added “map ” at the end of _vimrc.
  • Turn syntax to be case sensitive: commented out “syn case ignore”
  • You can download these two files here
    >>vimrc<<
    >>actionscript.vim<<

    JSFL - change all images compression type in the library

    From time to time I get the problem that the compression type of imported images in the library is set to “Lossless PNG/GIF” (especially when using Mac) which blows up the swf file size a lot. It’s easy when there are just a few of them. You can manually click and change. But sometimes there are a few hundred…

    Today, I finally got the urge to try out jsfl to automate this pain (I really have hundreds of images to change). Surprisingly, jsfl is not difficult at all. I got the code out within 5 minutes. I’ve put in a few more options in the script. Anyone can modify it easily.

    Enjoy!

    Failed - Safe high score list for Flash games with SWFEncrypt - not safe

    Thanks for guycalledseven’s help. AVE Imperator can de-compile SWFEncrypt-ed files. I’m going to say bye bye to ASV.
    (More…)