FlxShapeLightning: Invalid field access : __handle

20 views
Skip to first unread message

Egar Almeida

unread,
Jul 26, 2015, 7:09:03 AM7/26/15
to HaxeFlixel
Hi everyone,

I tried to use FlxShapeLightning like this:

 var lightningStyle:LightningStyle = { thickness: 4, color: FlxColor.AQUAMARINE, displacement: 2, detail: 1, halo_colors: [FlxColor.WHITE, FlxColor.RED] }
 
var lightning:FlxShapeLightning = new FlxShapeLightning(_player.x, _player.y, FlxPoint.get(0, 0), FlxPoint.get(FlxG.mouse.x, FlxG.mouse.y), lightningStyle);
 add
(lightning);

But I get the following error in runtime:

Invalid field access : __handle
Called from openfl._legacy.display.Tilesheet::new line 42
Called from flixel.system.layer.TileSheetExt::new line 22
Called from flixel.system.layer.TileSheetExt::$init line 11
Called from flixel.system.layer.TileSheetData::new line 47
Called from flixel.system.layer.TileSheetData::$init line 19
Called from flixel.util.loaders.CachedGraphics::get_tilesheet line 159
Called from flixel.FlxCamera::render line 401
Called from flixel.FlxGame::draw line 808
Called from flixel.FlxGame::onEnterFrame line 506
Called from openfl._legacy.events.EventDispatcher::dispatchEvent line 98
Called from openfl._legacy.display.DisplayObject::__dispatchEvent line 182
Called from openfl._legacy.display.DisplayObject::__broadcast line 161
Called from openfl._legacy.display.DisplayObjectContainer::__broadcast line 280
Called from openfl._legacy.display.Stage::__render line 1103
Called from openfl._legacy.display.Stage::__checkRender line 351
Called from openfl._legacy.display.Stage::__pollTimers line 1084
Called from openfl._legacy.display.Stage::__doProcessStageEvent line 430

Am I doing something wrong? I'm not really sure how to use this class.

Thanks!
Reply all
Reply to author
Forward
0 new messages