Bug Issue: loadImageFromURL : Invalid Cast


Pages: 1

mdotedot

  • Subscriber - Stencyl Studio
  • *
May 01, 2018, 12:35:53 pm
Stencyl 9866
Macintosh / HTML5 publication

load image from URL block

Invalid Cast Error

Code: Script.hx
Function: loadFromImageURL

Proposed Solution:
Code: [Select]
/*

                var handler = function(event:Event,loader:Loader):Void
                {
                        var bitmapData = cast(cast(event.currentTarget, Loader).content, Bitmap).bitmapData;
                        onComplete(bitmapData);
                }
*/

                var loader:Loader = new Loader();
                        loader.contentLoaderInfo.addEventListener(Event.COMPLETE, function handler(event:Event){
                        var bitmapData = cast(loader.content,Bitmap).bitmapData;
                        onComplete(bitmapData);

        });


rob1221

  • Master Stencyler
  • *
May 03, 2018, 07:40:02 am
Fixed in b9868.
  • Status changed from New to Resolved
  • Issue Assigned from (none) to rob1221


Pages: 1

Details

  • Reported
    May 01, 2018, 12:35:53 pm
  • Updated
    May 03, 2018, 07:40:02 am

  • View Status
    Public
  • Type
    Bug
  • Status
    Resolved
  • Priority
    Normal
  • Version
    3.5.0 beta 1
  • Fixed in
    (none)
  • Assigned to
    rob1221
  • Category
    Engine

Tags