[FMX] variable handling from server

I need help figuring out how to take a variable sent from the server with the name of a desired swf to load into a blank “container” movie in another swf. I am assuming this is done with a varible.

The Setup: there is a library of swfs that have mpeg movies in them so that we can use the Flash plugin instead of RealPlayer or one of those invasive players. The server calls up the player, an swf in a HTML page, that has play, stop, and volume buttons and tells it which movie in the library to loadMovie.

I haven’t used varibles handed off from a server. Any comments suggestions?

Cheers,
AC

well you would use loadVariables() … but I’m still not really clear on what you are doing… I am having trouble following the logic of your question…

where/what/how is the variable defined/stored… etc etc…

Your confusion is understandable. I’m confused. I’ve never done anything like this.

Call the HTML page with the player controls (like you might see a Quicktime screen) “PLAYER”

The server sends the PLAYER page to the user then tells the PLAYER which movie in the library to load into the PLAYER. So, instead of a button where is says:

on (release) {_root.containter.loadMovie(“mpeg1.swf”);
}
or something similar, it would say:

_root.containter.loadMovie(“whatever the server tells it to load”);

I need to know what the information from the server (ColdFusion) needs to look like, and what kind of actionscript i need to write to dynamically the swf in the PLAYER movie.

Any clearer?
AC

would the movie be changing regularly? randomly? or would it be the same thing constantly?

I didn’t want to complicate things more than they are, so I’ll just lay it all out on the table.

**The short answer: **same movie the whole time

**The long answer: **We have a software product that looks up job #'s, position descriptions, etc. It has a page where it sends a string to our server, telling the server which movie to load into an HTML page which appears in a screen in the software product. The HTML page is generated dynamically by the ColdFusion server. Depending on availability of a movie and other factors, the software & the server decide which page to pull up. They load a specific swf into the page.

That’s fine, but it a pain to set up all of these movies with their individual frame lengths. Right now, I import the movie into fla with the controls. I have to resize, reposition, blah, blah. It wouldn’t be so bad if I didn’t have more than 300 of these things to do. I only want to mess with the mpeg & the action layers, and I figured, learn something and do it dynamically.

The way I did it before (I did this a while ago I was still learning Flash, so try not to laugh too hard) I thought about sticking the mpeg in a movie clip inside the main movie. I have to re-do everything because our source provider changed the naming convension… If you think this explanation is long-winded, it’s only part of the story.

I figure that there must be a way to the footage dynamically into the player, and I assumed it would have to be using variable.

Jubba, you still with me?
Thanks for your patience,
AC

I don’t really know how to do it with Coldfusion… but if you are using a database then set some variable equal to the movie name for each page…

nMovie = “movie1.mpg”

then the flash movie code would be something like

loadVariables("SomePage.php", "POST");
loadMovie(nMovie);

something like that…

I’ll talk with my ColdFusion guys.

Thanks a bunch! Folks like you make this forum a great place to learn. I wil endevour to help others as you have helped me. :slight_smile:

AC