all groups > macromedia flash flash remoting > september 2005 >
You're in the

macromedia flash flash remoting

group:

using import instead of #include



using import instead of #include Clacker
9/22/2005 12:00:00 AM
macromedia flash flash remoting: Ive noticed that where before I could use;

#include "NetServices.as"

...at the start of a multi-scened, multi-scripted flash doc and I could use
the net services anywhere, now when I use the;

import mx.remoting.*;
import mx.rpc.*;

... I have to put these import statements in every script throughout the flash
doc to use them. Is that really how it has to be done or is there any way to
just do one import at the start?
Re: using import instead of #include STHG
9/29/2005 5:01:08 AM
The way I do it is to encapsulate related remoting calls into a "proxy" action
script class. This class has all the remoting gobbledegook in it. Then I call
methods in this class from my various scripts rather than make all the messy
calls all over the place. So when changes happen to the way Flash Remoting
works, I just go and change my one class.
AddThis Social Bookmark Button