Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 5th, 2004, 05:48 PM
khag7 khag7 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 14 khag7 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
combobox change handler

I want to have a combobox that works like a javascript onclick dropdown box. When it is clicked, i want to fscommand to javascript i have written in my HTML page. can anyone find any mistakes in this code or help me? this code is in frame one, the same frame as my combo box. the combobox is named "music_combobox" and the change handler is "changehandler"

Code:
function changehandler(whichbox) {
	if (whichbox == "music_combobox") {
	var select = music_combobox.getSelectedItem().data;
	if (select != 0) {
		fscommand(playit, select);
	} 
	else if (select == 0) {
		fscommand(stopit);
	}
	}
}

Reply With Quote
  #2  
Old February 6th, 2004, 05:02 PM
blatant's Avatar
blatant blatant is offline
World Domination
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: San Diego
Posts: 126 blatant User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 47 m 17 sec
Reputation Power: 6
Send a message via AIM to blatant
How did you tell the comboBox to trigger the function?

Reply With Quote
  #3  
Old February 6th, 2004, 05:29 PM
khag7 khag7 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 14 khag7 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Re: combobox change handler

Quote:
Originally posted by khag7
the combobox is named "music_combobox" and the change handler is "changehandler"


shouldnt that mean when a combo box selection is made or changed or anything else, the function is triggerd? i'm trying to do this without a button, but if i must use a button i will...but i dont know what code to use for that either because that didnt work either.

Reply With Quote
  #4  
Old February 6th, 2004, 05:29 PM
khag7 khag7 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 14 khag7 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Re: combobox change handler

Quote:
Originally posted by khag7
the combobox is named "music_combobox" and the change handler is "changehandler"


shouldnt that mean when a combo box selection is made or changed or anything else, the function is triggerd? i'm trying to do this without a button, but if i must use a button i will...but i dont know what code to use for that either because that didnt work either.

Reply With Quote
  #5  
Old February 6th, 2004, 06:36 PM
blatant's Avatar
blatant blatant is offline
World Domination
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: San Diego
Posts: 126 blatant User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 47 m 17 sec
Reputation Power: 6
Send a message via AIM to blatant
right. I was asking what method you used to do this, since there are multiple ways. Here's how to do it using a listener:

Code:
music_combobox.addlistener("change", changehandler);

so when the music_combobox gets changed, the changehandler function gets called.

Reply With Quote
  #6  
Old February 6th, 2004, 09:05 PM
khag7 khag7 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 14 khag7 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
oooh...im not experienced at this. i've never heard of a listener...i'll try that then post here again when i come across another problem (which i probably will)

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > combobox change handler


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT