upload a file

  • [PT]volumes
  • Novice
  • Novice
  • [PT]volumes
  • Posts: 28

Post 3+ Months Ago

hi all,

i'm a litle noob at flash, so i just whant to know how i do a thing like this,

Image

i'm trying to make a contact form with attachment with php + flash, the code i know but in flash i dont know i make the box and the 2 buttons do browse the file and put the path of the file in the box... :S

can some one help me please.

Regards.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • classified
  • Expert
  • Expert
  • User avatar
  • Posts: 540
  • Loc: Bahrain

Post 3+ Months Ago

True , you'll be using PHP or ASP ... i've seen a tutorial about that 1 ... i just cant remember where ...
ever tried google ?
  • classified
  • Expert
  • Expert
  • User avatar
  • Posts: 540
  • Loc: Bahrain

Post 3+ Months Ago

http://www.flash-db.com/Tutorials/upload/

there ya go
  • [PT]volumes
  • Novice
  • Novice
  • [PT]volumes
  • Posts: 28

Post 3+ Months Ago

classified wrote:
http://www.flash-db.com/Tutorials/upload/

there ya go


thanks for your help.

i already find that, and download the source code, but when i try tu put in my form (fla) i have some errors:

Code: [ Select ]
**Error** Scene=Scene 1, layer=code, frame=1:Line 9: The class or interface 'flash.net.FileReference' could not be loaded.
   listener.onSelect = function(selectedFile:FileReference):Void {

**Error** Scene=Scene 1, layer=code, frame=1:Line 19: The class or interface 'flash.net.FileReference' could not be loaded.
   listener.onOpen = function(selectedFile:FileReference):Void {

**Error** Scene=Scene 1, layer=code, frame=1:Line 23: The class or interface 'flash.net.FileReference' could not be loaded.
   listener.onHTTPError = function(file:FileReference, httpError:Number):Void {

**Error** Scene=Scene 1, layer=code, frame=1:Line 28: The class or interface 'flash.net.FileReference' could not be loaded.
   listener.onIOError = function(file:FileReference):Void {

**Error** Scene=Scene 1, layer=code, frame=1:Line 33: The class or interface 'flash.net.FileReference' could not be loaded.
   listener.onSecurityError = function(file:FileReference, errorString:String):Void {

**Error** Scene=Scene 1, layer=code, frame=1:Line 39: The class or interface 'flash.net.FileReference' could not be loaded.
   listener.onComplete = function(selectedFile:FileReference):Void {

**Error** Scene=Scene 1, layer=code, frame=1:Line 49: The class or interface 'flash.net.FileReference' could not be loaded.
   var imageFile:FileReference = new FileReference();

Total ActionScript Errors: 7      Reported Errors: 7
  1. **Error** Scene=Scene 1, layer=code, frame=1:Line 9: The class or interface 'flash.net.FileReference' could not be loaded.
  2.    listener.onSelect = function(selectedFile:FileReference):Void {
  3. **Error** Scene=Scene 1, layer=code, frame=1:Line 19: The class or interface 'flash.net.FileReference' could not be loaded.
  4.    listener.onOpen = function(selectedFile:FileReference):Void {
  5. **Error** Scene=Scene 1, layer=code, frame=1:Line 23: The class or interface 'flash.net.FileReference' could not be loaded.
  6.    listener.onHTTPError = function(file:FileReference, httpError:Number):Void {
  7. **Error** Scene=Scene 1, layer=code, frame=1:Line 28: The class or interface 'flash.net.FileReference' could not be loaded.
  8.    listener.onIOError = function(file:FileReference):Void {
  9. **Error** Scene=Scene 1, layer=code, frame=1:Line 33: The class or interface 'flash.net.FileReference' could not be loaded.
  10.    listener.onSecurityError = function(file:FileReference, errorString:String):Void {
  11. **Error** Scene=Scene 1, layer=code, frame=1:Line 39: The class or interface 'flash.net.FileReference' could not be loaded.
  12.    listener.onComplete = function(selectedFile:FileReference):Void {
  13. **Error** Scene=Scene 1, layer=code, frame=1:Line 49: The class or interface 'flash.net.FileReference' could not be loaded.
  14.    var imageFile:FileReference = new FileReference();
  15. Total ActionScript Errors: 7      Reported Errors: 7


regards.
  • classified
  • Expert
  • Expert
  • User avatar
  • Posts: 540
  • Loc: Bahrain

Post 3+ Months Ago

i need to download it and test it mySelf ...
but looks like you either missing a class , or the class path is wrong ...
  • classified
  • Expert
  • Expert
  • User avatar
  • Posts: 540
  • Loc: Bahrain

Post 3+ Months Ago

ahhh ... my webserver wont work now , but nothing about classes there Will try it later on my laptop ...

Quote:
QUICK INSTALL

You need to have a Webserver with PHP support running

1. create a directory under your server web root and unzip files there
2. publish the swf there
3. create a "files" folder under your previous folder with write permissons (the PHP script attemps to create if it doesn't exists, but should have write permissons over the folder)
4. Check your example trough a browser (not from inside Flash) and webserver (i.e http://localhost/upload/upload.html)

Post your questions on http://www.flash-db.com/Board/


try the above ...
  • [PT]volumes
  • Novice
  • Novice
  • [PT]volumes
  • Posts: 28

Post 3+ Months Ago

u didnt understand what i said.

I try to put the browse button of the example you show and the code in my swf file, and i have that errors that i show u.

the example works fine.
  • [PT]volumes
  • Novice
  • Novice
  • [PT]volumes
  • Posts: 28

Post 3+ Months Ago

something is wrong here, try like this:


import flash.net.FileReference;
var fileUpload:FileReference = new FileReference();

only this 2 lines, and appears this error


**Error** Scene=Scene 1, layer=code, frame=1:Line 5: The class or interface 'flash.net.FileReference' could not be loaded.
var fileUpload:FileReference = new FileReference();

Total ActionScript Errors: 1 Reported Errors: 1


why the script dont call the function ?
  • classified
  • Expert
  • Expert
  • User avatar
  • Posts: 540
  • Loc: Bahrain

Post 3+ Months Ago

What Version of flash are you running ?
and did you copy all of the codes & paste em into yer project ?
  • beebers22
  • Born
  • Born
  • beebers22
  • Posts: 1

Post 3+ Months Ago

Be sure you are publishing your .swf file as a Flash 8.

I had the same problem and that is what I was doing wrong.

very simple, I hope it helps.

Regards.
  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Posts: 6229
  • Loc: Seattle, WA

Post 3+ Months Ago

Quote:
Wed Sep 27, 2006 4:51 pm

Post Information

  • Total Posts in this topic: 11 posts
  • Users browsing this forum: No registered users and 11 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.