You're right.. I never use this ;) -----Oorspronkelijk bericht----- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Merrill, Jason Verzonden: woensdag 22 maart 2006 17:22 Aan: Flashcoders mailing list Onderwerp: RE: [Flashcoders] It exists in director but in flash ?
>>and I didn't know the apply() , so thanks a lot ! You don't need to use apply() on a separate line - just add () after the eval, as in my example: this[myFunctionString](); Jason Merrill | E-Learning Solutions | icfconsulting.com >>-----Original Message----- >>From: [EMAIL PROTECTED] [mailto:flashcoders- >>[EMAIL PROTECTED] On Behalf Of Patrick Jean >>Sent: Wednesday, March 22, 2006 11:19 AM >>To: 'Flashcoders mailing list' >>Subject: RE: [Flashcoders] It exists in director but in flash ? >> >>oooh, yes, that will definitely do the job ! Thanks a lot. >> >>Like I mentioned earlier, the "trace" in my example was just to see if I >>could use eval that way, but the whole idea is to call methods & functions, >>and I didn't know the apply() , so thanks a lot ! >> >>Patrick Jean >>Directeur de projets internet >>Monac'OH Data Mercantour >>http://www.monacoh.com >> >>-----Original Message----- >>From: [EMAIL PROTECTED] >>[mailto:[EMAIL PROTECTED] On Behalf Of Bernard >>Visscher >>Sent: Wednesday, March 22, 2006 11:15 AM >>To: 'Flashcoders mailing list' >>Subject: RE: [Flashcoders] It exists in director but in flash ? >> >>I think this will work: >> >>function test(){ >> trace("test"); >>} >> >>var str:String; >>str = eval("test"); >>Function(str).apply(); >> >>Greetz, >> >>Bernard >> >>-----Oorspronkelijk bericht----- >>Van: [EMAIL PROTECTED] >>[mailto:[EMAIL PROTECTED] Namens Patrick Jean >>Verzonden: woensdag 22 maart 2006 16:58 >>Aan: [EMAIL PROTECTED] Figleaf. Com >>Onderwerp: [Flashcoders] It exists in director but in flash ? >> >>Is there any way in Flash 8 to tell the compiler to run a string as if it >>was a method ? See the exemple below : >> >> >> >>var tempString:String; >> >>tempString = "anObject.doSomething()" >> >> >> >>and having the string being interpreted as a command ? I thought I could do >>that with eval but it doesn't seem to work. >> >> >> >>I remember that with Director you could use the "do" command using a string, >>what was pretty convenient. >> >> >> >>Thanks >> >> >> >>Patrick Jean >> >>Directeur de projets internet >> >>Monac'OH Data Mercantour >> >>http://www.monacoh.com >> >> >> >>_______________________________________________ >>[email protected] >>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 >> >>_______________________________________________ >>[email protected] >>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 >> >>_______________________________________________ >>[email protected] >>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 NOTICE: This message is for the designated recipient only and may contain privileged or confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of this e-mail by you is prohibited. _______________________________________________ [email protected] 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 _______________________________________________ [email protected] 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

