Hi Naveen,

I haven't got time to implement it yet.

But I figure it out a better solution:

1. Create a class named "VisualStageText" which extends SpriteVisualElement 
class and implements IEditableText interface.

2. In the VisualStageText class implementation, define a private variable 
stageText:StageText, use it to implement IEditableText yourself, and also 
define a private variable snapshot:Bitmap.

3. Listen for VisualStageText instance's Event.ACTIVATE, Event.DEACTIVATE, 
MouseEvent.ROLL_OVER, MouseEvent.ROLL_OUT and other interaction relative events 
to detect user interactions.

4. When the user is currently interacting with VisualStageText, you need to 
hide the snapshot and show the stageText:
snapshot.parent ? removeChild(snapshot) : null;
snapshot.bitmapData.dispose();
snapshot.bitmapData = null;
stageText.stage = stage;
stageText.viewPort = new Rectangle(...);

5. When the user is not interacting with VisualStageText, you need to take a 
snapshot of the stageText, then hide the stageText and display the snapshot:
var bd:BitmapData = new BitmapData(stageText.viewPort.width, 
stageText.viewPort.height);
stageText.drawViewPortToBitmapData(bd);
snapshot.bitmapData = bd;
stageText.stage = null;
addChild(snapshot);

Well this is it, this is the core concept of how to do a Flex version 
StageText, you can use the VisualStageText as a MXML tag, and bind it to the 
skinpart of the spark TextInput (or TextArea)'s textDisplay:IEditableText.

I plan to implement my VisualStageText at the end of this year, but if you 
can't wait you can do it by yourself, good luck : )


DarkStone
2013-10-30
At 2013-10-30 01:44:33,Naveen2803 <naveen.malhotr...@gmail.com> wrote:
>Hi DarkStone,
>
>Thank you for your post.
>
>Can you please share the code for the same as I am little confused on how to
>achieve this.
>
>Thanks is Advance
>
>
>
>--
>View this message in context: 
>http://apache-flex-development.2333347.n4.nabble.com/Air-Stage-Text-Issue-tp30223p31670.html
>Sent from the Apache Flex Development mailing list archive at Nabble.com.

Reply via email to