[Extendflash] Problem with custom tool & document.addNewText
Hawley, Geoffrey M. (Contr)
Geoffrey.Hawley at ngc.com
Thu Jun 23 15:13:03 PDT 2005
I'm glad that there are people "here"!
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/20050623/413ba78a/attachment.htm
More information about the Extendflash
mailing list