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

Вернуться   Форум Flasher.ru > Архив Flasher.ru > Flash > Action script 2.0

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

Регистрация: Oct 2002
Адрес: СПБ
Сообщений: 58
По умолчанию addEventListener

кнопка.addEventListener("click", func);

Как передать аргументы к функции func()???

Старый 28.11.2003, 18:23
Mage Lord вне форума Посмотреть профиль Отправить личное сообщение для Mage Lord Найти все сообщения от Mage Lord
  № 2  
Mage Lord
 
Аватар для Mage Lord

Регистрация: Aug 2001
Адрес: Александрия Невская
Сообщений: 70
Отправить сообщение для Mage Lord с помощью ICQ
RTFM

Event Objects
An event object is passed to a listener as a parameter. The event object is an ActionScript object that has properties that contain information about the event that occurred. You can use the event object inside the listener callback function to access the name of the event that was broadcast, or the instance name of the component that broadcast the event. For example, the following code uses the target property of the evtObj event object to access the label property of the myButton instance and send the value to the Output panel:

listener = new Object();
listener.click = function(evtObj){
trace("The " + evtObj.target.label + " button was clicked");
}
myButton.addEventListener("click", listener);

Some event object properties are defined in the W3C specification but aren't implemented in version 2 (v2) of the Macromedia Component Architecture. Every v2 event object has the properties listed in the table below. Some events have additional properties defined, and if so, the properties are listed in the event's entry.

Properties of the event object
Property
Description

type
A String indicating the name of the event.

target
A reference to the component instance broadcasting the event.



Вот через evtObj.target и бери все что хошь откуда хошь.
__________________
Avete, alieni, nos morituri vos sperminus

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

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

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


 


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


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