[Extendflash] setting the active tool
Hawley, Geoffrey M.
Geoffrey.Hawley at ngc.com
Fri Aug 26 11:13:17 PDT 2005
John,
I had (have) the exact same question (see my query from June
23rd below)!! Please let me know if you make any progress. I'll keep
you informed as well. I had to move on and wound up cobbling together a
work-around that is a great deal less than satisfactory to me, so
solving the tool's functionality the way I PLANNED for it to work still
haunts me and I find my mind working on it as I write other
actionScript/JSFL. Arrgh!
Peace and good luck (to both of us),
Geoffrey
My original post of June 23rd, 2005 follows:
[SNIP]...
So here's a problem I've been wrestling with going on two days.
I've made a custom tool (won't bore you with the details unless it
becomes necessary to further the discussion...) and in the course of it
I use the "addNewText" Document method. As advertised, this creates a
text field within the bounds I dictate and (here's the key part) leaves
it selected and ready to be typed into. The problem is that this
switches my tool to the "Text" tool and completely negates any mouseMove
or mouseUp functions for my custom tool. Actually to be more specific,
the mouseMove DOES fire, but does not acknowledge that the button is
still down -- fl.tools.mouseIsDown is "true". Document.selectNone()
does nothing to change this.
I've even tracked the "fl.tools.activeTool" property. The trace reveals
that immediately before the "addNewText" line "fl.tool.activeTool"
returns "[object Tools]". Immediately after: "null". And "null" it
remains for the rest of the jsfl, ultimately negating any record of the
mouseUp event, and thus that script doesn't execute.
If it's not obvious, what I want, in a nutshell, is to get back control
of the tool(?)/cusor(?)/what-have-you, after the "addNewText" jsfl runs
in the "mouseDown" function (or even the "activateTool" function -- in
desperation I tried running this textField routine from within the
"activateTool" function and it seems to behave identically and with no
adverse effects -- save those detailed above.)
Sorry, my description is too wordy. I just want people to know I've
done my homework and, I guess, to see what I've already attempted so we
don't have to revisit territory I've already covered.
Help... he said weakly.
BTW, the text is set with the "setTextString" method and the
"autoExpand" property must be "false", if either of these details
matter...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.flashguru.co.uk/pipermail/extendflash/attachments/20050826/0d2e8495/attachment.htm
More information about the Extendflash
mailing list