[Extendflash] JSFL AddDataToSelection and Custom Tool problems.
Dave Wolfe
dave at ironwagon.com
Wed May 10 12:35:32 BST 2006
Try using element.getPersistentData().
-Dave
Chris Fourney wrote:
> Not really, just a simple parenting system that is symbol friendly.
> Reanimator, albeit a great idea, is just that. Id like to try it, but
> since it has to do the tweens instead of flash's inbed tween function,
> it seems pretty useless in the studio atmosphere. This tool will
> pretty much just rotate things based on a parent-child relation. You
> rotate one symbol based on its pivot point, and it would rotate all
> subsequent children from that point.
>
> I just want to be able to save parent properties in a symbol somehow
> and the AddDataToSelection is the only saveable graphic symbol
> variable I can find. But I cant seem to call that variable back once
> ive set it. Theres no getDataFromSelectedSymbol method, and I cant
> simply append .(variable name) to the end of the symbol caller either
> (fl.getDocumentDOM().selection[0].variableName).
>
> Ive never dealt with AddDataToSelection before and I have no idea how
> to call that variable back from the selected symbol once im done.
>
> Anyways, no word as to how the AddDataToSelection works?
>
> */Jarrad Hope <jhope at lungshrimp.com>/* wrote:
>
> You wouldnt be trying to do something like reanimator now would you?
> :)
>
> On Wed, 10 May 2006 13:39:20 +0800, Chris Fourney wrote:
>
> > 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.
> >
>
>
> _______________________________________________
> Extendflash mailing list
> Extendflash at flashguru.co.uk
> http://lists.flashguru.co.uk/mailman/listinfo/extendflash
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Extendflash mailing list
>Extendflash at flashguru.co.uk
>http://lists.flashguru.co.uk/mailman/listinfo/extendflash
>
>
More information about the Extendflash
mailing list