Solved

Flash Radio Buttons - Select button based on previously defined parameter

Posted on 2007-12-05
4
366 Views
Last Modified: 2012-06-27
I have 3 radio buttons within an embedded swf with the following parameters:

button1
data: blue
groupName: Colors

button2
data: red
groupName: Colors

button3
data: yellow
groupName: Colors

I have a global variable entitled _global.colors that has a value of "red". When this embedded .swf is called, I would like button2 to be shown as checked.

thanks

0
Comment
Question by:wattanabi2
  • 2
  • 2
4 Comments
 
LVL 39

Expert Comment

by:blue-genie
ID: 20436602
in the code that loads the respective swf files simply set the selected value of the radio button.
0
 

Author Comment

by:wattanabi2
ID: 20468555
Hi,

Thanks for the feedback.
I'm not quite sure how to do that. Here is the code in the actions layer:

======

flashistListener = new Object();
flashistListener.click = function (evt){
        theVerdict.text = evt.target.selection.data
}
ColorOption.addEventListener("click", flashistListener);


stop();

====
I tried:

ColorOption.data = "red";

But button 2 did not display as checked.

Any further assistance is greatly appreciated.
0
 
LVL 39

Accepted Solution

by:
blue-genie earned 250 total points
ID: 20470116
I'm a tad confused, in your first post you said your group name was Colors - why's your event listener ColorOption?

Whichever groupname you choose to use, you need to say groupName.selectedData = "red" - or whatever value.
0
 

Author Comment

by:wattanabi2
ID: 20473313
That was a typo on my part. Your solution did the trick.

Thanks!

=====
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now