-
Hi. Is there a way to have an "example image".For instance, i want to have a list of people in a listbox and when a person is selected their picture appears, and when i select a different person, the picture changes to that person's picture. any ideas?
-
Make the image a MC and goto different frames based on the data value of each selected item.
function changeImage() {
myMC.gotoAndPlay(myCombo.getValue());
}
myCombo.addItem("Goto Frame 2", "2");
myCombo.addItem("Goto Frame 10", "10");
myCombo.addItem("Goto Frame 5", "5");
myCombo.addItem("Goto Frame 32", "32");
myCombo.addItem("Goto Frame 66", "66");
changeImage is the Change Handler for the listBox. Set the instance of the comboBox to myCombo. myMC is the instance of the MC you are changing the frames of.
Not test but should work. (doesn't matter if its a combo or list)
[Edited by NerdInside on 08-11-2002 at 02:40 AM]
-
http://nerdinside.d2g.com/list-MC.fla
That is a working example IF that is what you are asking for. Once again, slow server
-
-
-
no, your first assumption was correct. But I have since encountered a problem. the listbox i applied the text to and everything is already involved in other functions and has a separate changeHandler. when i try to modify the code to fit into the existing function, it doesnt work. It may have something to do w/ the fact that I am putting the code w/in an if statement that is inside the function(which is the listbox's changeHandler).
-
-
Maybe it is a level problem. Maybe _root.myCombo.getValue());
-
Senior Member
Are you saying that you have items in your listbox and when you click on it you want many different things activated like load a pic, text in several textboxes, filling a button with a url?
-
that is exactly what im tryin to do. Is it possible?
-
This is my code. I have a listbox, a combobox, a dynamic textbox and would like to incorporate the image "thingy" mentioned above.:
//Code to get the link
function getLink() {
link = mylistBox.getSelectedItem().data
if(link == "tweak"){
getURL("http://tweaktown.com","_blank")}}
//Code to display the link description
function displayDescription() {
link = mylistBox.getSelectedItem().data
if (link == "tweak") {
textbox2.text = "This description is being used as a test and is supposed to describe TweakTown.";}}
//Code to link the listbox and the combobox
onChange = function () {
if (mycomboBox.getValue() == "null") {
mylistBox.removeAll();
mylistBox.addItem("Please Selected One");
}
// The if statement for the mods value
if (mycomboBox.getValue() == "mods") {
mylistBox.removeAll();
mylistBox.addItem("TweakTown", new Object("tweak"));
}
// The if statement for the parts value
if (mycomboBox.getValue() == "parts") {
mylistBox.removeAll();
mylistBox.addItem("TigerDirect", new Object("tiger"));
}
// The if statement for the year value, showing the data variable is not needed
if (mycomboBox.getValue() == "flash") {
mylistBox.removeAll();
mylistBox.addItem("Flashkit", new Object("fkit"));
}
}
//etc.
-
Moderator
Download this:
http://www.flashkit.com/movies/Compo...7605/index.php
If you have any problems email me:
flashed@tampabay.rr.com
-
Senior Member
It is possible but you have to use a trick. Have a look here. I can explain later.
http://www.stormpages.com/cancerinfo.../list_xml.html
-
i can already get those components to work, all i have to get working now is the image preview type thing.
-
Moderator
-
Thank you. I think that that will help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|