Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Remoting / January 2004



Tip: Looking for answers? Try searching our database.

_result query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
phil ashby - 28 Jan 2004 14:44 GMT
Hi,

I'm using Flash Remoting and everything is great...except...

I'm receiving the data back from the CF component in the _result handler, and giving it a name e.g.

 getremotedata.cff_getdirreports({var_nt:+_root.NTname});

 function cff_getdirreports_result(dirreps)
 {
    trace(dirreps.items[0].first_name);
 }

Within the handler I can do what I want, however, I want to use "dirreps" OUTSIDE the handler, like so...

 function cff_getdirreports_result(dirreps)
 {
// do some stuff inside the handler

 trace(dirreps.items[0].first_name);

// now call a submovie

 tellTarget("mc_submovie")
   {
      gotoAndPlay(2);
   }
 }
 
Frame 1 of mc_submovie contains

stop();

Frame 2 of mc_submovie contains

trace(_root.dirreps.items[0].first_name);

But on this trace I get "undefined".  I've tried various different things, but i can't seem to make the result (dirreps) visible outside the  result handler.  Am I doing something wrong or is this a limitation and if so, is there a way around it?

I don't have much hair as it is and me ripping out the remainder is upsetting my wife!

Cheers
Phil


P.R. Newman - 28 Jan 2004 15:59 GMT
> Hi,
>
[quoted text clipped - 10 lines]
>
> Within the handler I can do what I want, however, I want to use "dirreps" OUTSIDE the handler, like so...

Just copy dirreps into a global variable:

function cff_getdirreports_result(dirreps)
 {
    _global.reports_rs = dirreps;
    trace(reports_rs.getItemAt(0).first_name);
 }

trace(reports_rs.getItemAt(0).first_name);

Signature

Paul
-------------------------
Team Macromedia Member for Central
http://www.macromedia.com/go/team/
Extending Knowledge, Daily
http://www.communitymx.com
-------------------------

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.