"billbones" [email]webforumsuser@macromedia.com[/email] wrote:
> I want to give the user an option to import their own graphic (image file) so they can use it as a texture on a 3d model.ie when the user presses the 'import' button the windows file dialogue box appears and they can naviagate to their file and import it.
>
> Is this possible and how.
You can use fileIO for opening a system window and let the user browse
for the file. Then, you can assign that path to the member that will
hold the image. Once that´s done, you make a newTexture using that member.

property pFileIOx

on beginSprite me
--initialize xtras
pFileIOx = xtra("fileIO").new() --fileIO
end

on mouseUp me
pFileIOx.setFilterMask("Select the file for the texture, *.jpg")
tPath = pFileIOx.displayOpen()
member("texture").fileName = tPath
end

Good luck,
--
Agustín María Rodríguez | [email]agustin@OnWine.com.ar[/email] | [url]www.OnWine.com.ar[/url]