コード例 #1
0
        public virtual void load(AsURLRequest request, AsSoundLoaderContext context)
        {
            mRequest = request;
            mContext = context;

            String url = request.getUrl();

            if (url.StartsWith("http"))
            {
                throw new NotImplementedException("Http loading not implemented");
            }

            mSound = BcResFactory.GetInstance().LoadSound(url);
            AsDebug.assert(mSound != null, url);

            Debug.WriteLine("Sound loaded: " + url);
            dispatchEvent(new AsEvent(AsEvent.COMPLETE));
        }
コード例 #2
0
        public virtual void load(AsURLRequest request, AsLoaderContext context)
        {
            mRequest = request;
            String url = request.getUrl();

            if (url.StartsWith("http"))
            {
                throw new NotImplementedException("Http loading not implemented");
            }

            BcTexture2D image = BcResFactory.GetInstance().LoadImage(url);

            AsDebug.assert(image != null, url);

            AsBitmapData bitmapData = new AsBitmapData(image);

            mContent = new AsBitmap(bitmapData);

            Debug.WriteLine("Image loaded: " + url);
            dispatchEvent(new AsEvent(AsEvent.COMPLETE));
        }
コード例 #3
0
 public virtual void load(AsURLRequest request)
 {
     load(request, null);
 }
コード例 #4
0
 public AsSound(AsURLRequest request)
     : this(null, null)
 {
 }
コード例 #5
0
 public AsSound(AsURLRequest request, AsSoundLoaderContext context)
 {
     mRequest = request;
     mContext = context;
 }