skins' tiles actions and listenner

Post here your questions about the OpenSpace 2.x or notify bugs and suggestions.

Moderators: Lapo, Bax

radiateur
Posts: 62
Joined: 15 Aug 2011, 08:14

skins' tiles actions and listenner

Postby radiateur » 11 Apr 2012, 07:52

Hi,

First excuse my poor english (i'll try to be as clear as possible). I'm quite a noob in as3, but i've been abble to build a complete game engine with openspace (thanks to this board and the docs).

So for my game projetc i choosed to put NPC with dialogues in skin'objects.
As it's easy to fire events on a skin object whith mouse events, i'd like to find a way to catch the "name" of the clicked skin/tile and then call basic "gotoAndPlay" labels of this skin during dialogues (so not at mouse events), with listenners in my main class. (the goal is to add acting to my npc, like "cry" "smile" etc with dialogues).

I looked after this kind of features in openspace doc, and i found some infos about getting names, but not about the way to call a simple action like this : "myskin.gotoAndPlay("label");"

Any kind of help is welcome :)
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: skins' tiles actions and listenner

Postby Bax » 11 Apr 2012, 09:43

You can assign namers to skins in the OpenSpace Editor. You can then use the Tile.getSkinByName() method to retrieve it and call your gotoAndPlay method.
Paolo Bax
The SmartFoxServer Team
radiateur
Posts: 62
Joined: 15 Aug 2011, 08:14

Re: skins' tiles actions and listenner

Postby radiateur » 11 Apr 2012, 10:42

THANKS again Bax, so a method was implemented... openspace is a great tool ! Thank you !

Return to “OpenSpace v2 discussions and help”

Who is online

Users browsing this forum: No registered users and 33 guests