View Full Version : Remoting Newbie Question (function & vars)

05-12-2004, 12:39 PM
I'm new to remoting and not a programmer, but I'm a mid level actionscripter.

I'm trying to understand the calling of SS functions and vars.

For example:
If I'm trying to increase a global var by one, what would that look like. Sticking just to the client, it'd be myCount ++; on the onPress say, but I'm not understanding what it would look like if trying to go out to the ss.

I do understand that the connection needs to be made and all that, help me with just this part. (There is a "programmer" doing the connection part.)


Sorry for being "new", but aren't we all at some point.

05-24-2004, 10:36 AM
Hi there smc01,

sorry but I think you need to better describe your scenario for us to help you.

What is you are trying to do - increment a variable on server side? Like a counter?

Don't be sorry for being a newbie - we never stop learning so there is always something we are new to.

Pop up som emore info and we'll see if we can help.


05-24-2004, 10:55 AM
Hey Matt.....

Sorry for the bad description. It's due to the lack of sleep and no clear thinking capability on my part.

I think I'm just going to do the count on the client side. A first I thought I needed to pass it to the server, but that's not the case. I just need to hold it on the client and then pass a different result to the server. Not a count but just a var.

Would you happen to have any example of how I would pass the following (As in sample server function call):
Q = 2; where Q is a question number and the range is between 1 to 15. Meaning, there are 15 questions and on the onRelease of a "Submit" button, the Q number needs to be set on the server so that a 2ndary client can see that Q number and load the appropriate file associated with it.

I have almost all of it hard coded, but making that server connection and setting the function to pass that to the server is where I'm getting pretty lost.

And after reading all that, it's still unclear! Wow, I need a month away from the computer at this point. Damn this year long project and crunch time!

05-24-2004, 11:07 AM
Hi smc01,

Pretty late here but I will stick around for a bit longer to see if I can help.

Lets see if I have this right.

You have a range of questions (1 -15) available to the user.
The user selects a question and clicks on a submit button.
The submit sends the variable Q (the question index) to the server.
The server will act on this information and pass something back to the user?

Who or what is the secondary client and what is thier role in this system?

What server side language is in use?

We'll get there.

05-24-2004, 11:19 AM
Hey, don't stick around on my behalf.

here's further info....
We're doing an interactive room. one "main client" showing a movie on a projection screen (no control by user for this main client, just reads Vars off of the server and plays appropriate swfs). 3 PDA clients, user have control. When the user answers a question (onRelease of "Submit" button, a video.swf is played on that PDA. In order to get the same video.swf to play on the "main client" I need to pass the Q var to the server. Does that make more sense?

Server side language is JBoss I think. It's set-up to an extent. To handle the ID of the PDA (via IP address) and I need to get the "programmer" to set it up to handle the Q as well.

I'm just trying to figure out how to set that function up on the client. As in, I know there is the connection set-up and then I need to set-up the different functions that pass the IP address and also one that will Pass the Q as well. Correct? I'm just completely new to Flash Remoting and even looking at books isn't helping at this point. I think it has to do with almost zero sleep over that past 10 weeks too.....

But again, don't stick around to help me out. I know it's gonna take awhile before I "get" all this.....

Thanks for your help.

05-24-2004, 11:42 AM
What you seem to be describing is a system that would require "state", that is that the main client needs to know the state or value of some data shared with the 'PDA Clients" - the "Q" variable. Is this what you are trying to achieve?

Such a system would be better served with Flash Comm server or Colin Moock's Unity server. Both these systems will provide real time communication between the main projector and the controller clients.

Remoting does not create communication between clients so you cannot pass your variable directly to the main projector. You can pass the variable to the server but the main projector client needs to poll or periodically check the server to see if the value has changed.

05-24-2004, 12:52 PM
yeah.... we kinda had an idea that Flash Comm was capable of such a thing. Do you have an idea of the complexity of setting that up? As in setting up Flash Comm to do that? I was going to create a simple 'controller' clip to fire the function every 2 seconds or so to see if anything has changed....

05-24-2004, 07:59 PM
good morning smc01,

I eventually found my bed (4:30am here) but have now risen to the new day.
Flash Comm is pretty straight forward to install and set up. Cost is a bit daunting but there a now a few of the better hosting companies offering it at a competitive price.

Flash comm is pretty easy to code for as well (at least for mid level AS scripters up) and to create a shared opject that could house the information and broadcast functions to communicate with the various clients is relatively simple - compared to your current model. Just download the trial and grab a couple of the samples and tute files around. A day spent playing with this product may open your eyes to more possibilities for your project. An added plus of Flash Comm is vid streaming.

Haven't tried Unity yet, got a project in ming for it so will hopefully be getting my hands dirty soon. Most thinks from Colin tend to be pretty good.