Re: [Flashcoders] Which object called the function
On Oct 8, 2006, at 1:47 AM, Ramon Miguel M. Tayag wrote: Yes, that would work, but is there a way to do it automatically and elegantly? Remember to always do it until it becomes second nature? ;-) This is the way I always do it at least. I don't know of any other reliable way. -- Troy RPSystems, Ltd. http://www.rpsystems.net ___ 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] Which object called the function
Yes, that would work, but is there a way to do it automatically and elegantly? On 10/8/06, Victor Gaudioso <[EMAIL PROTECTED]> wrote: when you call the function have it pass itself in as a parameter: someFunc(this) function someFunc(caller:Object):Void{ trace(caller) } Therefore who ever calls the function will pass itself into the function. That should work. Victor -- Ramon Miguel M. Tayag ___ 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] Unsubscribe me please
Hahasmart ass ;) - Original Message - From: "Steven Sacks | BLITZ" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Thursday, October 05, 2006 11:26 AM Subject: RE: [Flashcoders] Unsubscribe me please Unsubscribe me please I've unsubscribed you. You shouldn't receive this email. Just in case you did, check out this part of the footer of every single message on Flashcoders. :) Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ 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] Which object called the function
when you call the function have it pass itself in as a parameter: someFunc(this) function someFunc(caller:Object):Void{ trace(caller) } Therefore who ever calls the function will pass itself into the function. That should work. Victor - Original Message - From: "Ramon Miguel M. Tayag" <[EMAIL PROTECTED]> To: "FlashCoders Programming" Sent: Saturday, October 07, 2006 11:10 AM Subject: [Flashcoders] Which object called the function Hi everyone, How do you find out which object calls a particular function? Is it even possible? Let's say there are two classes: class A { function A(){} function hello() { trace ("hello"); //I want to know who called me, here } } class Main { var a = new A(); function Main() { a.hello(); } } = How will A know that Main called the function? Thank you, -- Ramon Miguel M. Tayag ___ 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] tinyurl swf loading
Sounds interesting, would you mind sharing what that XML service is? thanks On 10/7/06, Bjorn Schultheiss <[EMAIL PROTECTED]> wrote: Thanks Claus, I found an XML service i can call instead of the abbreviated url :) New Solution! ___ 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] Which object called the function
I then call the function from another timeline. How would I use arguments.caller to return the ID of the object making the call? You can't, at least not directly. arguments.caller will give you a reference to the function from within which your method is called. You can use it to determine if it was called from an instance of a specific class: Say you have a class A with the method foo. From within method bar of class B you want to determine if it was called from an instance of A. You could test that with if( arguments.caller == A.prototype.foo ). However, it won't help you to find out from which instance of class A it was called. HTH, Mark On 10/7/06, Marc Hoffman <[EMAIL PROTECTED]> wrote: Mischa, Can you give a code example of this? Let's say I have this function on the main timeline: someFunction = function(){ // do something; } I then call the function from another timeline. How would I use arguments.caller to return the ID of the object making the call? Thanks, Marc At 09:21 AM 10/7/2006, you wrote: >arguments.caller > >Will give you a reference to the calling function. From the help: > >Property; refers to the calling function. The value of this property >is null if the current function was not called by another function. > >Cheers, > >Mischa > >On 7 Oct 2006, at 17:02, Dr. Suhas Pharkute wrote: > >>Initialise objects with unique ID's which will help you later to >>determine >>which object is calling the function. >> >>Suhas >> >>On 10/7/06, Ramon Miguel M. Tayag <[EMAIL PROTECTED]> wrote: >>> >>>Hi everyone, >>> >>>How do you find out which object calls a particular function? Is it >>>even possible? >>> >>>Let's say there are two classes: >>> >>>class A >>>{ >>> function A(){} >>> >>> function hello() >>> { >>> trace ("hello"); >>> //I want to know who called me, here >>> } >>>} >>> >>>class Main >>>{ >>> var a = new A(); >>> >>> function Main() >>> { >>> a.hello(); >>> } >>>} >>> >>>= >>> >>>How will A know that Main called the function? >>> >>>Thank you, >>>-- >>>Ramon Miguel M. Tayag >>>___ >>>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 >> >> >> >>-- >>Dr. Suhas Pharkute, PhD >>Syna Intelligence, LLP >>V. 208 830 8915 (C) >>E. [EMAIL PROTECTED],.com >>W. http://synaintel.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@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] Which object called the function
Mischa, Can you give a code example of this? Let's say I have this function on the main timeline: someFunction = function(){ // do something; } I then call the function from another timeline. How would I use arguments.caller to return the ID of the object making the call? Thanks, Marc At 09:21 AM 10/7/2006, you wrote: arguments.caller Will give you a reference to the calling function. From the help: Property; refers to the calling function. The value of this property is null if the current function was not called by another function. Cheers, Mischa On 7 Oct 2006, at 17:02, Dr. Suhas Pharkute wrote: Initialise objects with unique ID's which will help you later to determine which object is calling the function. Suhas On 10/7/06, Ramon Miguel M. Tayag <[EMAIL PROTECTED]> wrote: Hi everyone, How do you find out which object calls a particular function? Is it even possible? Let's say there are two classes: class A { function A(){} function hello() { trace ("hello"); //I want to know who called me, here } } class Main { var a = new A(); function Main() { a.hello(); } } = How will A know that Main called the function? Thank you, -- Ramon Miguel M. Tayag ___ 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 -- Dr. Suhas Pharkute, PhD Syna Intelligence, LLP V. 208 830 8915 (C) E. [EMAIL PROTECTED],.com W. http://synaintel.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@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] Which object called the function
Yes, Suhas -- but the function is scoped to the timeline in which it was created, not the object doing the calling. So how do you return the ID of the calling object? - Marc At 09:02 AM 10/7/2006, you wrote: Initialise objects with unique ID's which will help you later to determine which object is calling the function. Suhas On 10/7/06, Ramon Miguel M. Tayag <[EMAIL PROTECTED]> wrote: Hi everyone, How do you find out which object calls a particular function? Is it even possible? Let's say there are two classes: class A { function A(){} function hello() { trace ("hello"); //I want to know who called me, here } } class Main { var a = new A(); function Main() { a.hello(); } } = How will A know that Main called the function? Thank you, -- Ramon Miguel M. Tayag ___ 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 -- Dr. Suhas Pharkute, PhD Syna Intelligence, LLP V. 208 830 8915 (C) E. [EMAIL PROTECTED],.com W. http://synaintel.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] Which object called the function
arguments.caller Will give you a reference to the calling function. From the help: Property; refers to the calling function. The value of this property is null if the current function was not called by another function. Cheers, Mischa On 7 Oct 2006, at 17:02, Dr. Suhas Pharkute wrote: Initialise objects with unique ID's which will help you later to determine which object is calling the function. Suhas On 10/7/06, Ramon Miguel M. Tayag <[EMAIL PROTECTED]> wrote: Hi everyone, How do you find out which object calls a particular function? Is it even possible? Let's say there are two classes: class A { function A(){} function hello() { trace ("hello"); //I want to know who called me, here } } class Main { var a = new A(); function Main() { a.hello(); } } = How will A know that Main called the function? Thank you, -- Ramon Miguel M. Tayag ___ 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 -- Dr. Suhas Pharkute, PhD Syna Intelligence, LLP V. 208 830 8915 (C) E. [EMAIL PROTECTED],.com W. http://synaintel.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] Which object called the function
Initialise objects with unique ID's which will help you later to determine which object is calling the function. Suhas On 10/7/06, Ramon Miguel M. Tayag <[EMAIL PROTECTED]> wrote: Hi everyone, How do you find out which object calls a particular function? Is it even possible? Let's say there are two classes: class A { function A(){} function hello() { trace ("hello"); //I want to know who called me, here } } class Main { var a = new A(); function Main() { a.hello(); } } = How will A know that Main called the function? Thank you, -- Ramon Miguel M. Tayag ___ 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 -- Dr. Suhas Pharkute, PhD Syna Intelligence, LLP V. 208 830 8915 (C) E. [EMAIL PROTECTED],.com W. http://synaintel.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] Which object called the function
I'd love to know of a solution to this, too. My hack is to give the function an argument "me": // declaration: traceCaller = function(me){ trace (me); } // function call traces full path of calling object.: traceCaller(this); - Marc Hoffman At 08:10 AM 10/7/2006, you wrote: Hi everyone, How do you find out which object calls a particular function? Is it even possible? Let's say there are two classes: class A { function A(){} function hello() { trace ("hello"); //I want to know who called me, here } } class Main { var a = new A(); function Main() { a.hello(); } } = How will A know that Main called the function? Thank you, -- Ramon Miguel M. Tayag ___ 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] Which object called the function
Hi everyone, How do you find out which object calls a particular function? Is it even possible? Let's say there are two classes: class A { function A(){} function hello() { trace ("hello"); //I want to know who called me, here } } class Main { var a = new A(); function Main() { a.hello(); } } = How will A know that Main called the function? Thank you, -- Ramon Miguel M. Tayag ___ 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] tinyurl swf loading
Thanks Claus, I found an XML service i can call instead of the abbreviated url :) New Solution! ___ 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] tinyurl swf loading
Ajax magic :) a good idea but, thats difficult. I dont have access to the html page, impossible. I cant add js to the html.. Surely this shouldnt be a limitation of the player? Regards, Bjorn Schultheiss -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Claus Wahlers Sent: Saturday, 7 October 2006 10:48 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] tinyurl swf loading > Is there a way that i can load a swf via its tinyurl? > I think the issue that im having is that when the 'http://tinyurl.com/k23u4' > resolves to 'http://blabla.com' the MovieClipLoader.loadClip() dies... TinyURL sends HTTP/1.x 301 Moved Permanently Location: blabla.com So it seems the Flash Player can't resolve 301's. > Can i manually eval 'http://tinyurl.com/k23u4'somehow? Maybe you could hand it over to JavaScript via ExternalInterface, and then in JavaScript do some Ajax magic (send a HTTP HEAD request) and send the real URL back to Flash? Cheers, Claus. -- claus wahlers côdeazur brasil http://codeazur.com.br ___ 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] tinyurl swf loading
Is there a way that i can load a swf via its tinyurl? I think the issue that im having is that when the 'http://tinyurl.com/k23u4' resolves to 'http://blabla.com' the MovieClipLoader.loadClip() dies... TinyURL sends HTTP/1.x 301 Moved Permanently Location: blabla.com So it seems the Flash Player can't resolve 301's. Can i manually eval 'http://tinyurl.com/k23u4' somehow? Maybe you could hand it over to JavaScript via ExternalInterface, and then in JavaScript do some Ajax magic (send a HTTP HEAD request) and send the real URL back to Flash? Cheers, Claus. -- claus wahlers côdeazur brasil http://codeazur.com.br ___ 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] tinyurl swf loading
Hey, Is there a way that i can load a swf via its tinyurl? I think the issue that im having is that when the 'http://tinyurl.com/k23u4' resolves to 'http://blabla.com' the MovieClipLoader.loadClip() dies... Can i manually eval 'http://tinyurl.com/k23u4' somehow? Regards, Bjorn Schultheiss ___ 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] Class Problem + Bad attitudes
Hi, I take offence. To link bad manners and attitude issues to age is downright wrong. Are there not non-adolescent people who curse and swear and condescend? On 10/7/06, slangeberg <[EMAIL PROTECTED]> wrote: > Unfortunately the condescending attitudes have been pretty thick her on the list lately. I've noticed the same thing here and on a local Flash list. Not sure if it's because the programmers who're drawn to Flash tend to be tender young bas+ards, or is it just that programmers in general are condescending punks? That said, most of you could stand to learn a lot from myself. Scott On 10/6/06, Merrill, Jason <[EMAIL PROTECTED]> wrote: > > >>AS2 101. > >>Try > >>http://www.amazon.com/Essential-ActionScript-2-0-Colin- > >>Moock/dp/0596006527/s > >>r=8-1/qid=1160106358/ref=sr_1_1/104-8535662-7712736?ie=UTF8&s=books > > Unfortunately the condescending attitudes have been pretty thick her on > the list lately. Victor, pay no mind to the attitude, your question was > perfectly legit here- it's often hard quickly to find the answer to a > specific question in books or web sites, just do as he suggested - > something like this will work (may not be the best way, but how I would > do it - you can alternatively use getter/setter methods as well): > > //MyClassB.as > class MyClassB{ > public var ClassBArray:Array; > public function MyClassB(){ > ClassBArray = new Array(1,2,3,4); > } > } > > //MyClassA.as > import MyClassB; > class MyClassA{ > private var theArray:Array; > public function MyClassA(classb:MyClassB){ > theArray = classb.ClassBArray > trace(theArray) > } > } > > //.fla > import MyClassB; > import MyClassA; > myClassBInstance:MyClassB = new MyClassB() > myClassAInstance:MyClassA = new MyClassA(myClassBInstance); > > Hope that helps, > > 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 > -- : : ) Scott ___ 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 -- Cheers, Ray Chuan ___ 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] >> function and convert String
Why not simply: function getTextFromField ( txtfield ) { return txtfield.text ; } Or just peek in the manual where you can find that every textfield has a .text property (amongst other properties) so you can simply retrieve it with textfieldinstance.text. A special function seems way over the top unless one has nothing better to do ;) A textfields value is by default a string (text == string returns true), so why want to convert it. John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Laurent CUCHET Sent: Saturday, October 07, 2006 11:36 To: Flashcoders mailing list Subject: [Flashcoders] >> function and convert String I would like to take textfield value. How can I convert string ? function sqr(x) { var tx = "_level0.rec"+x; var c1 = tx+"1.text"; trace(c1); // give } Sqr(1); // Give string ³_level0.rec1.text² not the textfield value Thank You ___ 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] >> function and convert String
http://chattyfig.figleaf.com/mailman/listinfo/flashnewbie - Original Message - From: "Laurent CUCHET" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Saturday, October 07, 2006 11:35 AM Subject: [Flashcoders] >> function and convert String I would like to take textfield value. How can I convert string ? function sqr(x) { var tx = "_level0.rec"+x; var c1 = tx+"1.text"; trace(c1); // give } Sqr(1); // Give string ³_level0.rec1.text² not the textfield value Thank You ___ 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] >> function and convert String
Hello :) try the [] notation : function getField ( i ) { return _root["rec"+ i].text ; } // test var reference = getField(1) ; EKA+ :) 2006/10/7, Laurent CUCHET <[EMAIL PROTECTED]>: I would like to take textfield value. How can I convert string ? function sqr(x) { var tx = "_level0.rec"+x; var c1 = tx+"1.text"; trace(c1); // give } Sqr(1); // Give string ³_level0.rec1.text² not the textfield value Thank You ___ 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] >> function and convert String
I would like to take textfield value. How can I convert string ? function sqr(x) { var tx = "_level0.rec"+x; var c1 = tx+"1.text"; trace(c1); // give } Sqr(1); // Give string ³_level0.rec1.text² not the textfield value Thank You ___ 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] Error check for parseXML()
Hi, you should put the conditional in a callback, because when execution reaches the conditional xml parsing might not have finished parsing. var xml:XML = new XML(); xml.ignoreWhite = true; xml.parseXML(someTextVar); xml.onLoad = function(success:Boolean):Void { if (xml.status == 0) { trace("Success!"); } else { trace("Error in XML! Code: " + xml.status); } } Note that the "success" argument can be ignored if you're using functions like parseXML(), because it's got to do with the success of loading a document using XML.load() or XML.sendAndLoad(). On 10/7/06, Mike Keesey <[EMAIL PROTECTED]> wrote: Use the XML.status field. var xml:XML = new XML(); xml.ignoreWhite = true; xml.parseXML(someTextVar); if (xml.status == 0) { trace("Success!"); } else { trace("Error in XML! Code: " + xml.status); } ― Mike Keesey > -Original Message- > From: [EMAIL PROTECTED] [mailto:flashcoders- > [EMAIL PROTECTED] On Behalf Of Mendelsohn, Michael > Sent: Friday, October 06, 2006 6:50 AM > To: Flashcoders mailing list > Subject: [Flashcoders] Error check for parseXML() > > Hi list... > > According to the help docs, > public parseXML(value:String) : Void > doesn't return an integer or anything to indicate successful parsing of > the xml. How can I be certain that I've passed in some error free xml > and it was able to parse? > > Thanks, > - Michael M. > > > > > > ___ > 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 -- Cheers, Ray Chuan ___ 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