How to make "open file" function

Is there a method that you can call that can prompt the user to open a file? Here is what I have:
var file:FileReference = new FileReference;
var newFile:BitmapData = new BitmapData (600,290,false);
newFile.draw(file.upload(file.browse()));
var s:Shape = new Shape();
s.graphics.beginBitmapFill(newFile);
s.graphics.drawRect(0, 0, board.width, board.height);
s.graphics.endFill();
board.addChild(s);
What would I put in the line in bold to achieve this?

How do I convert the File Reference to the bitmap data or a shape? This is what I have right now:
var file:FileReference = new FileReference();
var newFile:BitmapData = new BitmapData(600,290,false);
file.browse();
var selectedFile:FileReference;
file.addEventListener(Event.SELECT, file);
function f(e:Event)
var selectedFile = FileReference(e.target);
newFile.draw(e.target);
var s:Shape = new Shape();
s.graphics.beginBitmapFill(newFile);
s.graphics.drawRect(0, 0, board.width, board.height);
s.graphics.endFill();
board.addChild(s);

Similar Messages

  • How to make pdf file auto open with adobe reader after downloaded

    how to make pdf file auto open with adobe reader after downloaded

    I note from your system details that you have the plugin for adobe pdf s so I would have expected the files should open in firefox '''without''' you needing to explicitly download them.
    Once the files are open in firefox, you will also get the option to save them permanently to a location on your computer. If you wish I suppose you could set the file type pdf to be associated with and be opened by firefox instead of with the Adobe Acrobat Reader, but that would just seem to be an additional complexity.

  • How to make word files in mac

    how to make word files, presentations orview such files in mac

    Open Office can be opened in MS Word, and vice versa, looks nearly 100% same as Office and Word but is FREE
    tons use it
    http://www.openoffice.org/download/index.html

  • How can I open file?

    How can I open file; such as create other programme(Dream weaver...etc)?
    One of my friend will make website for me soon...(She is not Mac user...I think she will use dream weaver or other tools)
    So...I want take that file open in iweb09' is it possible?

    Imagine iWeb as a database which upon your command creates html files. It's a one-way process. You can generate more html files later but iWeb cannot open them. It only works with the "database" (the domain file).

  • How can i open file from adobe reader..i already have adobe read

    how can i open file from adobe reader..i already have adobe reader installed and cannot open a
    file and i cannot convert my file into pdf..

    Is the file really a PDF? Where is it? Have you tried opening it from within Reader?

  • How to systematically open file in a folder and process them with a program

    Hello,
    For my second question of the night.
    I am wondering if there is a way to open every file in a folder, run them through a vi, and then append the output to an array or spreadsheet? This would save me lots of time and my wrists.
    Thanks
    Solved!
    Go to Solution.

    Hi,
    Yes you can open a file in the folder by using 'List folder' function (Programming>File I/O>Advvanced File Function>List Folder) which lists all the files and folders in the given path. From that you can build the path and give to 'Open File' function.
    Hope this helps you. Let us know this solves your issue

  • How do I open files in InDesign CS5.5 CS5?

    How do I open files in InDesign CS5.5 CS5?

    Hi, are you trying to open up a CS5.5 document in CS5? If so you need to export the docment while in InDesign CS5.5 to the IDML format.
    Please refer to this document: http://help.adobe.com/en_US/indesign/cs/using/WSa285fff53dea4f8617383751001ea8cb3f-6d52a.h tml#WSa285fff53dea4f8617383751001ea8cb3f-6d4da

  • How can I OPEN files I just downloaded? They're on the DOWNLOADS screen of Firefox but I can't open them even after double-clicking? And they're not on the FOLDERS as well. I tried RIGHT-CLICK and the "open dowloading folder" or something does not work! P

    How can I OPEN files I just downloaded? They're on the DOWNLOADS screen of Firefox but I can't open them even after double-clicking? And they're not on the FOLDERS as well. Even the right-click is not working ... the "open containing folder" does not work.
    == This happened ==
    Not sure how often
    == ALWAYS! ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB6.5; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2)

    Open Containing Folders is never active.

  • How to make html file on server side from the data entered in text area

    Hi!
    I want to know how to make .html file on server side. Like if i enter the data in text area ( or like we normaly see when we write mail that editor) and we can use html tages in it and when user submit form all the data in that field will be saved on server side as an html formate. Is it possible to do so??? or any ruff idea how to design it???

    Erm ...
    Whats the problem with that?!
    Ok, here the code ...
    String myparameter = request.getParameter("paramname");
    String htmltemplate = "<html>\n"
                         +"<head><title>demo</title></head>\n";
                         +"<body>@parametertag@</body>\n";
                         +"<html>";
    String htmlpage = htmltemplate.replaceAll("@parametertag@",myparameter);
    File yourHTMLfile = new File("wheredoyouwannagotoday.html");
    FileOutputStream fos = new FileOutputStream(yourHTMLfile);
    fos.write(htmlpage.getBytes());
    fos.close();You're done.
    Happy Coding! :-) &copy;

  • How to make Jar files in JBuilder

    I would like to know how to make jar files using JBulider. I have a problem with a project that I am working with in Swing. I have made the project on JBuilder and when I make a jar file it will not run upon clicking.
    Any body with an answer, please help
    Abhi

    It sounds like your Main-Class is not set properly in your manifest. To set your Main-Class, please follow these directions:
    http://java.sun.com/docs/books/tutorial/jar/basics/run.html

  • How to make jar files availabe for deployed EJBs

    Hi,
    I'm interested on how to make jar files availabe for deployed EJBs.
    My EJB is packed in an ear. It uses a util jar. I now just add the jar to the
    classpath, but I think that shouldn't be the way. Is there somthing in the admin
    console to make jars available or do I have to insert it in the ear file? And
    if so, where do I hve to place it?
    Thanks
    Claudia

    Put the util.jar in the ear with your ejb jars - at the same level (i.e. in
    the root) - but do not include them in the manifest.xml.
    Also each ejb jar that refers to util.jar must have util.jar on its internal
    classpath in the manifest.
    "Claudia" <[email protected]> wrote in message
    news:3d537db5$[email protected]..
    >
    Hi,
    I'm interested on how to make jar files availabe for deployed EJBs.
    My EJB is packed in an ear. It uses a util jar. I now just add the jar tothe
    classpath, but I think that shouldn't be the way. Is there somthing in theadmin
    console to make jars available or do I have to insert it in the ear file?And
    if so, where do I hve to place it?
    Thanks
    Claudia

  • How do I open files from an external drive?  It's plugged into the second slot to the end.

    How do I open files from an external drive?  It's plugged into the second slot to the end.  Did I plug it into the right place and how do I find the drive when trying to attach a file in an email? 

    Files on an external hard drive open just like files on the internal drive - but I get the idea that you are having a problem just finding and seeing those files. Is that correct?
    What operating system is running on your MacBook?

  • How to make html file from a text field data

    hi!
    I want to know how to make a file with .html extension and the data in this file should be from a text field. like i want to enter some thing in a text area and have to place it in a file on server side in html formate.

    so you told us what you want, but what is your question?

  • CS6, how do I open files in Bridge directly into Photoshop? [was: Stan Spur]

    CS6, how do I open files in Bridge directly into Photoshop. The default is File Viewer or there is an option to open in Adobe RAW.

    Look at the down pointing arrow to the right of Photoshop CC in the list. Clicking on it shows a list of programs to select from.
    Windows OS level or "in Windows" as opposed to "in Bridge".
    Gene

  • How to make audio file to use as ringtone on iPhone 5

    Does anyone know how to make a file and then make it a ringtone?

    Make sure iTunes prefs > Import settings is set to AAC.
    In iTunes, find the song you want and note the start/stop time you want the ring tone.
    Right click - get info, click the Options tab and set the start/stop times as above. (Note a 30 second max for ringtones)
    Right click - Create AAC version. This creates a new file.
    Drag this new file from the iTunes window to the desktop.
    Delete the new file from iTunes and also select Delete from hard drive.
    On the desktop, rename the file to what_ever_you_want.m4r (first part you can change to whatever you want & change the extension to .m4r).
    Drag the file back to the iTunes library at top left.
    Make sure iTunes prefs > General has Tones ticked.

Maybe you are looking for