[Extendflash] JSFL: Macromedia Request your Feedback [last callnag]

Jeff Conrad list.catcher at hostingwithsupport.com
Thu Nov 3 14:20:18 PST 2005


There's document.importFile() now in 8.

In MX04, when you "open" (key word) a JPG, mp3, etc, it gets automatically
imported into a new blank document. Thanks go to Peter Elst for discovering
that.  You can use fl.openScript() to open those and then use the copy and
paste via JSFL to import JPGs, GIFs, and the like into your documents.

Proof of Concept for MX04:

// this will let you browse for a jpeg to import and "import" it by copying
// it to the stage of the current movie
var uri = fl.browseForFileURL("open");
// the importance of the next line is that we can "import" from a fileURI
// i.e.: file:///C|/myPicture.jpg or file:///C|/myPicture.gif
fl.openScript(uri);
fl.getDocumentDOM().selectAll();
fl.getDocumentDOM().clipCopy();
fl.closeDocument(fl.getDocumentDOM(), false);
// note that we closed the old dom above...this is the previous document
fl.getDocumentDOM().clipPaste();

Hope that helps.

Jeff

-----Original Message-----
From: extendflash-bounces at flashguru.co.uk
[mailto:extendflash-bounces at flashguru.co.uk] On Behalf Of Danny Brian
Sent: Thursday, November 03, 2005 1:50 PM
To: extendflash at flashguru.co.uk
Subject: Re: [Extendflash] JSFL: Macromedia Request your Feedback [last
callnag]

> Please list the top 3 things u would like to do with JSFL which  
> currently are not possible, or are possible, just not gracefully.

I only have one, that is to import images (jpg, png). I haven't  
watched to see if Flash 8 has this.

- Danny

_______________________________________________
Extendflash mailing list
Extendflash at flashguru.co.uk
http://lists.flashguru.co.uk/mailman/listinfo/extendflash



More information about the Extendflash mailing list