Select to view content in your preferred language

Why does ByteArray writeObject/readObject rotate a graphic?

699
0
08-30-2012 09:56 AM
DirkVandervoort
Frequent Contributor
The offending code (startGrfx is of type com.esri.ags.Graphic):


var ba0:ByteArray = new ByteArray();
ba0.writeObject(startGrfx);
ba0.position = 0;
var endGrfx:Graphic = ba0.readObject();


The resulting graphics transform is shown in the attached jpg (symbology is not preserved as well).[ATTACH=CONFIG]17382[/ATTACH]

Some exceptions traced to the console that I haven't carved into yet:


TypeError: Error #1034: Type Coercion failed: cannot convert Object@e42c2b1 to com.esri.ags.symbols.Symbol.
TypeError: Error #1034: Type Coercion failed: cannot convert Object@e42e731 to mx.managers.IFocusManager.
TypeError: Error #1034: Type Coercion failed: cannot convert Object@e4f0569 to flash.display.DisplayObjectContainer.
TypeError: Error #1034: Type Coercion failed: cannot convert Object@e4f0569 to mx.styles.IAdvancedStyleClient.
TypeError: Error #1034: Type Coercion failed: cannot convert Object@e4f0761 to flash.geom.Transform.
TypeError: Error #2007: Parameter child must be non-null.
TypeError: Error #1034: Type Coercion failed: cannot convert Object@e5b81a9 to flash.media.SoundTransform.
TypeError: Error #1034: Type Coercion failed: cannot convert Object@e4f0761 to flash.geom.Transform.


TIA
Tags (2)
0 Kudos
0 Replies