Well simply because you have a function that is recursively calling itself from the inner onLoad function.

 

function loadProfile():Void {

            trace("loadProfile called");

            var cb_lv:LoadVars = new LoadVars();

            cb_lv. {

                        if(success) {

                                    trace(this.detail);

                                    var arr:Array = this.detail.split("|");

                                    loadProfile(arr);/* This is where you are calling the outer parent function recursively every time onLoad is triggered,

which in turn calls the load function on the loadVars object and so on and so on …. etc */

                                    this.>

                                    delete this.onLoad;

                        }

            }

cb_lv.load("http://192.168.100.147/Property-getDetail.aspx?id=76");

}

 

Cheers,

 

Farid


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jonathan Spooner
Sent: Tuesday, October 03, 2006 6:18 PM
To: Open Source Flash Mailing List
Subject: [osflash] LoadVars Error when in a function

 

I would like to have a LoadVars within a function.

 

It works but itcontinuously calls its self. Why, Why, Why

 

It seems when you place the .load() call inside the function it

repeatedlycalls.

 

Thanks for you help.

 

function loadProfile():Void {

            trace("loadProfile called");

            var cb_lv:LoadVars = new LoadVars();

            cb_lv. {

                        if(success) {

                                    trace(this.detail);

                                    var arr:Array = this.detail.split("|");

                                    loadProfile(arr);

                                    this.>

                                    delete this.onLoad;

                        }

            }

            cb_lv.load("http://192.168.100.147/Property-getDetail.aspx?id=76");

}

loadProfile();

 

 

 

 

-/-

 

JONATHAN SPOONER | senior interactive developer

 

ph 858 777 5034fx 858 777 5050


 

Aviatech, LLC

Integrated Marketing Solutions

4350 Executive Drive, Suite 200

San Diego, CA 92121

 

CONFIDENTIALITY NOTICE: This email transmission, and any documents, files or previous email
messages attached are intended only for the person(s) or entity to which it is specifically addressed
and may contain confidential information that is legally privileged. Any review, re-transmission,
dissemination or other use of, or taking of any action in reliance upon, this information by persons
or entities other than the intended recipient is prohibited. If you received this in error, please
contact the sender and destroy the original transmission and its attachments without copying or
saving in any manner.



 

_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to