Solved

Flash Radio Buttons - Select button based on previously defined parameter

Posted on 2007-12-05
4
370 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

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…
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 what frame rate is, how to control it and what effect it has on the video.
Suggested Courses

617 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