Thanks!
Btw, AS 3.0 looks like AS 2.0 FIXED...
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ian Thomas
Sent: domingo, 13 de novembro de 2005 16:25
To: Flashcoders mailing list
Subject: Re: [Flashcoders] dispatching events from a class => HELP
You need to use the Delegate in your addEventListener line - because you're
passing clickTab to a completely different object, which will later call
back to clickTab, but doesn't have the correct context. Passing
this.clickTab isn't enough - passing Delegate.create(this,clickTab) should
be enough.
Why delegate if the method is inside the same Class?
thanks
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ian Thomas
Sent: domingo, 13 de novembro de 2005 15:46
To: Flashcoders mailing list
Subject: Re: [Flashcoders] dispatching events from a class
coders mailing list"
Sent: Sunday, November 13, 2005 12:33 PM
Subject: Re: [Flashcoders] dispatching events from a class
Thanks Jester, I know, it was a discussion about using or not the
"prototype" keyword, and if actionscript will support it in future
versions. But like you say, i
You need to use a Delegate. As this is a question which comes up about one a
week on this mailing list (not your, fault, I know!) I'm afraid I'm going to
direct you to the Flashcoders Wiki page about the problem rather than answer
you in full here...
http://www.osflash.org/flashcoders/as2
Hope th
Hi, I'm also having problems with Events. Could someone give me a little
help on this issue?
The EventListener is firing fine, but its associated method CAN NOT call
another Class method. Why?
Here is the Main Class: (Here is the Problem)
import com.ultrafactor.LblButton;
class com.ultrafactor.T
;
Will be more common.
- Original Message -
From: "Javier Tello" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list"
Sent: Sunday, November 13, 2005 10:25 AM
Subject: Re: [Flashcoders] dispatching events from a class
Yes ok Muzak, but for example, it's the way
Yes!!
Thanks a lot Martin, in the way you explain it, works. I didnĀ“t notice
it before because in real coding perhaps doesn't have such issue. But
it's something to remember.
_
that still wont work because you are dispatching the event before you
bind the function as the handl
ot;, this);
Will be more common.
- Original Message -
From: "Javier Tello" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list"
Sent: Sunday, November 13, 2005 10:25 AM
Subject: Re: [Flashcoders] dispatching events from a class
Yes ok Muzak, but for example, it
that still wont work because you are dispatching the event before you
bind the function as the handler.
what are you trying to achieve (apart from getting the event to fire), i
know this is just an example, but it seems a bit strange.
anyway, you cant call init in the constructor to dispatch
Yes ok Muzak, but for example, it's the way the Tween class were
implemented. It is like an onEnterFrame build in event, just to get
less code lines in the main movie.
I do not remember who, but someone discuss this issue, relating how to
implement the EventDispatcher class, and explaining to
whats the purpose of the eventListener inside the constructor? init
is being implicitly called within the class... just dispatch the
event, and set up a listener in your FLA
edolecki
On Nov 13, 2005, at 9:37 AM, Javier Tello wrote:
Still doesn't work. If you look at the code the class fi
Still doesn't work. If you look at the code the class fired the event
before deleting itself. Anyway I simplify it without the die() method:
//
import mx.events.EventDispatcher;
//
//
class EventTry {
//
//members;
//event functions;
private var dispatchEvent:Funct
g List"
Sent: Sunday, November 13, 2005 2:33 PM
Subject: [Flashcoders] dispatching events from a class
> Hello, I'm having troubles implementing the EventDispatcher class with flash8.
>
> I do the same I use to do before, but now the class doesn't fired the event.
> Here is
Hi Javier,
This is because you've got things happening in the wrong order:
- You create your EventTry() object, which calls init()
- Init fires the event, but onEvent is still undefined
- Init then calls die()
- Die() deletes the EventTry object
- You then set onEvent to your function - after every
Correction to the post. The import statement should be;
import EventTry;
Hello, I'm having troubles implementing the EventDispatcher class with
flash8.
I do the same I use to do before, but now the class doesn't fired the
event. Here is a sample class:
___
import mx.events.EventDispatche
Hello, I'm having troubles implementing the EventDispatcher class with
flash8.
I do the same I use to do before, but now the class doesn't fired the
event. Here is a sample class:
___
import mx.events.EventDispatcher;
//
class EventTry {
//event functions;
private va
17 matches
Mail list logo