Just as a side note.
I have an application in which I have image data sent back from the server and which is dislayed. The "source" of an Image doesn't have to be a Class, it can also be a ByteArray. I am currently using this to display dynamically loaded image data. The cool thing is that Flex doesn't really seem to worry about the format. I send back PNG and JPEG data as ByteArray and it just does everything correctly [?] Chris ________________________________ Von: CodeGirl <[email protected]> Gesendet: Freitag, 26. August 2016 22:43:14 An: [email protected] Betreff: Re: Loading JPG bitmapdata. Something like Embed but at runtime Turned out to be a bug. Got egg in my face I had created a function called setOffset which when I created it, it was intended for after creation settings and so in that function, I call update. Later, as I changed how I created my 3D image, I ended up using that function in the create process. So after my first object, which does not have a texture, when it ran setOffset, it also ran update but before my loads were complete. And so it was the update that was causing the null reference because the complete had not ran and that update and draw had not been run either. I wonder how many of the loaders would have worked it I had of had that bug fixed? Can I just call a loader and then on complete get the bitmapdata from the event or do I need to have a Class referencing the bitmapData and call the Class to pass. Similar to what the Embed is doing? This is the class I currently have. Is this needed? package views { import flash.display.Bitmap; import mx.core.FlexGlobals; public class LoadedImageClass extends Bitmap { public function LoadedImageClass() { super(CustomBarnView(FlexGlobals.topLevelApplication.customBarnView).bmd) } } } -- View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Loading-JPG-bitmapdata-Something-like-Embed-but-at-runtime-tp13402p13413.html Sent from the Apache Flex Users mailing list archive at Nabble.com.
