Answered
Bug in InlineGraphicElement with embedded asset
embedded asset set to source of InlineGraphicElement does not
show up until a real edit operation occurs
src:
var bullet:InlineGraphicElement = new InlineGraphicElement();
bullet.source = " http://www.adobe.com/shockwave/download/images/flashplayer_100x100.jpg";
//new bulletClass();
bullet.width = 15;
bullet.height = 15;
var pf:ParagraphFormat = new ParagraphFormat();
pf.marginLeft = 20;
pf.textIndent = 0;
p.paragraphFormat = pf;
var sp:SpanElement = new SpanElement();
sp.digitWidth='10';
sp.fontFamily='courier';
sp.fontSize = 10;
sp.textAlpha = 0.1;
sp.text='.';
p.addChildAt(0,sp);
p.addChildAt(0,bullet);
_textFlow.flowComposer.updateAllContainers();
....'
private function graphicStatusChangeEvent(e:StatusChangeEvent):void
{
for each(var bm:bulletMap in map)
{
if(bm.bullet == e.element)
{
trace('found');
bm.para.textIndent = -InlineGraphicElement(bm.bullet).actualWidth -12;
_textFlow.flowComposer.updateAllContainers();
}
}
//InlineGraphicElement(e.element).graphic.addEventListener(MouseEvent.CLICK, onBulletClick);
_textFlow.flowComposer.updateAllContainers();
}
if i replaced embed source with normal url , it loads and shows up correctly.
Any idea on it ? A bug ?
src:
var bullet:InlineGraphicElement = new InlineGraphicElement();
bullet.source = " http://www.adobe.com/shockwave/download/images/flashplayer_100x100.jpg";
//new bulletClass();
bullet.width = 15;
bullet.height = 15;
var pf:ParagraphFormat = new ParagraphFormat();
pf.marginLeft = 20;
pf.textIndent = 0;
p.paragraphFormat = pf;
var sp:SpanElement = new SpanElement();
sp.digitWidth='10';
sp.fontFamily='courier';
sp.fontSize = 10;
sp.textAlpha = 0.1;
sp.text='.';
p.addChildAt(0,sp);
p.addChildAt(0,bullet);
_textFlow.flowComposer.updateAllContainers();
....'
private function graphicStatusChangeEvent(e:StatusChangeEvent):void
{
for each(var bm:bulletMap in map)
{
if(bm.bullet == e.element)
{
trace('found');
bm.para.textIndent = -InlineGraphicElement(bm.bullet).actualWidth -12;
_textFlow.flowComposer.updateAllContainers();
}
}
//InlineGraphicElement(e.element).graphic.addEventListener(MouseEvent.CLICK, onBulletClick);
_textFlow.flowComposer.updateAllContainers();
}
if i replaced embed source with normal url , it loads and shows up correctly.
Any idea on it ? A bug ?
