Skip to main content
Participant
September 30, 2009
Question

Problem when paste InlineGraphicElement

  • September 30, 2009
  • 1 reply
  • 571 views

When I using  the  DisplayObject (eg. Moviclip) for the InlineGraphicElement.source, it’s not display when copy and paste on the TextFlow. However it shows if I use url for InlineGraphicElement.source. Can I target the InlineGraphicElement  from the PasteOperation ?. How can I solve this problem?..

Thanks in advance.

This topic has been closed for replies.

1 reply

Adobe Employee
September 30, 2009

That can't work as there is no generic mechanism in Flash to duplicate a DisplayObject and a DisplayObject can only have one parent.

There are some alternatives -

1) set source as an external  URL to reload the same display.

2) set source to a Class and TLF will create a new instance the first time it is composed.

  For example by using an Embed.

        [Embed(source="flashplayer_100x100.jpg")]
        private static var img:Class;

        var inlineGraphicElement:InlineGraphicElement = new InlineGraphicElement();
         inlineGraphicElement.source = img;

There may be other workarounds besides these.

Richard