[Flashcoders] Attach MC with a custom Class
How do I attach a MC from lib with a custom class? Thanks, Bruno ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] New AS 2.0Class/Conponents/XML/XPath/SingletonPattern Example
Not at all, but I've seen lots of people looking for it... so... Just wrote down an AS 2.0 usage example. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Scott Hyndman Sent: sexta-feira, 18 de novembro de 2005 18:03 To: Flashcoders mailing list Subject: RE: [Flashcoders] New AS 2.0Class/Conponents/XML/XPath/SingletonPattern Example Is the singleton pattern a feature now? ;) Scott -Original Message- From: [EMAIL PROTECTED] on behalf of Bruno Mosconi Sent: Fri 11/18/2005 2:57 PM To: 'Flashcoders mailing list' Cc: Subject:[Flashcoders] New AS 2.0 Class/Conponents/XML/XPath/SingletonPattern Example Hi, I've just released a new example of XML driven application, based on AS 2.0 Class, Components, XPath w/ full XML content search and using Singleton Pattern. Feel free to use, and abuse: (It's a XML Driven Agenda) http://www.ultrafactor.com.br/flash_experiments/XML Agenda v1.1.zip Interface is Portuguese, so here are some translations you may need to a full understanding: Buscar = Search Todos = All Janeiro, Fevereiro, etc = Months of year Aguarde = Wait Fechar = close All code is in English! Don't worry. :) If you need any extra help or any comments, please email me. I'm also looking for any kind of AS Freelance. Hope you enjoy! Regards, Bruno Mosconi Ultrafactor ___ 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] Loading multiple images inside htmlText field
First use BR/, sometimes p does not work at all... Second, TextArea component is buggy... You may need this fix: http://flashant.org/index.php?m=200412#239 []s -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sajid Saiyed Sent: quarta-feira, 16 de novembro de 2005 10:02 To: Flashcoders mailing list Subject: [Flashcoders] Loading multiple images inside htmlText field Hi, I am trying to load Multiple imges inside a dynamic text field. The images load BUT They are all placed one above the other, the vertical space between two images is just equal to the a line break. Can anyone throw light on why this happens? Is it because the time taken to load the images is more and hence the height of the images is not known? Here is how the html data is stored in the XML: data![CDATA[ pI got some of these funny photographs from a collegue./p pSome of them will really make you laugh, but to me, some of the concepts are really thought proviking./p pThe specific once I liked are, #8220;Butter Slick#8221; and #8220;Umbrella#8221; pHere they are for you to enjoy!!/p pimg alt=japan1.jpg src=http://www.ssdesigninteractive.com/blog/archives/japan1.jpg; width=592 height=315 //p pimg alt=japan2.jpg src=http://www.ssdesigninteractive.com/blog/archives/japan2.jpg; width=296 height=470 //p pimg alt=japan3.jpg src=http://www.ssdesigninteractive.com/blog/archives/japan3.jpg; width=346 height=505 //p pimg alt=japan5.jpg src=http://www.ssdesigninteractive.com/blog/archives/japan5.jpg; width=430 height=443 //p pimg alt=japan6.jpg src=http://www.ssdesigninteractive.com/blog/archives/japan6.jpg; width=500 height=366 //p pimg alt=japan7.jpg src=http://www.ssdesigninteractive.com/blog/archives/japan7.jpg; width=505 height=496 //p pimg alt=japan8.jpg src=http://www.ssdesigninteractive.com/blog/archives/japan8.jpg; width=455 height=469 //p pimg alt=japan9.jpg src=http://www.ssdesigninteractive.com/blog/archives/japan9.jpg; width=342 height=468 //p pimg alt=japan10.jpg src=http://www.ssdesigninteractive.com/blog/archives/japan10.jpg; width=550 height=432 //p pimg alt=japan12.jpg src=http://www.ssdesigninteractive.com/blog/archives/japan12.jpg; width=301 height=450 //p pimg alt=japan13.jpg src=http://www.ssdesigninteractive.com/blog/archives/japan13.jpg; width=503 height=293 //p ]]/data Any clue? Sajid ___ 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] Class Loading
MM UI classes uses an initializing:Boolean property to take care of proper initialization... but it seems very buggy to me! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of JesterXL Sent: segunda-feira, 14 de novembro de 2005 00:58 To: Flashcoders mailing list Subject: Re: [Flashcoders] Class Loading I had heard from an MM engineer that this depends on Player Version; does that really matter? And if so, how does it work with AS3? - Original Message - From: Jim Kremens [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Sunday, November 13, 2005 7:28 PM Subject: Re: [Flashcoders] Class Loading Runtime loading of SWF's, however, confuses me, and I haven't seen a defintive source that describes in what version, what happens in a loaded SWF has the same class, who overrwrites what, etc. The loading swf uses the first version of any class that it comes across. This can be a problem if two compiled swfs use slightly different versions of a class. Jim Kremens On 11/13/05, JesterXL [EMAIL PROTECTED] wrote: Depends on when. There are 3 main time intervals that matter: - class export frame - class runtime initialization - SWF runtime class meshing * runtime shared libraries By default, in Flash MX 2004, classes are exported on frame 1; meaning they are initialized on frame 0 (which you can't do anything on), and I think static initializers are run on frame 1. So, if you leave the default on, you can access your classes from frame 1, and on. However, if your classes are exported on frame 2 or beyond, you'll have to wait for that particular frame to be fully downloaded. Additionally, some classes utilize runtime changes, such as EventDispatcher, DataSelector, and DataProvider. So, assuming your class does not depend on occuring before those events (which most never do), then you are usually fine as well. Runtime loading of SWF's, however, confuses me, and I haven't seen a defintive source that describes in what version, what happens in a loaded SWF has the same class, who overrwrites what, etc. Additionally, although Remote Shared Libraries act like #1, I don't know when they are actually insantiated, but I believe if you export them on frame 1, you can treat them as #1; I always have as compoents and they work fine. - Original Message - From: Bruno Mosconi [EMAIL PROTECTED] To: 'Flashcoders mailing list' flashcoders@chattyfig.figleaf.com Sent: Sunday, November 13, 2005 4:55 PM Subject: [Flashcoders] Class Loading How do I make sure that all Classes are fully loaded? Thanks, Bruno ___ 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 ___ 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] Listeners Getting CRAZY = Please HELP!
I've got a custom Button Class extending mx.core.UIComponent, it' working fine till now... The point is, that I've got a simple DropDown menu, with buttons inside, and as I have a timeline to open it with animation Listeners don't WORK! I'm getting crazy! Compiler gives no error. The file: http://www.ultrafactor.com.br/flash_bug/SelMenu.zip The code: import com.ultrafactor.Button; import mx.utils.Delegate; class com.ultrafactor.SelMenu extends MovieClip { private var myInternal:Number; private var bnt_0:Button; public function SelMenu() { main(); } private function main():Void { myInternal = setInterval(this, setTabButtonListeners, 1000); } private function setupBtnListeners():Void { var classPointer = this; clearInterval(classPointer.myInternal); //DO NOT WORK! bnt_0.addEventListener(click, Delegate.create(this, clickBt)); } private function clickBt():Void { trace(clik);//DO NOT WORK } } My custom Button Class: import mx.core.UIObject; import mx.core.UIComponent; class com.ultrafactor.Button extends mx.core.UIComponent { private var initializing:Boolean = true; private var autoRepeat:Boolean; private var interval; function Button() { super.init(); useHandCursor = true; } private function size(Void):Void { super.invalidate(); } private function draw(Void):Void { if (initializing) { initializing = false; } size(); } private function onRollOver():Void { if (interval != undefined) { clearInterval(interval); delete interval; } gotoAndStop(2); } private function onDragOver():Void { onPress(); } private function onRollOut():Void { gotoAndStop(1); } private function onDragOut():Void { onRollOut(); } private function onRelease():Void { dispatchEvent({type:click}); onRollOver(); } private function onPress():Void { gotoAndStop(3); dispatchEvent({type:buttonDown}); if (autoRepeat) { interval = setInterval(this, onPressDelay, getStyle(repeatDelay)); } } private function onPressDelay(Void):Void { dispatchEvent({type:buttonDown}); if (autoRepeat) { clearInterval(interval); interval = setInterval(this, onPressRepeat, getStyle(repeatInterval)); } } private function onPressRepeat(Void):Void { dispatchEvent({type:buttonDown}); updateAfterEvent(); } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Listeners Getting CRAZY = Please HELP!
Sure I call It: private function main():Void { //HERE I CALL. Internal = setInterval(this, setupBtnListeners, 1000); } private function setupBtnListeners():Void { trace(setupBtnListeners); var classPointer = this; clearInterval(classPointer.myInternal); bnt_0.addEventListener(click, Delegate.create(this, clickBt)); } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ryan Matsikas Sent: segunda-feira, 14 de novembro de 2005 16:20 To: Flashcoders mailing list Subject: Re: [Flashcoders] Listeners Getting CRAZY = Please HELP! you dont call, setupBtnListeners() from anywhere.. how does the listener get added? On 11/14/05, Bruno Mosconi [EMAIL PROTECTED] wrote: I've got a custom Button Class extending mx.core.UIComponent, it' working fine till now... The point is, that I've got a simple DropDown menu, with buttons inside, and as I have a timeline to open it with animation Listeners don't WORK! I'm getting crazy! Compiler gives no error. The file: http://www.ultrafactor.com.br/flash_bug/SelMenu.zip The code: import com.ultrafactor.Button; import mx.utils.Delegate; class com.ultrafactor.SelMenu extends MovieClip { private var myInternal:Number; private var bnt_0:Button; public function SelMenu() { main(); } private function main():Void { myInternal = setInterval(this, setTabButtonListeners, 1000); } private function setupBtnListeners():Void { var classPointer = this; clearInterval(classPointer.myInternal); //DO NOT WORK! bnt_0.addEventListener(click, Delegate.create(this, clickBt)); } private function clickBt():Void { trace(clik);//DO NOT WORK } } My custom Button Class: import mx.core.UIObject; import mx.core.UIComponent; class com.ultrafactor.Button extends mx.core.UIComponent { private var initializing:Boolean = true; private var autoRepeat:Boolean; private var interval; function Button() { super.init(); useHandCursor = true; } private function size(Void):Void { super.invalidate(); } private function draw(Void):Void { if (initializing) { initializing = false; } size(); } private function onRollOver():Void { if (interval != undefined) { clearInterval(interval); delete interval; } gotoAndStop(2); } private function onDragOver():Void { onPress(); } private function onRollOut():Void { gotoAndStop(1); } private function onDragOut():Void { onRollOut(); } private function onRelease():Void { dispatchEvent({type:click}); onRollOver(); } private function onPress():Void { gotoAndStop(3); dispatchEvent({type:buttonDown}); if (autoRepeat) { interval = setInterval(this, onPressDelay, getStyle(repeatDelay)); } } private function onPressDelay(Void):Void { dispatchEvent({type:buttonDown}); if (autoRepeat) { clearInterval(interval); interval = setInterval(this, onPressRepeat, getStyle(repeatInterval)); } } private function onPressRepeat(Void):Void { dispatchEvent({type:buttonDown}); updateAfterEvent(); } } ___ 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] Listeners Getting CRAZY = Please HELP!
I think the problem is the MASK! Does n1 had the same problem? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bruno Mosconi Sent: segunda-feira, 14 de novembro de 2005 16:31 To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] Listeners Getting CRAZY = Please HELP! Sure I call It: private function main():Void { //HERE I CALL. Internal = setInterval(this, setupBtnListeners, 1000); } private function setupBtnListeners():Void { trace(setupBtnListeners); var classPointer = this; clearInterval(classPointer.myInternal); bnt_0.addEventListener(click, Delegate.create(this, clickBt)); } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ryan Matsikas Sent: segunda-feira, 14 de novembro de 2005 16:20 To: Flashcoders mailing list Subject: Re: [Flashcoders] Listeners Getting CRAZY = Please HELP! you dont call, setupBtnListeners() from anywhere.. how does the listener get added? On 11/14/05, Bruno Mosconi [EMAIL PROTECTED] wrote: I've got a custom Button Class extending mx.core.UIComponent, it' working fine till now... The point is, that I've got a simple DropDown menu, with buttons inside, and as I have a timeline to open it with animation Listeners don't WORK! I'm getting crazy! Compiler gives no error. The file: http://www.ultrafactor.com.br/flash_bug/SelMenu.zip The code: import com.ultrafactor.Button; import mx.utils.Delegate; class com.ultrafactor.SelMenu extends MovieClip { private var myInternal:Number; private var bnt_0:Button; public function SelMenu() { main(); } private function main():Void { myInternal = setInterval(this, setTabButtonListeners, 1000); } private function setupBtnListeners():Void { var classPointer = this; clearInterval(classPointer.myInternal); //DO NOT WORK! bnt_0.addEventListener(click, Delegate.create(this, clickBt)); } private function clickBt():Void { trace(clik);//DO NOT WORK } } My custom Button Class: import mx.core.UIObject; import mx.core.UIComponent; class com.ultrafactor.Button extends mx.core.UIComponent { private var initializing:Boolean = true; private var autoRepeat:Boolean; private var interval; function Button() { super.init(); useHandCursor = true; } private function size(Void):Void { super.invalidate(); } private function draw(Void):Void { if (initializing) { initializing = false; } size(); } private function onRollOver():Void { if (interval != undefined) { clearInterval(interval); delete interval; } gotoAndStop(2); } private function onDragOver():Void { onPress(); } private function onRollOut():Void { gotoAndStop(1); } private function onDragOut():Void { onRollOut(); } private function onRelease():Void { dispatchEvent({type:click}); onRollOver(); } private function onPress():Void { gotoAndStop(3); dispatchEvent({type:buttonDown}); if (autoRepeat) { interval = setInterval(this, onPressDelay, getStyle(repeatDelay)); } } private function onPressDelay(Void):Void { dispatchEvent({type:buttonDown}); if (autoRepeat) { clearInterval(interval); interval = setInterval(this, onPressRepeat, getStyle(repeatInterval)); } } private function onPressRepeat(Void):Void { dispatchEvent({type:buttonDown}); updateAfterEvent(); } } ___ 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 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Listeners Getting CRAZY = Please HELP!
No, I was wrong...no Masks, same error :( -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bruno Mosconi Sent: segunda-feira, 14 de novembro de 2005 16:37 To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] Listeners Getting CRAZY = Please HELP! I think the problem is the MASK! Does n1 had the same problem? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bruno Mosconi Sent: segunda-feira, 14 de novembro de 2005 16:31 To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] Listeners Getting CRAZY = Please HELP! Sure I call It: private function main():Void { //HERE I CALL. Internal = setInterval(this, setupBtnListeners, 1000); } private function setupBtnListeners():Void { trace(setupBtnListeners); var classPointer = this; clearInterval(classPointer.myInternal); bnt_0.addEventListener(click, Delegate.create(this, clickBt)); } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ryan Matsikas Sent: segunda-feira, 14 de novembro de 2005 16:20 To: Flashcoders mailing list Subject: Re: [Flashcoders] Listeners Getting CRAZY = Please HELP! you dont call, setupBtnListeners() from anywhere.. how does the listener get added? On 11/14/05, Bruno Mosconi [EMAIL PROTECTED] wrote: I've got a custom Button Class extending mx.core.UIComponent, it' working fine till now... The point is, that I've got a simple DropDown menu, with buttons inside, and as I have a timeline to open it with animation Listeners don't WORK! I'm getting crazy! Compiler gives no error. The file: http://www.ultrafactor.com.br/flash_bug/SelMenu.zip The code: import com.ultrafactor.Button; import mx.utils.Delegate; class com.ultrafactor.SelMenu extends MovieClip { private var myInternal:Number; private var bnt_0:Button; public function SelMenu() { main(); } private function main():Void { myInternal = setInterval(this, setTabButtonListeners, 1000); } private function setupBtnListeners():Void { var classPointer = this; clearInterval(classPointer.myInternal); //DO NOT WORK! bnt_0.addEventListener(click, Delegate.create(this, clickBt)); } private function clickBt():Void { trace(clik);//DO NOT WORK } } My custom Button Class: import mx.core.UIObject; import mx.core.UIComponent; class com.ultrafactor.Button extends mx.core.UIComponent { private var initializing:Boolean = true; private var autoRepeat:Boolean; private var interval; function Button() { super.init(); useHandCursor = true; } private function size(Void):Void { super.invalidate(); } private function draw(Void):Void { if (initializing) { initializing = false; } size(); } private function onRollOver():Void { if (interval != undefined) { clearInterval(interval); delete interval; } gotoAndStop(2); } private function onDragOver():Void { onPress(); } private function onRollOut():Void { gotoAndStop(1); } private function onDragOut():Void { onRollOut(); } private function onRelease():Void { dispatchEvent({type:click}); onRollOver(); } private function onPress():Void { gotoAndStop(3); dispatchEvent({type:buttonDown}); if (autoRepeat) { interval = setInterval(this, onPressDelay, getStyle(repeatDelay)); } } private function onPressDelay(Void):Void { dispatchEvent({type:buttonDown}); if (autoRepeat) { clearInterval(interval); interval = setInterval(this, onPressRepeat, getStyle(repeatInterval)); } } private function onPressRepeat(Void):Void { dispatchEvent({type:buttonDown}); updateAfterEvent(); } } ___ 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 ___ 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] dispatching events from a class = HELP
Hi, I'm also having problems with Events. Could someone give me a little help on this issue? The EventListener is firing fine, but its associated method CAN NOT call another Class method. Why? Here is the Main Class: (Here is the Problem) import com.ultrafactor.LblButton; class com.ultrafactor.TabBox extends MovieClip { private var tab_0:LblButton; public function TabBox() { main(); } private function main():Void { setButtonListeners(); } // don't know why it takes so long... // is there any other elegant way to do it?? private function setButtonListeners():Void { i=0; this.onEnterFrame = function() { this.i++; if(this.i==20) { delete this.onEnterFrame; } else { tab_0.addEventListener(release,this.clickTab); } } } private function clickTab(evtObj:Object):Void { trace(click);// WORK this.test();// DO NOT WORK } //Can't call this Method!!! private function test():Void { trace(test); } } The used Classes: import mx.core.UIObject; import mx.core.UIComponent; class com.ultrafactor.Button extends mx.core.UIComponent { private var initializing:Boolean = true; private var autoRepeat:Boolean; private var interval; function Button() { super.init(); useHandCursor = true; } private function size(Void):Void { super.invalidate(); } private function draw(Void):Void { if (initializing) { initializing = false; } size(); } private function onRollOver():Void { if (interval != undefined) { clearInterval(interval); delete interval; } gotoAndStop(2); } private function onDragOver():Void { onPress(); } private function onRollOut():Void { gotoAndStop(1); } private function onDragOut():Void { onRollOut(); } private function onRelease():Void { dispatchEvent({type:click}); onRollOver(); } private function onPress():Void { gotoAndStop(3); dispatchEvent({type:buttonDown}); if (autoRepeat) { interval = setInterval(this, onPressDelay, getStyle(repeatDelay)); } } private function onPressDelay(Void):Void { dispatchEvent({type:buttonDown}); if (autoRepeat) { clearInterval(interval); interval = setInterval(this, onPressRepeat, getStyle(repeatInterval)); } } private function onPressRepeat(Void):Void { dispatchEvent({type:buttonDown}); updateAfterEvent(); } } import com.ultrafactor.Button; import mx.core.UIObject; import mx.core.UIComponent; import mx.events.EventDispatcher; class com.ultrafactor.LblButton extends Button { private function dispatchEvent() {}; public function addEventListener() {}; public function removeEventListener() {}; private var lbl:TextField; private var link:String; private var initializing:Boolean = true; private var initText:String; function LblButton() { mx.events.EventDispatcher.initialize(this); super.init(); } public function setLabel(t:String):Void { if (initializing) { initText = t; } else { lbl.embedFonts = true; lbl.text = t; invalidate(); } draw(); } public function getLabel():String { if (initializing) return initText; return lbl.text; } public function
RE: [Flashcoders] dispatching events from a class = HELP
Why delegate if the method is inside the same Class? thanks -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ian Thomas Sent: domingo, 13 de novembro de 2005 15:46 To: Flashcoders mailing list Subject: Re: [Flashcoders] dispatching events from a class = HELP You need to use a Delegate. As this is a question which comes up about one a week on this mailing list (not your, fault, I know!) I'm afraid I'm going to direct you to the Flashcoders Wiki page about the problem rather than answer you in full here... http://www.osflash.org/flashcoders/as2 Hope that helps, Ian On 11/13/05, Bruno Mosconi [EMAIL PROTECTED] wrote: Hi, I'm also having problems with Events. Could someone give me a little help on this issue? The EventListener is firing fine, but its associated method CAN NOT call another Class method. Why? ___ 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] dispatching events from a class = HELP
Thanks! Btw, AS 3.0 looks like AS 2.0 FIXED... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ian Thomas Sent: domingo, 13 de novembro de 2005 16:25 To: Flashcoders mailing list Subject: Re: [Flashcoders] dispatching events from a class = HELP You need to use the Delegate in your addEventListener line - because you're passing clickTab to a completely different object, which will later call back to clickTab, but doesn't have the correct context. Passing this.clickTab isn't enough - passing Delegate.create(this,clickTab) should be enough. I know it's odd. This is changed in AS3. Ian On 11/13/05, Bruno Mosconi [EMAIL PROTECTED] wrote: Why delegate if the method is inside the same Class? thanks ___ 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] TextArea BUG!! HELP
Sadly TextArea Component does not have htmlText attribute, only text. If you try: txtDescription.htmlText = textHtml; TextArea will show blank. Thanks anyway, Bruno -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andreas Rønning Sent: quarta-feira, 9 de novembro de 2005 13:32 To: Flashcoders mailing list Subject: Re: [Flashcoders] TextArea BUG!! HELP txtDescription.text = textHtml; should be txtDescription.htmlText = textHtml; - Andreas Bruno Mosconi wrote: I'm preceding a simple task here, insert HTML content in a TextArea component including a simple Button component and a MC. First, I've imported TextArea and Button comps to my library. Put TextArea at Stage and name it as txtDescription. Next step, write down some code: [CODE] txtDescription.html = true; var textHtml = ; textHtml += test line..BR/; textHtml += img src=\Button\ id=\button_mc\br/; textHtml += test line..BR/; textHtml += img src=\ball\ id=\ball_mc\; txtDescription.text = textHtml; _lavel0.txtDescription.label.button_mc.label = Test; trace(_lavel0.txtDescription.label.button_mc.label); [/CODE] It was supposed to work fine, but a b very strange BUG /b came along... See odd result and source file here: a href=http://www.ultrafactor.com.br/flash_bug/Button_in_TextArea_test.swf Meet the BUG! /a a href=http://www.ultrafactor.com.br/flash_bug/Button_in_TextArea_test.fla Source Code Here /a ___ 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] TextArea BUG!! HELP
Ok, but how do I refer to button's instance to change dynamically its label? Btw, I've found a FIX at: http://flashant.org/index.php?m=200412#239 Looks like lots of people are addressing the same BUG unusual ways. But buttons LABEL stills blank!! Do you have any additional tip? Thanks, Bruno Mosconi -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Stuhr Sent: quarta-feira, 9 de novembro de 2005 17:25 To: Flashcoders mailing list Subject: Re: [Flashcoders] TextArea BUG!! HELP Bruno Mosconi schrieb: Sadly TextArea Component does not have htmlText attribute, only text. If you try: txtDescription.htmlText = textHtml; TextArea will show blank. put the button inside another mc should give expected results. and btw: isn't there a bug with img/ at the very end of html inside textFields ?? micha ___ 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] TextArea BUG!! HELP = Can't Change Button's Label
The MC trick worked fine, but button's label can't be changed at all! Take a look at this test code: txtDescription.html = true; var textHtml = ; textHtml += test line..BR/; textHtml += img src=\bt\ id=\button_mc\/br/; textHtml += test line..BR/; textHtml += img src=\ball\ id=\ball_mc\/; txtDescription.text = textHtml; txtDescription.doLater(this, setlabels); tbt.label = Test Button; //trace(tbt.label); function setlabels() { _level0.txtDescription.label.button_mc.but.label = Test Button; _level0.txtDescription.label.button_mc.but.invalidate(); trace(_level0.txtDescription.label.button_mc.but.label); _level0.txtDescription.invalidate(); } The STRAGE BUG here is that TRACE returns the new label value: Test Button, but in TextArea my button stills w/ its default value: Button! Take a look: http://www.ultrafactor.com.br/flash_bug/Button_in_TextArea_test.fla http://www.ultrafactor.com.br/flash_bug/Button_in_TextArea_test.swf -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Stuhr Sent: quarta-feira, 9 de novembro de 2005 17:25 To: Flashcoders mailing list Subject: Re: [Flashcoders] TextArea BUG!! HELP Bruno Mosconi schrieb: Sadly TextArea Component does not have htmlText attribute, only text. If you try: txtDescription.htmlText = textHtml; TextArea will show blank. put the button inside another mc should give expected results. and btw: isn't there a bug with img/ at the very end of html inside textFields ?? micha ___ 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] TextArea BUG!! HELP
YES!! You did IT! Why in hell we need this trick?? Invalidade(); function is supposed to redraw the component, isn't it? N1 got any idea?? Thanks Micha!! Again... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Stuhr Sent: quarta-feira, 9 de novembro de 2005 18:31 To: Flashcoders mailing list Subject: Re: [Flashcoders] TextArea BUG!! HELP Bruno Mosconi schrieb: Micha, thanks for the help Your MC trick worked fine, but button's label can't be changed at all! Take a look at this test code: txtDescription.html = true; textHtml += test line..BR/; textHtml += img src=\button_mc\ id=\button\sfvdfbybfbfbbr/; textHtml += test line..BR/; textHtml += img src=\ball\ id=\ball_mc\kjzhhgvhkgvjhjkhv; txtDescription.text = textHtml; this.onEnterFrame = function () { trace(txtDescription.label.button.butt.label = FOO); delete this.onEnterFrame } // this will do the trick micha ___ 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