Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Programming actionscript with xml question 1

Status
Not open for further replies.

polyglot

Programmer
Nov 28, 2007
11
0
0
Hello - I have a question... I am new to Flash and REALLY new to actionscript. I kind of have a problem that is way over my head (I am a foreign language teacher and not a programmer). I am creating a game that I want other teachers to be able to customize with their own photos by creating an xml file defining the photos to be imported into the fla file. I know that this is possible, but I have no idea how to set up the actionscript or the xml file to do this. The photos will be imported into a movie clip called "victims". The end user will click on one of the photos in the movie clip (the movie clip is set up as a scrolling clip from which users will click on one image). The image chosen by the user will appear in another movie clip called "head". I also want the name of the image to appear in a dynamic text field. So for example, say I want to import pictures of each of my family members - my husband Rob, my daughter Becky, and my daughter Natalie - into the movie clip. I will then select from the scrolling movie clip one of their pictures - say, my husband Rob. His picture then appears in another movie clip named "head", and at the same time the name "Rob" appears in the dynamic text field next to the "head" movie clip. This would mean that the xml file would have to be set up so that each image is automatically associated with the name of the person in it. Can anyone create mock-up files (both the ".fla" file and the ".xml" file) that would allow me to do this? I would appreciate it very very much!

Hopeful,
Monica D.
 
Hey Oldnewbie-

Thanks for the link to the tutorial on adding thumbnails to a photo gallery. I am finding it very helpful. I now have a different issue, however. I would like to make part of the images to be used in the fla file transparent, but doing so requires me to convert the images either to png or gif format. When I changed the format of the jpg images and also changed the file names in the xml file accordingly, the fla file no longer works - I don't see any images at all. Is there a way to alter the actionscript so that I can use png or gif images in the fla file? I hope so!!!

Thanks!

Monica D.
 
Hello Again, Oldnewbie-

Please disregard the question I had about how to use transparent images with the actionscript you showed me in the xml tutorial... I figured out that to get the script to work with images in formats other than jpg, I have to target Flash 8 in my publish settings. Thanks for your help in pointing me to the tutorial!

Monica D :eek:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top