Browse Function
Hi guys,
I have a button which, when clicked, should open a window where you can see a the contents of a folder on a the CD in the CD drive. I have this code
import flash.net.FileReference;
var listener:Object = new Object();
listener.onSelect = function(file:FileReference):Void {
var url:String = 'disegni/DESIGNSTATE' + file.name;
getURL(url, '_top');
txt.text = 'File selected: ' + file.name;
}
listener.onCancel = function(file:FileReference):Void {
txt.text = 'User cancelled';
}
var fileRef:FileReference = new FileReference();
fileRef.addListener(listener);
mc.onPress = function() {
fileRef.browse();
}
the button has an instance name of "mc".
if i wanted to put this code ON THE BUTTON itself instead of on a keyframe on the timeline, how would i need to change the code?
Thanks guys for any eventual help!
mike
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 09-13-2008, 10:29 AM
View Complete Forum Thread with Replies
Sponsored Links:
Browse Function?
hey all, I was just wondering if there's anybody that got an idea for how I can add a Browse function where it will be possible to choose a diretory, like those dialogboxes that sometimes are used in different programs.
I can't seem to find anything on a thing like this, and I have been thinking of maybe I have to use some kinda java applet, but truth is I never tried using java since I can never find any good tuts on the language.. :/
hope somebody got any good ideas for a solution
thanks!
View Replies !
View Related
Browse CD Function
Well, have you ever wondered how the pros create the "Browse CD" button's script using flash and AppleScript. Well I thought the same and wanted to know how to do it. I just can't figure it out. I use "geturl" and link it to the folder and then it opens it in Firefox (Default browser), is there a way to always open it in the Explorer on Windows, and Finder in Mac.
Please could you tell me how to open folders in Mac and Windows in their file browsers Finder and Explorer
View Replies !
View Related
Browse CD Function
I am having trouble finding how to do a function. I am creating a projector that launches an installer, but there needs to be a "Browse CD" button.
Currently I am able to get this to work by using KIXtart 4.22 but we cannot use this due to licensing.
Is there an easy way to implement this function? The part that I need to figure out is how to get it to bring up the correct drive, in other words it needs to know which drive the Install CD is in and show you that one.
Is ActionScript capable of this on its own?
View Replies !
View Related
CD-Rom "browse Contents" Function & Linking To Files?
Hello my fellow Flash enthusiasts...
I was wondering a couple things for a CD-Rom i'm creating for my employer... first of all, i have many external files that my Flash Projector is linking to. The main projector and autorun file are in the root directory of the CD-Rom, of course, but all the other files are in sub-directory folders. Files such as PDFs, DOCs, and MPGs are being linked to (by way of the "getURL" Action) and working perfectly, but whenever i make a path to an EXE, it won't open or install the program as it should. Anyone have any ideas? Here's an example of what my "getURL" paths are looking like: "Folder1/Folder2/Setup.exe" . And yes, i've made sure that everything was typed out right, so i know it's not an error in my typing, but obviously, for EXEs, the command should be something different?
And secondly, i want to have a "Browse Contents of this CD-ROM" function/button, but i can't find anywhere that tells how to get the projector to open up a Windows Explorer panel/window to actually open up the CD-Rom and display its contents. Anyone know what i'm doing wrong?
Thank you VERY much in advance for your help!
...SuperbBoy
View Replies !
View Related
Browse?
Hi guys, im trying to setup a browse button using flash8 (keyword, trying)
I have a button component named brws_btn
and a text input named file_url
on stage
I am trying to make it so when a user selects a file from the browse the full url to the file is displayed in the file_url field...
Can anyone help?
I tryed it myself below is what i have....
It doesn't work...
Code:
import flash.net.FileReference;
import flash.net.FileReferenceList;
var listener:Object = new Object();
var files:FileReferenceList = new FileReferenceList();
files.addListener(listener);
brws_btn.addEventListener("click", addFiles);
function addFiles(event:Object):Void {
files.browse([{description:"Mp3 Files", extension:"*.mp3"}]);
}
listener.onOpen = function(f:FileReference):Void {
file_url.text = f.name;
};
Thanks for your time
~Gabor
View Replies !
View Related
Browse
Hi,
Is it possible to make a browse button in flash 8?
this is not an internet application. This application that im making that this browse button would be in would be downloaded onto the persons hardrive.
Thanks
View Replies !
View Related
OS Browse...
I was asked the question if Flash would be able to browse and upload a file from the user's computer? I wasn't sure, does anyone have the answer?
Thanks in advance...
View Replies !
View Related
Browse Button
Hi,
I'd like to know if it's possible to create a browse button in Flash that let choose a file from his hard drive?
and if it's possible can u tell me how can i do it ?
thanks a lot
bye
View Replies !
View Related
Browse Window
Hey I need to somehow allow my user to browse through his harddrive for image files and get the file path to the file he selects and put it in a text box. How can I get a browse window like that? Is there a component for it, possibly? I've looked for one, but didn't find any.
Thanks,
Rick
View Replies !
View Related
Browse From Current To Next
Hi,
thank you for reading this!
Well, I am not good att actionscripting. As you can see from the following:
What is the difference between this:
Code:
gotoAndStop(currentframe + 1);
And this:
Code:
_root.gotoAndStop(_root._currentframe+1);
.
I want to simply browse from one frame to the next frame in the main timeline.
The first one sends me back a couple of frames and the second one I found here and I havenīt tried that yet.
Thanx!
Regards
ik.
View Replies !
View Related
Button To Browse A CD
Hello, I'm new to the forum. I was hoping someone could tell me how to make a button that can access files on a CD. The CD has the Flash projector on it and autoruns as soon as it is popped in. In the movie there are buttons that are supposed to access files on the same CD. Any help would be appreciated.
View Replies !
View Related
Browse Window/Box?
Is there a way to make a browse window open so that a user could select a file??
i have a mp3 player that i made with flash, it loads the file, plays it, and can pause stop, gotoNExt and it has a volume control. instead of making the user type in the name of the file and hit the load button, can i make a browse window come up.
with that, a user would be able to select the file, the path would automatically be copyied into the inputTxt field, and then that user would hit load. [then the mp3 file would load - or give an error]
-Any help would be much appreciated;
--Steve
View Replies !
View Related
Browse For File
Hey everyone, i'm writting a program to allow users to upload files to a server through Flash. Does anyone know how to bring up the "Browse for files" Dialog box with flash. so users can search there hard drive for the files they want to upload. I know how to do this with Javascript, but i need it to work inside a flash movie. Thanks for the help.
View Replies !
View Related
Browse Files
Hello!
I've created a mail form.
I just need now a help in placing on it something like a "Browse..." button, so I can browse my local disc, and then have a string with a path to this file, that I will send to php code.
Where I can find something like this?? Or how I can create something like this??
Or maybe it can not be done in Flash?
Thank you for any help...
View Replies !
View Related
Browse For File
Hello,
Is it possible to create a browse button in flash that allow the user to select a file on their hard drive, which will then be submitted to a web server?
Cheers, guys - you've been really helpful
View Replies !
View Related
Browse HD For Image
Greetings all!
Please give me a clue... I want to load an external image into my swf but I want the user to be able to browse their hard drive for the image of their choice. I've searched in vain for a tutorial. Anyone have any insight to this?
Thanks.
View Replies !
View Related
Browse To Upload
Hey everyone! I'm on a team that is developing an interface in Flash MX 2004 Professional and we need to have the functionality where the user can upload a file (graphic, textfile, or music file) from their computer to our server. Is there an easy way to do this? Any direction will be greatly appreciated!
View Replies !
View Related
Browse Button
hey everybody... i was wondering if any body knew of like a flash component or something where you can press a browse button and search your comp for a file... and then up load it
just like this, only in flash
http://www.imageshack.us/
is this possible?
View Replies !
View Related
[CS3] Flash Browse
Hi Everyone,
I have created a CD-ROM using Flash CS# Professional and AS2, which displays various buttons linking .pdfs, .docs, .pps, and other files.
Does anyone know how I could enable a search of the documents found on the CD? I know that I could create an index in Adobe, but I would rather the directory of the CD to appear. Can any one give any ideas on how I would go about doing this?
Thank you,
Rehannah
View Replies !
View Related
Browse For File
hi..
I need to open the windows open dialog box from action script...
I tried the following code, in which i selected a jpg file and loaded it in a movieclip.. It works fine.. But with a small problem.. The problem is that , it can load only the files from the current folder. If i try to open the files from other folders, it doesn't work..
can anybody help me to solve this problem...
here is the code i tried...
import flash.net.FileReference;
var listener:Object = new Object();
var filename;
listener.onSelect = function(selectedFile:FileReference):Void
{
filename=selectedFile.name;
mc.loadMovie(filename);
loadimage=filename;
};
var imageFile:FileReference = new FileReference();
imageFile.addListener(listener);
browse.onPress = uploadImage;
function uploadImage(event:Object):Void
{
imageFile.browse([{description: "Image Files", extension: "*.jpg;*.gif;*.png"}]);
}
View Replies !
View Related
Browse And (up)load A Swf Into The Swf?
I'm creating an application, and the end user will need to browse and upload (or just load) a swf into the application.
Is this possible? I quickly glanced over the FileUpload sample file, but I don't know if that will get me what I'm looking for.
Any thoughts?
View Replies !
View Related
FileReferenceList / Browse
I'm using the code below as part of an upload application that we're working on and what I want is for the user to be able to select browse multiple times, and the code below removes previously queued files each time the browse function is invoked. How do I fix this? This isn't the full code, but it's enough to show the problem.
ActionScript Code:
package
{
import flash.display.SimpleButton;
import flash.display.Sprite;
import flash.external.*;
import flash.events.*;
import flash.net.FileReferenceList;
import flash.net.FileReference;
import flash.net.URLRequest;
import flash.net.URLRequestMethod;
import flash.net.URLVariables;
import flash.events.MouseEvent;
public class selectonly extends Sprite
{
private var _fileref:FileReferenceList = new FileReferenceList();
private var file:FileReference = null;
public function selectonly()
{
trace("start");
this._fileref.addEventListener(Event.SELECT, this.selectHandler);
this._fileref.addEventListener(Event.CANCEL, this.cancelHandler);
this.addEventListener(MouseEvent.CLICK, browsefiles);
ExternalInterface.addCallback("browsefiles", browsefiles);
}
private function selectHandler (event:Event):void
{
trace("select handler");
var file_reference_list:Array = this._fileref.fileList;
var item:FileReference;
var queuedFiles:Number = file_reference_list.length;;
trace(queuedFiles);
for (var i:Number = 0; i < file_reference_list.length; i++)
{
trace(i);
item = file_reference_list[i];
var jsArgument:String = item.name;
var fileresult:Object = ExternalInterface.call("filelist", jsArgument, i);
}
}
private function cancelHandler (event:Event):void
{
trace("cancel handler");
}
public function browsefiles(event:Event)
{
this._fileref.browse();
};
}
}
View Replies !
View Related
Browse Button
I don't understend how to get the information about the file that was uploaded. I neet the information because i want to insert the file in data base.
Code:
var fileReferenceList:FileReferenceList = new FileReferenceList();
DobaviKarikatura.BrowseButton.addEventListener(MouseEvent.CLICK, onClick);
function onClick(event:MouseEvent):void
{
fileReferenceList.browse();
}
View Replies !
View Related
Browse For Files
Hello,
I have encountered a problem, which might sound simple but I've spent hours trying to find the solution - without success.
I need a command which will open a browse window on client's computer, in order to retreive a path to a selected file and to store it in text field or a variable. Thanks!
View Replies !
View Related
Filereference.browse
hey, please if someone can help me, i'm trying to build a full function music player, the problem is that i can't make a usefull open button. I have try whit the filereference.browse() function but is not enought, I can see the file size nad name, but I can not load the file. For example I can find the file but and error by the path is show like 'can't load file file////C:/...........'.
can anyone tell me a way to set a path or read the path of the choosen file. Thanks.
View Replies !
View Related
BROWSE Not Working
Hi all, up until a few days ago the Browse command worked normally. Now the dialog only shows up when I launch the SWF, but not when I launch the HTML. Here's the code (taken from the Help Manual):
Attach Code
import flash.net.FileReference;
var listener:Object = new Object();
listener.onSelect = function(file:FileReference):Void {
trace("Opened " + file.name);
}
listener.onCancel = function(file:FileReference):Void {
trace("User cancelled");
}
var fileRef:FileReference = new FileReference();
fileRef.addListener(listener);
fileRef.browse();
View Replies !
View Related
Browse In Flash
This is kind of a misc. question:
Can you by any means of java script or anything else get a browse window to pop up from within flash?
Return the selected file, or even get a php script to upload it?
Thankyou.
View Replies !
View Related
SIZE THE SWF IN BROWSE
yow! good day..
i create one flash movie and will insert in html archive w/ 100% for Width and Height.
But inserted the file and changing to w=100% and h=100% the movieClips inner the swf was resizeded too!
:'(
i read something in kirupaForum.com about Stage.Object but i dont know use this code.
please any one can help me?
----->
Thks!
View Replies !
View Related
Browse Dialog Box
I'm creating an online mp3 player for a TAFE project, but i want the users to be able to play mp3 files from their own computer. So I'm wondering if theres a way to open a browse dialog box or something so the user can open their files.
Thanks,
Brendan Smith
View Replies !
View Related
Reg Browse Method
Hi all,
When I call the browse function it stores the file as an object in my filereference instance. If I can get the path of the file it is damn easy, but the flash.net.fileReference class only gives the name / size etc, but not the file path when we call the browse function.
Is there a way to get the file path when we call the browse function?
Thanks
Thil
View Replies !
View Related
Browse In Flash
This is kind of a misc. question:
Can you by any means of java script or anything else get a browse window to pop up from within flash?
Return the selected file, or even get a php script to upload it?
Thankyou.
View Replies !
View Related
Browse Pc For Files
Im developing an application that will run on a local PC as a projector file. The user needs to be able to browse their PC for .jpg files and click on the desired file name. The file name would then be stored and the image would be displayed later in the movie using loadMovie. How can I do this?
View Replies !
View Related
Browse Button
Thanks a lot buddies to answer my previous post, it certainly helped alot. There was another thing i wanted to ask, is it possible to create a browse button in Flash to upload a file from a client PC to the server ?
View Replies !
View Related
Directory Browse....
Hello, i would like to have a listBox that would GET all files that are somewhere in a folder at my server. Do i need Flash remoting to do something like this? Canīt it be done just using some external PHP script?
Thanks.
View Replies !
View Related
FMX-browse Button
Hi everyone!
I was wondering if there is any way to have a browse button in flash. I'm referrring to those html buttons that allow the user to select a file from their computer to be uploaded to the server. i.e: attachment in a web based email site.
I've never seen this feature in flash, I'm not even sure that exisits...unfortunately I have always seen this issue resolved by poping an html window instead.
Any ideas welcome.
thanks!
View Replies !
View Related
Browse Cd Problem
hello to all
i have a flash file exe
there is a link in exe file called browse CD
i want that when i click on that link it show the contents of cd
i dont know what is the procedure for that
please some one help me i am new to flash
any sample code will be appreciated
thanks
View Replies !
View Related
Browse Without All The Buttons...
Hi, I think it's been posted several times, which is how to make a
Full screen browser without all the funciton buttons...
not the "real" full screen, I still want the upper blue browser bar stay there with "X" close window button, but hide all the other forward and back button stuff...sorry to ask it again if it's been posted before, I just don't know which key word to use when searching...
if I type "full screen" it'll show me the whole full screen without browse window..so...please help me out, many thanks~
View Replies !
View Related
AIR: Uploading Without Browse?
Is it possible to upload files in AIR without a browse()?
I want to build an app that shows you a tree of your local directories. Then I want to display the files next to the tree on the right. The user can select as many as they wish, click UPLOAD, and then its done.
The only way I can see right now is to show them a tree, and when they press BROWSE, load up FileReferenceList.browse() which is terrible.
Is there a way to accomplish what I want to do? I already have a custom tree built, and I can show all of the files in the right-hand window. I just can't find code that will allow me to upload selected files.
Please help!
View Replies !
View Related
|