maskedMan
04-15-2008, 11:37 PM
I've used JSFL to do the following:
create an empty movie clip
allow the user to import a png or other image file to the library
immediately put the imported image file in the empty movie clip
But as you can guess the image file is aligned with its top left corner in the mc's origin... but I need the image file to be aligned bottom center instead and I can't figure out how I'm supposed to make this happen. I saw some (very scant) documentation for the align method on http://dynamicflash.com/jsfl/ but it didn't show any examples of the method in use so I'm not clear on what you actually do with it.
Edit: here is some code based on what I found at http://fliiby.com/docs/uurvso3qpi.pdf
var BGFile = fl.browseForFileURL("select", "bgImage");
fl.getDocumentDOM().importFile(BGFile); //Successfully puts the graphic in the empty movie clip
fl.getDocumentDOM().align("bottom", true); //FAILS!
//Returns the following error message: "'align' requires a selection."
create an empty movie clip
allow the user to import a png or other image file to the library
immediately put the imported image file in the empty movie clip
But as you can guess the image file is aligned with its top left corner in the mc's origin... but I need the image file to be aligned bottom center instead and I can't figure out how I'm supposed to make this happen. I saw some (very scant) documentation for the align method on http://dynamicflash.com/jsfl/ but it didn't show any examples of the method in use so I'm not clear on what you actually do with it.
Edit: here is some code based on what I found at http://fliiby.com/docs/uurvso3qpi.pdf
var BGFile = fl.browseForFileURL("select", "bgImage");
fl.getDocumentDOM().importFile(BGFile); //Successfully puts the graphic in the empty movie clip
fl.getDocumentDOM().align("bottom", true); //FAILS!
//Returns the following error message: "'align' requires a selection."