Welcome to Dream.In.Code
Getting Help is Easy!

Join 136,479 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,676 people online right now. Registration is fast and FREE... Join Now!




radio button image change if

 
Reply to this topicStart new topic

radio button image change if

mrloserskid
30 Jun, 2008 - 07:51 AM
Post #1

New D.I.C Head
*

Joined: 30 Jun, 2008
Posts: 25


My Contributions
hi i know how to swam images to each other. and import them all that stuff.
but i dont know how to make an if.

what im looking for is something like when button click. if radio button 1 is slected switch image to A0001.jpg
if radio button 2 is selected use A0002.jpg

only one radio button can be selected but dosent really matter

thanks for the help wink2.gif wink2.gif
heres my swaping code.

on (release) {

//load Graphic Behavior
this._parent.A2.loadMovie("A0002.jpg");
//End Behavior

}
p.s. A2 is the name of the movie clip witch is changed to A002.jpg

thanks
User is offlineProfile CardPM
+Quote Post

JBrace1990
RE: Radio Button Image Change If
30 Jun, 2008 - 08:39 PM
Post #2

D.I.C Regular
Group Icon

Joined: 9 Mar, 2008
Posts: 476



Thanked: 22 times
Dream Kudos: 350
My Contributions
QUOTE(mrloserskid @ 30 Jun, 2008 - 08:51 AM) *

hi i know how to swam images to each other. and import them all that stuff.
but i dont know how to make an if.

what im looking for is something like when button click. if radio button 1 is slected switch image to A0001.jpg
if radio button 2 is selected use A0002.jpg

only one radio button can be selected but dosent really matter

thanks for the help wink2.gif wink2.gif
heres my swaping code.

on (release) {
if(radiobutton1.selectedValue == "A0001.jpg")
{
this._parent.A2.loadMovie("A0001.jpg");
}
else
{

//load Graphic Behavior
this._parent.A2.loadMovie("A0002.jpg");
//End Behavior
}
}
p.s. A2 is the name of the movie clip witch is changed to A002.jpg

thanks



now, i'm not completely sure, but i know that's how you do it in Flex, and they're very similar... the only difference is probably just what you called the conditional in the if statement...
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 06:30PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month