Форум Flasher.ru
Ближайшие курсы в Школе RealTime
Список интенсивных курсов: [см.]  
  
Специальные предложения: [см.]  
  
 
Блоги Правила Справка Пользователи Календарь Сообщения за день
 

Вернуться   Форум Flasher.ru > Flash > ActionScript 1.0/2.0

Версия для печати  Отправить по электронной почте    « Предыдущая тема | Следующая тема »  
Опции темы Опции просмотра
 
Создать новую тему Ответ
Старый 26.07.2006, 11:02
Charly84 вне форума Посмотреть профиль Отправить личное сообщение для Charly84 Посетить домашнюю страницу Charly84 Найти все сообщения от Charly84
  № 1  
Ответить с цитированием
Charly84
 
Аватар для Charly84

Регистрация: Aug 2004
Адрес: Украина, Киев, Белая Церковь
Сообщений: 204
Отправить сообщение для Charly84 с помощью ICQ
Attention Свойства стандартного выпадающего меню

Здравствуйте

Вставил во флеш из базы компонентов выпадающее меню. Там в свойствах создал несколько пунктов. Как теперь отследить, какой из пунктов был выбран?

Заранее спасибо!
__________________
Идущий осилит дорогу!

Старый 26.07.2006, 11:44
-=GRAF=- вне форума Посмотреть профиль Отправить личное сообщение для -=GRAF=- Найти все сообщения от -=GRAF=-
  № 2  
Ответить с цитированием
-=GRAF=-
[1.10, 1.11 01.02.2006]
 
Аватар для -=GRAF=-

Регистрация: Feb 2006
Сообщений: 119
Отправить сообщение для -=GRAF=- с помощью ICQ
По понятнее можешь?
__________________
Человеческая глупость - бесконечна...

Старый 26.07.2006, 11:51
etc вне форума Посмотреть профиль Найти все сообщения от etc
  № 3  
Ответить с цитированием
etc
Et cetera
 
Аватар для etc

Регистрация: Sep 2002
Сообщений: 30,787
Из хелпа:
Цитата:
ComboBox.change
Availability
Flash Player 6 (6.0.79.0).

Edition
Flash MX 2004.

Usage
var listenerObject:Object = new Object();
listenerObject.change = function(eventObject:Object) {
// Your code here.
};
comboBoxInstance.addEventListener("change", listenerObject)


Description
Event; broadcast to all registered listeners when the ComboBox.selectedIndex or ComboBox.selectedItem property changes as a result of user interaction.

Using a dispatcher/listener event model, a component instance (comboBoxInstance) dispatches an event (in this case, change) and the event is handled by a function, also called a handler, on a listener object (listenerObject) that you create. You define a method with the same name as the event on the listener object; the method is called when the event is triggered. When the event is triggered, it automatically passes an event object (eventObject) to the listener object method. Each event object has properties that contain information about the event. You can use these properties to write code that handles the event. Finally, you call addEventListener() (see EventDispatcher.addEventListener()) on the component instance that broadcasts the event to register the listener with the instance. When the instance dispatches the event, the listener is called.

For more information, see EventDispatcher class.

Example
With a ComboBox component instance my_cb on the Stage, the following example sends the instance name of the component that generated the change event to the Output panel:

// Add Item to List.
my_cb.addItem({data:1, label:"First Item"});
my_cb.addItem({data:2, label:"Second Item"});

// Create Listener Object.
var cbListener:Object = new Object();

// Assign function to Listener Object.
cbListener.change = function(event_obj:Object) {
trace("Value changed to: "+event_obj.target.selectedItem.label);
};

// Add Listener.
my_cb.addEventListener("change", cbListener);

Создать новую тему Ответ Часовой пояс GMT +4, время: 01:18.
Быстрый переход
  « Предыдущая тема | Следующая тема »  

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.


 


Часовой пояс GMT +4, время: 01:18.


Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.