Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Flash Radio Buttons - Select button based on previously defined parameter

Posted on 2007-12-05
4
Medium Priority
?
372 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 1000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
Suggested Courses

971 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