Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 1st, 2003, 01:01 AM
stanley1610's Avatar
stanley1610 stanley1610 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 250 stanley1610 User rank is Corporal (100 - 500 Reputation Level)stanley1610 User rank is Corporal (100 - 500 Reputation Level)stanley1610 User rank is Corporal (100 - 500 Reputation Level)stanley1610 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 16 h 15 m 52 sec
Reputation Power: 8
Question Global Variable for AMFPHP

Since I have different kinds of return values from my remoting objects, in order to fully utilize the values, I decide to use Global variables to handle the returned result but....

_global.getName = "";

function getName_result(theResult)
{
_global.getName = theResult;
}

categoryMgr.getName(-1);
trace(_global.getName);


My NetDebugger has detected that I had received the value "ABC" by the method getName. But _global.getName does not contain any variable at last;

What is the problem?
__________________
------------------------------------------
Perl Kids Kiss Perl
Stanley
------------------------------------------

Reply With Quote
  #2  
Old August 1st, 2003, 09:34 AM
jamieB jamieB is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Nov 2002
Posts: 592 jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 1 h 56 m 16 sec
Reputation Power: 17
I think that after declaring a variable in the _global scope, you need only call it by name after that
Code:
_global.getName = ""; 

function getName_result(theResult) 
{ 
getName = theResult; 
} 

categoryMgr.getName(-1); 
trace(getName); 

?

Reply With Quote
  #3  
Old August 2nd, 2003, 01:53 AM
stanley1610's Avatar
stanley1610 stanley1610 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 250 stanley1610 User rank is Corporal (100 - 500 Reputation Level)stanley1610 User rank is Corporal (100 - 500 Reputation Level)stanley1610 User rank is Corporal (100 - 500 Reputation Level)stanley1610 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 16 h 15 m 52 sec
Reputation Power: 8
Thanks for your response.

No, your suggestion does not work.
Let me show another case so that we can understand this problem more;

_global.getListByParent = new Array();

function getListByParent_result(theResult)
{
_global.getListByParent = new Array();
for (var idx in theResult)
{
_global.getListByParent.push(theResult[idx]);
}

trace("Inside Function Length: " + _global.getListByParent.length);
}

categoryMgr.getListByParent(-1);
trace("Outside Function Length: " + _global.getListByParent.length);

Output:
Inside Function Length: 2
Outside Function Length: 0

Can you recognize the problem? Please advise.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > Global Variable for AMFPHP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway