Click to See Complete Forum and Search --> : radio btn onclick show image
djeet
07-11-2006, 01:53 AM
Hi,
This question is related to xml and flash. I have an xml file which has path to images that r in my 'images' folder. this xml file will be called by the flash movie.
What I want: there will be radio btns. in the flash movie, when the user clicks on a radio btn the specific image should be displayed.
suppose if the user clicks on radio btn 'blue' then '2.gif' will be displayed.
I hope my ques. is clear. Pls help with the actionscript I'll have to write.
raviganesh91221
07-11-2006, 02:09 AM
Just unzip the files in a folder and create a folder in the same folder and name it as "images" avoid quotes. Then place jpeg files in it named 01.jpg,02.jpg.....08.jpg
Divyakedia
07-11-2006, 02:30 AM
Hi Ravi, maybe djeet wants to use radio btns and u have provided the swf that starts on its own. Even I would want to have this ques solved :)
djeet
07-11-2006, 02:36 AM
Yes, I tried the zip that u gave. Thanks for that. But it didn't solve my problem. I know how to make what u have given. But, I want the image to come only when the radio btn is clicked.
raviganesh91221
07-13-2006, 02:16 AM
this will work. I have radio buttons in flash. and a xml file. U just create a folder called images in the same folder and have images like 01.jpg 02.jpg....06.jpg
Divyakedia
07-13-2006, 02:31 AM
wow, ravi good. I don't know about 'djeet' but i have a query. What if the no of images increases or decreases, can't we update the radio btns. acc to it. i mean creating radio btns and their label thru actionscript?
Otherwise, i think one will have to go inside the fla to customize.
raviganesh91221
07-13-2006, 02:35 AM
Yes probably we can do it. But I dont know how to duplicate a component dynamically. Instead we can create a MC like radiobutton abd we duplicate it accordingly
Divyakedia
07-13-2006, 02:39 AM
this is the problem. If we cannot dynamically change the no. of radio btns acc. to the no of images, then what is the use of xml.
raviganesh91221
07-13-2006, 02:40 AM
Dont be silly. WE can change the images no, whatever number we have created
Divyakedia
07-13-2006, 02:58 AM
arre, i mean to say-suppose we have only 3 images and u have created 6 radio btns. won't it look stupid. Similarly, if there r more than 6 imgs. from where will the 7th radio btn come?
raviganesh91221
07-13-2006, 08:24 AM
Its ok but his need was just to load a specific number of images ok.
Divyakedia
07-14-2006, 12:55 AM
congrats for your century :) And let us try to dynamically change the no of radio btns.
djeet
07-14-2006, 01:02 AM
Thanks for the reply. Maybe I'm not good at framing questions till yet. But, I would definitely want to match the no of radio btns with the no of images in the folder, otherwise the user will keep clicking the btns and no image will appear or I'll have to change the no of btns each time the no of images change.
Another thing, what if i want to replace the radio btns with check boxes, what will be different in ActionScript?
djeet
07-19-2006, 03:08 AM
i am waiting for a reply.
raviganesh91221
07-19-2006, 03:56 AM
I am exploring on ur question. didnt get a solution. I will reply U when I get it. Pls try some other resources also
djeet
07-19-2006, 04:14 AM
ok thanks. & also thanks for replying promptly.