[Flashcoders] LoadMovie Problem with JPEGs
Having a problem loading in an image within an AS2 class and LoadMovie with jpegs. It loads the image perfectly but as soon as it does this it automatically deletes all existing variables that are running within the class. Instead of it losing all information upon loadMovie would like to keep it. class ui.overlay extends EventClip { . public function showImage(url:String, text: String):Void{ this.loadMovie(url); this.text=text; _delegate = EventDelegate.create(this, onHitDataGrid); datagrid.addEventListener(datagrid, _delegate); } private function onHitDataGrid(e:Object):Void{ trace(text); //works when don't load the jpeg.. does not work when I do load the jpeg. .. } I have tried loading the movie into another movieclip inside of this class and still no success. This is a little unusual and really my first time loading in Images dynamically. Been struggling with this one for a while. Anyone know what might be going on? -Rob ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] LoadMovie Problem with JPEGs
You'll need a holder of sorts: ImageHolder movieclip that holds all the info including the ImageMC which actually displays the picture On 1/23/06, Robert Sandie [EMAIL PROTECTED] wrote: Having a problem loading in an image within an AS2 class and LoadMovie with jpegs. It loads the image perfectly but as soon as it does this it automatically deletes all existing variables that are running within the class. Instead of it losing all information upon loadMovie would like to keep it. class ui.overlay extends EventClip { . public function showImage(url:String, text: String):Void{ this.loadMovie(url); this.text=text; _delegate = EventDelegate.create(this, onHitDataGrid); datagrid.addEventListener(datagrid, _delegate); } private function onHitDataGrid(e:Object):Void{ trace(text); //works when don't load the jpeg.. does not work when I do load the jpeg. .. } I have tried loading the movie into another movieclip inside of this class and still no success. This is a little unusual and really my first time loading in Images dynamically. Been struggling with this one for a while. Anyone know what might be going on? -Rob ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ramon Miguel M. Tayag ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] LoadMovie Problem with JPEGs
Pressed SEND too soon and caught an oops!! it should be : // public function overlay(){ holder_mc=createEmptyMovieClip(holder_mc,1); } // Not sure the setup but the vars are getting wiped away for sure so its some kinda scoping issue.Loading the movieclip into this should wipe the variables out. Loading them into an emptymovieclip, shouldn't. class ui.overlay extends EventClip{ // not sure what eventClip is but whatever.. private var holder_mc:MovieClip; private var text:String; public function overlay(){ holder_mc.createEmptyMovieClip(holder_mc,1); } public function showImage(url:String,text:String){ holder_mc.loadMovie(url); this.text=text; trace(TEXT has been set+this.text); _delegate = EventDelegate.create(this, onHitDataGrid); datagrid.addEventListener(datagrid, _delegate); } public function onHitDataGrid(obj:Object){ trace(TEXT has been set+this.text); } } Having a problem loading in an image within an AS2 class and LoadMovie with jpegs. It loads the image perfectly but as soon as it does this it automatically deletes all existing variables that are running within the class. Instead of it losing all information upon loadMovie would like to keep it. class ui.overlay extends EventClip { . public function showImage(url:String, text: String):Void{ this.loadMovie(url); this.text=text; _delegate = EventDelegate.create(this, onHitDataGrid); datagrid.addEventListener(datagrid, _delegate); } private function onHitDataGrid(e:Object):Void{ trace(text); //works when don't load the jpeg.. does not work when I do load the jpeg. .. } I have tried loading the movie into another movieclip inside of this class and still no success. This is a little unusual and really my first time loading in Images dynamically. Been struggling with this one for a while. Anyone know what might be going on? -Rob ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] LoadMovie Problem with JPEGs
sorry! disregard my post.. On 1/23/06, Ramon Tayag [EMAIL PROTECTED] wrote: You'll need a holder of sorts: ImageHolder movieclip that holds all the info including the ImageMC which actually displays the picture On 1/23/06, Robert Sandie [EMAIL PROTECTED] wrote: Having a problem loading in an image within an AS2 class and LoadMovie with jpegs. It loads the image perfectly but as soon as it does this it automatically deletes all existing variables that are running within the class. Instead of it losing all information upon loadMovie would like to keep it. class ui.overlay extends EventClip { . public function showImage(url:String, text: String):Void{ this.loadMovie(url); this.text=text; _delegate = EventDelegate.create(this, onHitDataGrid); datagrid.addEventListener(datagrid, _delegate); } private function onHitDataGrid(e:Object):Void{ trace(text); //works when don't load the jpeg.. does not work when I do load the jpeg. .. } I have tried loading the movie into another movieclip inside of this class and still no success. This is a little unusual and really my first time loading in Images dynamically. Been struggling with this one for a while. Anyone know what might be going on? -Rob ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ramon Miguel M. Tayag -- Ramon Miguel M. Tayag ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders