Re: [Flashcoders] |:::| can you write dynamic meathods in a class?
Give us the code of the dispatching of the event ... dnk wrote: Ramon Miguel M. Tayag wrote: http://board.flashkit.com/board/showthread.php?t=662329highlight=delegate How do you call this class? I tried import com.includingatree.utils.Delegate; //use the delegate this.menuBtn.addEventListener(click, Delegate.create(this, onHit1, 1)); //create the btn event to handle the click function onHit1(n:Number) { trace(it was hit with the number: + n); } But I get returned: it was hit with the number: [object Object] What would I be doing wrong? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] delegating inside a tween class
Dear List, I am trying to use tween's onMotionFinished method in order to make use of this, only when I try to call it normally (see closeCanvas method below) and trace(mc) it traces undefined. So when I tried to delegate onMotionFinished, I stumbled accross another problem. This time since tween1 is instantiated insideof the openCanvas method, delegating it in the constructor doesn't help at all. So what should I do to workaround this? Basically I am trying to trigger an event when the motionFinished. IS using tween inside classes is a bad habit, should I take the code to the timeline? I really appreciate advices and helps!! best, ilteris. import mx.transitions.Tween; class Canvas { private var tween1:Tween; private var tween2:Tween; public var mc:MovieClip; // Constructor public function Canvas(timeline:MovieClip, level:Number, y_:Number) { mc = timeline.attachMovie(canvas, canvasS, level, {_x:158, _y:y_, _width:0}); this.tween1.onMotionFinished = mx.utils.Delegate.create(this, this.mcMotionFinished); } public function openCanvas() { tween1 = new Tween(mc, _width, mx.transitions.easing.Strong.easeOut, 0, 673, 3, true); mcMotionFinished(); // this doesn't scope to the class } public function mcMotionFinished() { trace(this); // I am assuming this should scope to // the class only I am not able to call this method. } public function closeCanvas() { tween2 = new Tween(mc, _width, mx.transitions.easing.Strong.easeOut, 673, 0, 2, true); tween2.onMotionFinished = function() { trace(mc) // nope, this scope to the tween itself. // check which one is pressed for next! } } } ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] delegating inside a tween class
ilteris, You can't assign a function to the onMotionFinished property (in the constructor) before the Tween instance has been created (in openCanvas). Those should be more like: public function Canvas(timeline:MovieClip, level:Number, y_:Number) { mc = timeline.attachMovie(canvas, canvasS, level, {_x:158, _y:y_, _width:0}); } public function openCanvas() { tween1 = new Tween(mc, _width, mx.transitions.easing.Strong.easeOut, 0, 673, 3, true); tween1.onMotionFinished = mx.utils.Delegate.create(this, mcMotionFinished); } Helen ilteris kaplan wrote: Dear List, I am trying to use tween's onMotionFinished method in order to make use of this, only when I try to call it normally (see closeCanvas method below) and trace(mc) it traces undefined. So when I tried to delegate onMotionFinished, I stumbled accross another problem. This time since tween1 is instantiated insideof the openCanvas method, delegating it in the constructor doesn't help at all. So what should I do to workaround this? Basically I am trying to trigger an event when the motionFinished. IS using tween inside classes is a bad habit, should I take the code to the timeline? I really appreciate advices and helps!! best, ilteris. import mx.transitions.Tween; class Canvas { private var tween1:Tween; private var tween2:Tween; public var mc:MovieClip; // Constructor public function Canvas(timeline:MovieClip, level:Number, y_:Number) { mc = timeline.attachMovie(canvas, canvasS, level, {_x:158, _y:y_, _width:0}); this.tween1.onMotionFinished = mx.utils.Delegate.create(this, this.mcMotionFinished); } public function openCanvas() { tween1 = new Tween(mc, _width, mx.transitions.easing.Strong.easeOut, 0, 673, 3, true); mcMotionFinished(); // this doesn't scope to the class } public function mcMotionFinished() { trace(this); // I am assuming this should scope to // the class only I am not able to call this method. } public function closeCanvas() { tween2 = new Tween(mc, _width, mx.transitions.easing.Strong.easeOut, 673, 0, 2, true); tween2.onMotionFinished = function() { trace(mc) // nope, this scope to the tween itself. // check which one is pressed for next! } } } ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] delegating inside a tween class
Helen, you just saved my day! I wish you were here and I bought you a brunch!! best, ilteris. On Aug 13, at 8:15 AM, Helen Triolo wrote: ilteris, You can't assign a function to the onMotionFinished property (in the constructor) before the Tween instance has been created (in openCanvas). Those should be more like: public function Canvas(timeline:MovieClip, level:Number, y_:Number) { mc = timeline.attachMovie(canvas, canvasS, level, {_x: 158, _y:y_, _width:0}); } public function openCanvas() { tween1 = new Tween(mc, _width, mx.transitions.easing.Strong.easeOut, 0, 673, 3, true); tween1.onMotionFinished = mx.utils.Delegate.create(this, mcMotionFinished); } Helen ilteris kaplan wrote: Dear List, I am trying to use tween's onMotionFinished method in order to make use of this, only when I try to call it normally (see closeCanvas method below) and trace(mc) it traces undefined. So when I tried to delegate onMotionFinished, I stumbled accross another problem. This time since tween1 is instantiated insideof the openCanvas method, delegating it in the constructor doesn't help at all. So what should I do to workaround this? Basically I am trying to trigger an event when the motionFinished. IS using tween inside classes is a bad habit, should I take the code to the timeline? I really appreciate advices and helps!! best, ilteris. import mx.transitions.Tween; class Canvas { private var tween1:Tween; private var tween2:Tween; public var mc:MovieClip; // Constructor public function Canvas(timeline:MovieClip, level:Number, y_:Number) { mc = timeline.attachMovie(canvas, canvasS, level, {_x: 158, _y:y_, _width:0}); this.tween1.onMotionFinished = mx.utils.Delegate.create (this, this.mcMotionFinished); } public function openCanvas() { tween1 = new Tween(mc, _width, mx.transitions.easing.Strong.easeOut, 0, 673, 3, true); mcMotionFinished(); // this doesn't scope to the class } public function mcMotionFinished() { trace(this); // I am assuming this should scope to // the class only I am not able to call this method. } public function closeCanvas() { tween2 = new Tween(mc, _width, mx.transitions.easing.Strong.easeOut, 673, 0, 2, true); tween2.onMotionFinished = function() { trace(mc) // nope, this scope to the tween itself. // check which one is pressed for next! } } } ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] yahoo map api example site
Some time during the past couple months, someone posted a link here to a nice-looking site that used the Yahoo map api with Ocean City properties. Anyone have that link? (I can't find it in the archives) thanks, Helen -- Helen Triolo http://flash-creations.com http://i-technica.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] yahoo map api example site
Here ya go Richard Kevin Aebig [EMAIL PROTECTED] to Flashcoders More options Jul 31With a pretty good fight, you can really customize the yahoo maps component. http://www.oceancityguide.com/hotels/more.cfm?guideID=321 !k On 8/13/06, Helen Triolo [EMAIL PROTECTED] wrote: Some time during the past couple months, someone posted a link here to a nice-looking site that used the Yahoo map api with Ocean City properties. Anyone have that link? (I can't find it in the archives) thanks, Helen -- Helen Triolo http://flash-creations.com http://i-technica.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] yahoo map api example site
many thanks, Richard! richard carr wrote: Here ya go Richard Kevin Aebig [EMAIL PROTECTED] to Flashcoders More options Jul 31With a pretty good fight, you can really customize the yahoo maps component. http://www.oceancityguide.com/hotels/more.cfm?guideID=321 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] |:::| can you write dynamic meathods in a class?
Ramon Miguel M. Tayag wrote: Sometimes some events pass their own args and you dont even see them.. Try changing your function to this: function onHit1(o:Object, n:Number) //the o object is passed by the listener { trace(it was hit with the number: + n); } That worked perfect!!! Thanks sooo much! d ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] RE: WSIWYG HTML text editor...
im sorry to dig this up again, but i am currently dealing with exactly the same problem, building an html editor, and i read this whole thread just today. jason: i wrote a function that does about what giles suggested and always cuts out all the html part of the htmltext, and finds you the exact position the user selected in the textfield. that way you wont need to use TextField.replaceSel() either. its consistent works fine without the bugs that you suggested might come along, jason - if all you would need it for is inserting image-tags. if you want to, i can send it to you off-list. my problem is only a bit different: being half way through writing my own html-texteditor, i am realizing what a monster this is turning into...it is far more complex than i thought it would be and i need to cut it off here, since its only a part of the project i have to deliver.so i am trying to find out what has been done - and i will look into what JPG suggested, but wanted to know if question: anyone, who has been in a similar situation, knows of any, and better, has experience with any other open-source html-editors he can recommend? it would be great if you could email me - and probably better off list, so nobody gets annoyed and this thread can finally die. (this is my first post to the list*hello everyone) anna From: Merrill, Jason [EMAIL PROTECTED] Reply-To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] RE: WSIWYG HTML text editor in Flash Date: Thu, 10 Aug 2006 16:02:36 -0400 maybe this post could be TRIMMED a bit girls? We girls are sorry Mom. Jason Merrill Bank of America Learning Organization Effectiveness - Technology Solutions ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com _ Die neue MSN Suche Toolbar mit Windows-Desktopsuche. Suchen Sie gleichzeitig im Web, Ihren E-Mails und auf Ihrem PC! Jetzt neu! http://desktop.msn.de/ Jetzt gratis downloaden! ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Weird?? increment behavior..
Hi all, Just tested a simple function to check if the increments are done correctly. I found the following a bit od. Maybe some can shed a light on this.. base code: //code function test(myName:String,myNumber:Number):Void { trace(myName + : + myNumber); } var depth:Number = 1; test('name' + depth, depth++); //traces name2 : 1 depth = 1; test('name' + depth, ++depth); //traces name2 : 2 depth = 1; test('name' + depth++, depth); //traces name1 : 1 depth = 1; test('name' + ++depth, depth); //traces name2 : 1 //end code I believe only the last 2 have the correct behavior, the first 2 don't. when I test, test('name' + depth, depth++); I expect a trace like: name1 : 1 when I test, test('name' + depth, ++depth); I expect a trace like: name1 : 2 Is it my mind that's letting me down, or is it really a bug ? Greetz, Bernard ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Weird?? increment behavior..
test('name' + depth, depth++); //traces name2 : 1 Yes, arguments of functions are pushed on the VM's stack in reverse order, right-to-left. It's counterintuitive, something you just have to come across once to notice, a nice bit of ActionScript trivia :) Mark On 8/13/06, Bernard Visscher [EMAIL PROTECTED] wrote: Hi all, Just tested a simple function to check if the increments are done correctly. I found the following a bit od. Maybe some can shed a light on this.. base code: //code function test(myName:String,myNumber:Number):Void { trace(myName + : + myNumber); } var depth:Number = 1; test('name' + depth, depth++); //traces name2 : 1 depth = 1; test('name' + depth, ++depth); //traces name2 : 2 depth = 1; test('name' + depth++, depth); //traces name1 : 1 depth = 1; test('name' + ++depth, depth); //traces name2 : 1 //end code I believe only the last 2 have the correct behavior, the first 2 don't. when I test, test('name' + depth, depth++); I expect a trace like: name1 : 1 when I test, test('name' + depth, ++depth); I expect a trace like: name1 : 2 Is it my mind that's letting me down, or is it really a bug ? Greetz, Bernard ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Weird?? increment behavior..
Thanks Mark! Didn't know that :) -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Mark Winterhalder Verzonden: maandag 14 augustus 2006 0:03 Aan: Flashcoders mailing list Onderwerp: Re: [Flashcoders] Weird?? increment behavior.. test('name' + depth, depth++); //traces name2 : 1 Yes, arguments of functions are pushed on the VM's stack in reverse order, right-to-left. It's counterintuitive, something you just have to come across once to notice, a nice bit of ActionScript trivia :) Mark On 8/13/06, Bernard Visscher [EMAIL PROTECTED] wrote: Hi all, Just tested a simple function to check if the increments are done correctly. I found the following a bit od. Maybe some can shed a light on this.. base code: //code function test(myName:String,myNumber:Number):Void { trace(myName + : + myNumber); } var depth:Number = 1; test('name' + depth, depth++); //traces name2 : 1 depth = 1; test('name' + depth, ++depth); //traces name2 : 2 depth = 1; test('name' + depth++, depth); //traces name1 : 1 depth = 1; test('name' + ++depth, depth); //traces name2 : 1 //end code I believe only the last 2 have the correct behavior, the first 2 don't. when I test, test('name' + depth, depth++); I expect a trace like: name1 : 1 when I test, test('name' + depth, ++depth); I expect a trace like: name1 : 2 Is it my mind that's letting me down, or is it really a bug ? Greetz, Bernard ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] dynamic text fields missing content
Good day - I have a dynamic text field that fulls data from a class. Now when viewing local on my desktop - all is good. But once I upload the swf to the server - it disappears. Any ideas? I have been googling, and found many references to issues similar - and most said it had to do with static text fields with the same font. I have tried many of the solutions - some from un-embedding the font, a new font or adding the font to the library. I still get eht same issue. Any ideas? I am using flash 8. d ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] trivial or mysterious problem with component?
Hmm. V2 components are meant to have empty constructors, with initialisation being performed in an init() method, which will be called by the component architecture when the time is right. Try moving your code in your constructer to init(); Costello, Rob R wrote: Dear all I have a strange problem getting a V2 component to initialize I can copy code works that fine in one class, compiled into another class (and another swf), and it no longer works - just fails silently This is the essence of it : import mx.controls.Button; class Mysterious { function Mysterious () { doStuff() } function doStuff() { var endNoteButt = _root.createClassObject(Button, endNoteButt,1000); trace(endNoteButt); ; } } In the original class, it traces : _level0.endNoteButt In the new class it traces : undefined Very odd ...i might well be missing something trivial / obvious, but I can't see it... I know that V2 objects need some time to fully initialize, but they shouldn't return undefined? Bit more info that might help someone advise me here (1) in the first (working) case, Mysterious is instantiated from another class - in the second from the main timeline (2) using MX2004 IDE - both swf's compile and run fine - no errors (3) this is a new PC. fscommand also seems to have stopped working on this machine - unrelated? Security issue? (4) both have same directory location, and class paths set for the swf Help?! TIA Rob Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education Training.. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Haikal Saadh Applications Programmer ICT Resources, TALSS QUT Kelvin Grove ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] inconsistancies with movies (online vs offline)
Hi there - I have been battling with a bunch of odd behaviors with a few movies I have been working on. It is in fact driving me mad. inconsistencies include: 1) text field (dynamic) will not populate when viewed in a browser from a web sever vs working fine when testing out of the IDE. 2) html text fields (dynamic) show html when viewed online vs not showing when testing out of the IDE. Those are the main ones. And the other thing is that it is not always consistent! Sometimes this happens and other times it does not! I have been working on 1 stupid text box for hte last 4 hours without progress. Googling and so on. Has anyone had experiences like this? And even better yet a solution? I have updated my flash, moved my flash player back to 8 (from 9) and back to test. Updated the IDE, and so on. I am going bald on this one. thanks. d ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] simple xml editor?
I often develop projects in which the assets are changeable via properties in an external XML file. Usually my clients are savvy enough to open up a text editor and work with these files, but occasionally they're not and would rather have a more user-friendly CMS. In most of those cases though, such a system is outside of the budget. So I'm wondering if anyone has made or used a simple XML editor which either lives on a web server and displays/edits an XML file on that server in some sort of GUI-way, or perhaps some desktop app which does the same on a local file. I know there are products like XMLSpy available, but I'm thinking of something really simple and stupid-proof. (If such a thing doesn't exist, maybe I'll get around to making it. Perhaps something like Apple's Property List Editor and some AS classes to load/parse those files and deserialize it into native/ custom types.) -josh ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] simple xml editor?
I remember someone made a cool XML tool for Macromedia Central - I had some people use it and they loved it. Was it Ted Patrick? I have looked around and don't see it anywhere, but he probably still has it tucked away someplace. I might even have it installed on one of my copies of Central. On 8/13/06, Josh Santangelo [EMAIL PROTECTED] wrote: I often develop projects in which the assets are changeable via properties in an external XML file. Usually my clients are savvy enough to open up a text editor and work with these files, but occasionally they're not and would rather have a more user-friendly CMS. In most of those cases though, such a system is outside of the budget. So I'm wondering if anyone has made or used a simple XML editor which either lives on a web server and displays/edits an XML file on that server in some sort of GUI-way, or perhaps some desktop app which does the same on a local file. I know there are products like XMLSpy available, but I'm thinking of something really simple and stupid-proof. (If such a thing doesn't exist, maybe I'll get around to making it. Perhaps something like Apple's Property List Editor and some AS classes to load/parse those files and deserialize it into native/ custom types.) -josh ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] |:::| can you write dynamic meathods in a class?
Hey Guys, check this out Var clickHandler:Function = MyClass.staticMethod; var args:Array = ['Can', 'pass', 'in', 'any', 'amount']; newBtn.addEventListener(click, Delegate.create(this, function(evt:Object, meth:Function, args:Array) { meth.apply(null, args) }, clickHandler, args ) ); Regards, Bjorn Schultheiss Senior Flash Developer QDC Technologies -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of dnk Sent: Monday, 14 August 2006 5:17 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] |:::| can you write dynamic meathods in a class? Ramon Miguel M. Tayag wrote: Sometimes some events pass their own args and you dont even see them.. Try changing your function to this: function onHit1(o:Object, n:Number) //the o object is passed by the listener { trace(it was hit with the number: + n); } That worked perfect!!! Thanks sooo much! d ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] simple xml editor?
or perhaps some desktop app which does the same on a local file XMLPad , it's free, easy to use, and it does error checking in realtime. -- Anggie Bratadinata Web|Graphic|Flash Jl. Raya Langsep 21 Malang - East Java I N D O N E S I A http://design.ibshastautama.com Josh Santangelo wrote: I often develop projects in which the assets are changeable via properties in an external XML file. Usually my clients are savvy enough to open up a text editor and work with these files, but occasionally they're not and would rather have a more user-friendly CMS. In most of those cases though, such a system is outside of the budget. So I'm wondering if anyone has made or used a simple XML editor which either lives on a web server and displays/edits an XML file on that server in some sort of GUI-way, or perhaps some desktop app which does the same on a local file. I know there are products like XMLSpy available, but I'm thinking of something really simple and stupid-proof. (If such a thing doesn't exist, maybe I'll get around to making it. Perhaps something like Apple's Property List Editor and some AS classes to load/parse those files and deserialize it into native/custom types.) -josh ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] |:::| can you write dynamic meathods in a class?
Bjorn Schultheiss wrote: Hey Guys, check this out Var clickHandler:Function = MyClass.staticMethod; var args:Array = ['Can', 'pass', 'in', 'any', 'amount']; newBtn.addEventListener(click, Delegate.create(this, function(evt:Object, meth:Function, args:Array) { meth.apply(null, args) }, clickHandler, args ) ); That is a good idea! I just tried one of simpler layout (at least to me in terms of what I understand in AS) works like a charm: import utils.Delegate; //Create array to pass multiple args in - both string and number for testing var aMyArgs:Array = [1, 2, 'three', 4]; //use the delegate this.menuBtn.addEventListener(click, Delegate.create(this, onHit1, aMyArgs)); //create the btn event to handle the click function onHit1(o:Object, n:Array) { for (i = 0; i n.length; i++) { trace(it was hit with the arg: + n[i]); } } This is VERY handy (well to me anyways) to be able to pass in what ever args I need to. d ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com