Articles Archive
Director Forums
Director Wiki
Job Board
Search
 
 Director Online WikiMain Page | About | Help | FAQ | Special pages | Log in | Printable version | Disclaimers
Categories: Dictionary | Lingo | JavaScript

ImportFileInto

From Director Online Wiki

importFileInto
Type: method
Version:  ?
Language: Lingo, JavaScript
Dependencies: none
Links/Related
newMember, unlinking external files

Imports a file into a cast member. This works for most of member types. Returns a boolean value that is TRUE when the operation worked, or FALSE if otherwise.

Table of contents

Syntax

from MX 2004 Documentation

 member.importFileInto(fileOrUrlString, (additional Options As List))

Syntax from MX Technote

 importFileInto member myMember, fileName{, [#dither:True/False, #trimWhiteSpace:True/False]}
 importFileInto member myMember of castLib whichCast, fileName {,[#dither:True/False,#trimWhiteSpace:True/False]}
 importFileInto member myMember,URL {,[#dither:True/False, #trimWhiteSpace:True/False]}

Undocumented Syntax

Director 10.1: The propList might also contain the undocumented:

 #remapImageToStage: FALSE

This prevents that the new member will get the bitdepth of the stage on importFileInto. If the image is 8-bit, this ensures that the palette (if it is valid) is also imported.



如果成功那么返回true,否则返回0 例如: tempURL = "F:\myweb\cafe_townsend\index.html"

 m=_movie.member(2).importFileInto(tempURL)

put m --1

by xinranok from china

Bugs/Quirks/Problems

The undocumented #mapImageToStage:False adresses the problem, that importFileInto always uses the current bitDepth of the stage. With this you can set it to use always 32bit, but there is no way to define a lower bitdepth. So you cannot create an 8bit member with this command.

The only workaround is to create dummy members, that have the desired bitdepth, and then to duplicate it, and make the changes via copyToClipBoard and pasteClipBoardInto. See unlinking external files for details.

Related Note

Another way to use external files is to link your members and set their fileName.

See also

unlinking external files

External links


Retrieved from "http://www.director-online.com/dougwiki/index.php/ImportFileInto"

This page has been accessed 2960 times. This page was last modified 19:40, 8 Jul 2008.