PDA

View Full Version : Different Sliders for Different Robots



jingman
July 8th, 2003, 03:33 PM
As briefly as I can:

I'm going to have the user choose how many robots he wants to generate. These robots are their own little movie clips, and they work on input variables like "speed" "path" "bump" etc. I want these variables to be controled by a bunch of sliders. I can handle all this, what I need help on is:

When someone clicks on a robot, I want that robot's control panel to come up, and show the settings for that robot. Then if I click a different one, I want it's own control panel to come up, with that robot's settings.

So, I'm wondering how to get these control panel MCs to retain their settings. Should I just use a bunch of _visible = true/false statements? How is this typically done?

If you have seen info on this within the forum, all I ask for is a keyword or a link, thanks.

senocular
July 8th, 2003, 03:55 PM
are these control panels all going to be the same control panel or are they all going to be seperate? i.e. are they going to be like the properties panel in Flash where its the same panel for all movieclips? ... or something where each robot will have its own panel?

jingman
July 8th, 2003, 04:02 PM
Well, all of the control panels are replications of the same "Control Panel" MC. The reason I made the impression that I wanted different panels for each robot, was because I wanted the settings to stay with the robot -

Say I have 3 sliders, at 30, 24, 56 - and these are the settings for robot 1. For robot 2 the settings are 67, 45, 98. When you click on robot 2, the sliders should show the settings for that robot. I really don't mind if it's just one instance of the MC that changes with the "current" robot.

So, maybe I should just set up a way for the robotMC to communicate it's current settings to the sliders? And then have some kind of 'apply' button to send the new slider values to the robotMC.

senocular
July 8th, 2003, 04:45 PM
Originally posted by jingman
So, maybe I should just set up a way for the robotMC to communicate it's current settings to the sliders? And then have some kind of 'apply' button to send the new slider values to the robotMC.

yes. on the selection of the robot, just copy over its properties to the sliders. In doing so, you should also set a variable for those sliders (or a global variable of sorts) specifying the 'selected robot' as that robot. Then each slider just affects the 'selected robot'.

jingman
July 8th, 2003, 06:04 PM
word, thanks sen.