⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 loadqueue.as

📁 使用 flash AS3开发的超级玛丽游戏源代码,
💻 AS
字号:
import com.gamepackage.events.*;import com.gamepackage.util.*;class com.gamepackage.util.LoadQueue{	private var queue: Array;		public var addListener: Function;	public var removeListener: Function;	private var broadcastMessage: Function;		function LoadQueue()	{		queue = new Array;				AsBroadcaster.initialize( this );	}		function push( loadable: Loadable, url: String, info: Object ): Void	{		var lc: LoadClip = new LoadClip( loadable, url, info );				lc.addListener( this );				queue.push( lc );	}		//-- FORWARDING LOADCLIP EVENTS TO LISTENERS --//	//	function onLoadClipRequest(): Void	{		var args: Array = [ 'onLoadClipRequest' ].concat( arguments );		broadcastMessage.apply( this , args );	}		function onLoadClipStart(): Void	{		var args: Array = [ 'onLoadClipStart' ].concat( arguments );		broadcastMessage.apply( this , args );	}		function onLoadClipProcess(): Void	{		var args: Array = [ 'onLoadClipProcess' ].concat( arguments );		broadcastMessage.apply( this , args );	}		function onLoadClipComplete(): Void	{		var args: Array = [ 'onLoadClipComplete' ].concat( arguments );		broadcastMessage.apply( this , args );	}		function onLoadClipInit(): Void	{		var args: Array = [ 'onLoadClipInit' ].concat( arguments );		broadcastMessage.apply( this , args );				getNext();	}		function onLoadClipFailed(): Void	{		var args: Array = [ 'onLoadClipFailed' ].concat( arguments );		broadcastMessage.apply( this , args );	}		//	// ------------------------------------------- //	//		function load(): Void	{		broadcastMessage( 'onLoadQueueStart' );		getNext();	}		function getNext(): Void	{		var lc: LoadClip = LoadClip( queue.shift() );		if ( lc )		{			lc.load();		}		else		{			broadcastMessage( 'onLoadQueueComplete' );		}	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -