Skip to main content
Known Participant
November 12, 2007
Answered

How to make several Check boxes interact to load a movie

  • November 12, 2007
  • 27 replies
  • 1580 views
Hello,
I have a very complicated doubt. I have a document called “selection” with 15 check boxes.

The check boxes are divided into groups. The first group is “category” and has 4 check boxes named “eco”, “conf”, “spor” and “ultr”, the second group is “makers” and has 4 check boxes named “bridge”, “dun”, “cont” and “fire”, the third group is “velocity code” and has 4 check boxes named “j”, “k”, “l” and “m”, finally the fourth group is “Run Flat” and has 3 check boxes named “yes”, “no” and “just” and I have a submit button.
I have also a “main” document that has 20 holders called “holder1”, “holder2”, and so on…

I would like to know if there is a way of, when I click the submit button if, for example, the check boxes “eco” and “conf” of the first group, the check boxes “bridge” and “fire” of the second group, the check boxes “j” and “m” of the third group and the check box “just” of the fourth group are selected, then, the movie “eco_bridge_j_just.swf” is loaded to holder1, the movie “eco_bridge_m_just.swf” is loaded to holder2, the movie “eco_fire_j_just.swf” is loaded to holder3, the movie “conf_fire_m_just.swf” is loaded to holder4 and so on…

Please tell me that it is possible and the best way of doing it. My Action Script is not very good so I thank everyone who can help me.
This topic has been closed for replies.
Correct answer kglad
you have to understand those 4 for-loops if you want your swfs to load into particular alvo movieclips. if you don't care where your swfs load you can probably use:

27 replies

kglad
Community Expert
Community Expert
November 18, 2007
you're welcome.

(and good luck!)
kebatAuthor
Known Participant
November 18, 2007
As always: You are the best!
Thank you so much! Everything is working perfectly! Thank you!
kebatAuthor
Known Participant
November 17, 2007
Ok! How do I do that?
I've tried to add this "for(var i = 0;length; i++) {" after the other variables but it still don't work. The script as no errors but my trace isn't working. The output panel shows nothing. What am I doing wrong?
kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
November 17, 2007
you have to understand those 4 for-loops if you want your swfs to load into particular alvo movieclips. if you don't care where your swfs load you can probably use:

kglad
Community Expert
Community Expert
November 17, 2007
where's i defined? that's the problem.
kglad
Community Expert
Community Expert
November 17, 2007
copy and paste the loadMovie() code you use that fails. and use the attach code option.
kebatAuthor
Known Participant
November 17, 2007
Well, I'll send you the entire code.
I've manage to get myself a new problem. When I test my movie my trace don't show up. When I press the submit button the output panel shows "alvoNaN". My trace shouldn't be there, right? My targets are named "alvo1", "alvo2", etc. I know something is missing so please don't laugh.
kebatAuthor
Known Participant
November 17, 2007
My targets movieclips exist and are in the same timeline as my check boxes. The problem is that I've tried everything I know and I can't get the code to work. The output panel accuses no errors but as soon as I change the "create empty movieclip" in the code it no longer works. None of the swfs is loaded.
I've already checked and rechecked my file names and my targets and pretty much everything.
I don't know what else can I do. I really need to make it work in my targets otherwise the swfs will be loaded one in top of the other.
kglad
Community Expert
Community Expert
November 17, 2007
if your trace functions reveal that your target movieclips exist either, you are loading ok and you just don't see it or the strings to the external swfs are incorrect. use a trace function on those file names. and case counts when files are on a server.
kebatAuthor
Known Participant
November 16, 2007
The names of my targets are "alvo1", "alvo2", "alvo3" and so on.
I've already tried to do that. The trace is working. It recognizes the target but once I change the lines of code (tl var) that are meant to create a new movie clip to load the swf's, the code doesn't work, even though it has no errors.
I've tried to combine in every way possible the scripts that I have in order to do the swf's load in my targets. This time I thought it would be easier because my targets are in the same document than my check boxes.
Please help me! Thank you for everything.
kglad
Community Expert
Community Expert
November 16, 2007
what are the path/names of your targets from the timeline that contains your loadMovie() statements?

put a trace() function near those loadMovie() statements to ensure you have those paths/names correctly stated.
kebatAuthor
Known Participant
November 16, 2007
You're right and I'm sorry. I'm a little bit out of my league. My problem is that there are absolutely no tutorials that explain what I need.
I've already fixed most of my problems. The one that I can't find a way to solve is a way of making my swf's be loaded into targets that already exist. In the script you wrote, every time that I click the submit button it creates a new movie clip and if I'm loading more than one swf, they load one in top of the other. I need them to be loaded into targets because I can control their exact position.
I don't mean to be annoying but can you help me with this one thing?
Thank you!