[Extendflash] JSFL AddDataToSelection and Custom Tool problems.

Chris Fourney c-y-d at rogers.com
Fri May 12 01:28:23 BST 2006


Yea, I tried to cheat the rotation by selecting elements on the fly and setting their transform point relative to the stage. But tools really dont like it when you change the selection -- it just bugs out.
  The function works when called as a command, but when put into a tool in the same context -- it fails miserably.
   
  Instead, Ill use trig and such to set the piece's rotation by their matrix -- which means I need to brush up on my matrices.
   
  Ive created a function that finds childs and parents fairly well, and once I finish this rotation issue, everything else is fairly straightforward, but Im definitely running into a wall on the rotation.
   
  On another note, is there any way to redefine how flash tweens? Im guessing thats a no, but that would be really handy too.
   
  -Chris.

Jarrad Hope <jhope at lungshrimp.com> wrote:
  Of course Im willing to share and help in anyway :)

I think you might run into some rotation issues,
the code for reanimator is abit cryptic
since theres no real way to protect the code.

Doing it in a C is pretty useless too since your still have to call flash
api thru it


On Thu, 11 May 2006 06:37:28 +0800, Chris Fourney wrote:

> Hah, no worries in competition -- i dont think anything Im gonna do will 
> come close to Reanimator, nor will it be marketed (at least as a package 
> to the mainstream).
> Id love to see what you've come up with though, Im always interested in 
> how people coded different things and learning from them. I completely 
> understand if you dont want to share as well.
> Id be more than willing to share the stuff Ive come up with, as basic 
> as it is.
>
> Take Care and thanks for all the help everyone,
> Chris.
> Jarrad Hope wrote:
> Your absolutely right and renanimator has since been divided into two 
> tools
>
> thanks to the feedback of the beta testers, reanimator now works with
> motion tweens, automatic rigging(which means its just parenting symbols)
> and more.
>
> There was also someone who put a request up on rentacoder for a similar
> thing, i emailed him
> saying that i was doing this, but he didnt reply. (calicomonkey i think 
> it
> was) which was in march.
>
> If you just want the tool feel free to email me, otherwise i wish you the
> best of luck
> and will look forward to competing with you :)
>
> take care!
>
> -Jarrad
>
> On Wed, 10 May 2006 19:56:56 +0800, 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 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
>


_______________________________________________
Extendflash mailing list
Extendflash at flashguru.co.uk
http://lists.flashguru.co.uk/mailman/listinfo/extendflash

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.flashguru.co.uk/pipermail/extendflash/attachments/20060512/000ff285/attachment.htm


More information about the Extendflash mailing list