Hey yawl,

I have a question, I'm using FUSE to do tweens and I need an event to be
sent when it is done.

I'm using the following syntax:

import mx.utils.Delegate;
import com.mosesSupposes.fuse.*;

class com.blabla.PostView extends MovieClip  {
private var myID:Number;
private var mainPanel:String;

//ommited code more properties...

 public function PostView () {
       ZigoEngine.register(FuseItem, PennerEasing);
 }

//ommited code: this function is inside an 'init' panel funciton called at
runtime =>
 this.signPost.expandBT.onRelease = function() {
   var f:Fuse = new Fuse();
   f.label = "swoopyIntro";
   f.target = this._parent.zoomBox;
   f.push({x:"0", y:"0", start_scale:140, start_tint: 0xffffff,
start_alpha:100, scale:100,ease:"easeInOutCubic", seconds:0.01, tint:
0x2E2E2E, alpha:0});
   f.addEventListener('onComplete', this._parent._parent);
   f.start(true);
 }

 private function handleEvent(o:Object):Void {
       if (o.type=='onComplete') {
           trace ("panel action done");
           //myBroadcaster is another AS2 file dealing with dispatching
events to subscribers:
           myBroadcaster.dispatchEvent
("panelState",{myID:myID,mainPannel:mainPannel});
       }
 }
//ommited code, more stuff...

}

My {quick} questions are:

1. Am I doing this right? Do I have to send a local event [
f.addEventListener('onComplete', this._parent._parent);] before I can
broadcast an event between [all] classes? Ideally I'd like other AS2 classes
to hear the "f.addEventListener('onComplete', this._parent._parent);"
directly... [without hardcoding pointers to a specific class file]

2. Is there anyway to pass the 'handleEvent' function a parameter so that I
can broadcast it? Namely I want to broadcast not only that it was done, but
which function was the originator [in this case: "expandBT.onRelease" or a
string like "ExpandAnimationDone"] - can I get around that?

Thanks for your time,

Sebastian.
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to