I'm not familiar with WebService, so please excuse me if I'm way off.
Have you tried attaching the .target to wsResult.onResult? AFAIK
functions are always dynamic. Alternatively, you could keep it in a
local var, it could be accessed by wsResult.onResult if you declare it
where you currently do.
So, either:
wsResult.onResult = function () {
arguments.callee.target.whatever();
};
wsResult.onResult.target = this.target;
or:
var target = this.target;
wsResult.onResult = function () {
target.whatever();
};
The first option is preferable.
HTH,
Mark
On 9/5/06, Merrill, Jason <[EMAIL PROTECTED]> wrote:
My question can be found in the 2 comments in the code below. Thanks
for considering:
import mx.services.*;
class Whatever{
private var target_mc:MovieClip;
private var button_mc:MovieClip;
private var proj_ws:WebService;
public function TestScope(target:MovieClip,
buttonMC:MovieClip,
ws:WebService){
target_mc = target;
button_mc = buttonMC;
proj_ws = ws;
setActions();
}
private function setActions():Void{
button_mc.webservice = proj_ws;
button_mc.target = target_mc;
button_mc.onRelease = function(){
var wsResult:Object =
this.webservice.doSomething();
wsResult.target = this.target;/*thought I could
attach
this prop,
guess not.*/
wsResult.onResult = function(){
/* I want to do something like
this.target.gotoAndPlay("someframe"); here
or basically, use the target_mc scope from the
constructor.
I tried using Delegate and other options,
couldn't figure out
a good option. Ideas on how to redesign this?
*/
}
}
}
}
Thanks,
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
___
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