Mailing List
Home
Forum Home
Flash Pro
Subjects
Subject: RE: Firework Effect
Web Service Results
Flash Interface with 10mb xml file
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash MX 2004 Sucks
Reading and displaying RSS feeds in Flash MX
Flash and QuickTime VR
Textfield prototype question
XML to Object help
Order of events per frame
MX2004 Dataset itemClassName
memory management removeMovieClip /
Event Dispatcher between classes
Help: MX 2004 How to script a print button to print the entire sli
ScrollPane component doesn 't auto update
setInterval bug identified and fixed
setInterval bug identified and fixed
Listener Object 's best practice
 
how to get an eventname

how to get an eventname

2004-03-16       - By Christophe Herreman

 Back
Reply:     1     2     3     4     5     6     7  

Hello people,

is there a way to get the name of an event that is being executed?

I'm building this treeview, in which I want to broadcast events when the
user presses, release, ... the icon of a node.

this works:
icon.onPress = function(){
  this._parent.ref.broadcastMessage("onIconPress", node);
 }

but I want to do it dynamicly, like:
var arr_events = ["onPress", "onRelease"];

 for(var i=0; i<arr_events.length; i++){
  icon[arr_events[i]] = function(){
   this._parent.ref.broadcastMessage("onIcon" + EVENT, node);
  }
 }

I can't get the EVENT out of it
any suggestions?

thx in advance,
Christophe

=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Supported by Fig Leaf Software
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Be sure to check the archives and the wiki:
http://chattyfig.figleaf.com/
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:107072
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe send a blank e-mail to:
Normal Mode: flashcoders-unsubscribe@(protected)
Digest Mode: flashcoders-digest-unsubscrive@(protected)