Skip to main content
Participant
Sep 30, 2009 7:45 AM UTC
Question

Problem when paste InlineGraphicElement

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 is closed to new replies. Start a new post to keep the conversation going.

1 reply

Inspiring
Sep 30, 2009 7:20 PM UTC

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

Translate