Browse button

How to create browse button with action script 3

Page 1 of 1

7 Replies - 5353 Views - Last Post: 03 January 2009 - 12:06 PM

#1 launcher  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 01-January 09

Browse button

Posted 01 January 2009 - 02:11 PM

is there a way to create browse button with action script 3 in flash cs3? :blink:
Is This A Good Question/Topic? 0
  • +

Replies To: Browse button

#2 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1148
  • View blog
  • Posts: 7,145
  • Joined: 07-September 06

Re: Browse button

Posted 01 January 2009 - 04:40 PM

Look into
FileReferenceList
Was This Post Helpful? 0
  • +
  • -

#3 launcher  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 01-January 09

Re: Browse button

Posted 02 January 2009 - 03:32 AM

where is that?
I found some notes for FileReferenceList but only for action script 2
but for 3 nothing useful.
Can you help me?
Was This Post Helpful? 0
  • +
  • -

#4 CyanBlue  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 6
  • View blog
  • Posts: 156
  • Joined: 01-September 06

Re: Browse button

Posted 02 January 2009 - 10:19 AM

FileReferenceList exists in AS3...
http://livedocs.adob...e=00001687.html
Was This Post Helpful? 0
  • +
  • -

#5 launcher  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 01-January 09

Re: Browse button

Posted 02 January 2009 - 12:46 PM

I don't understend how to get the information about the file that was uploaded.
Can somebody help me with this?
Here's the code for button.

var fileReferenceList:FileReferenceList = new FileReferenceList(); 
DobaviKarikatura.BrowseButton.addEventListener(MouseEvent.CLICK, onclick); 
function onclick(event:MouseEvent):void 
{ 
   fileReferenceList.browse(); 
}


Was This Post Helpful? 0
  • +
  • -

#6 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1148
  • View blog
  • Posts: 7,145
  • Joined: 07-September 06

Re: Browse button

Posted 02 January 2009 - 01:11 PM

Well, all you have to do is call the browse function, wait until there is the SELECT event dispatched and then call to the event's name, and it willreturn the filename that was selected:

var fileBrowser:FileReference = new FileReference();
fileBrowser.browse();
fileBrowser.addEventListener(Event.SELECT, fileSelectedFunction);
function fileSelectedFunction(e:Event):void{
	trace("FileName: " + FileReference(e.target).name);
}

Was This Post Helpful? 0
  • +
  • -

#7 launcher  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 01-January 09

Re: Browse button

Posted 03 January 2009 - 02:57 AM

Thanks, but how to return the path to the file, because i want when the user select the file it goes in the data base or the path to it.
Was This Post Helpful? 0
  • +
  • -

#8 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1148
  • View blog
  • Posts: 7,145
  • Joined: 07-September 06

Re: Browse button

Posted 03 January 2009 - 12:06 PM

Why don't you try looking at the documentation on the class. It gives examples and everything:
http://livedocs.adob...eReference.html
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1