I was wondering the difference between these two dispatchEvent method...
//1.
eventObj:YouTubeSearchEvent = new YouTubeSearchEvent(YouTubeSearchEvent.CHANGE_VIDEO_READY);
eventObj.videoId = theOneVideoId;
dispatchEvent(event);
//2
dispatchEvent(new YouTubeSearchEvent(YouTubeSearchEvent.CHANGE_VIDEO_READY, videoId));
According my custom event, I need to have two arguments...but was wondering if the first method is different than the second one...Thanks for the reply...
My custom event:
package com.search.events
{
import flash.events.Event;
public class YouTubeSearchEvent extends Event
{
public static const FEED_VIDEO_READY:String="feed_video_ready";
public static const CHANGE_VIDEO_READY:String="change_video_ready";
public var videoResult:*;
public function YouTubeSearchEvent(type:String, videoResult:*)
{
super(type);
this.videoResult=videoResult;
}
}
}
The question is from my another post http://stackoverflow.com/questions/3438789/as3-pass-custom-event-data-question