[Extendflash] JSFL AddDataToSelection and Custom Tool problems.
Chris Fourney
c-y-d at rogers.com
Wed May 10 02:39:20 BST 2006
How do I use the "AddDataToSelection" command?
Heres what I have:
fl.getDocumentDOM().addDataToSelection( "parenting", "integer", 1);
parentCodes = fl.getDocumentDOM().selection[0].parenting;
fl.trace(parentCodes);
im just trying to save a variable to a selected symbol, and then call it back up later -- and have it save upon exit. This is just a test code, but it continually calls back "Undefined" instead of the integer I defined for it in 'AddDataToSelection'. It should call back 1 as the integer.
There is a selected symbol and it is the first element in the selection, so this should work.
Any help is appreciated.
On another note, when creating custom tools, is there any way to set the ID of that tool so that it can be called up with a keystroke, just like all the other generic tools that have IDs called? I have several custom tools and it would be really nice if I could use keyboard commands to swap between them.
What about selecting objects that are at a specific x,y location. So If I use the single click of my custom tool -- I can select between different symbols on the workspace. This can be done by comparing the XY with every elements bounding box on the stage, but this seems tedious and a ridiculous amount of work, and the GetSelectionRect isnt the same bounding box as the symbol itself.
The AddDataToSelection problem is the biggest at this point, but the other ones are also holding me back. Im attempting to create a parenting tool -- and the AddDataToSelection seems the best way to save parenting information, but I am unable to call it back.
Thanks for the help,
Chris.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.flashguru.co.uk/pipermail/extendflash/attachments/20060510/5046d668/attachment.htm
More information about the Extendflash
mailing list