Hi,
forgive me if I'm missing something, but I don't remember if you can interact with a skin that is placed on a not walkable tile.
It should be possible, but I don't remember how, can you help me?
Still problems with tile interaction logic
I want to share with you the class I use to make a skin not interactive.
The skin, that I don't want blocking my mouse click, is exported with the following class.
it works nice and smooth.
The skin, that I don't want blocking my mouse click, is exported with the following class.
Code: Select all
package
{
import flash.display.Sprite;
import flash.events.Event;
/**
* ...
* @author DefaultUser (Tools -> Custom Arguments...)
*/
public class OsSkinDisabled extends Sprite
{
public function OsSkinDisabled()
{
}
public function setCustomParams(params:Array):void
{
addEventListener(Event.ADDED, initSkin, false, 0, true);
}
private function initSkin(evt:Event):void
{
removeEventListener(Event.ADDED, initSkin);
parent.parent.mouseChildren = false;
mouseEnabled = false;
buttonMode = true;
parent.parent.mouseEnabled = false;
}
}
}