how to intract with a Movie Clip in open space

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

Moderators: Lapo, Bax

sankarganesh86
Posts: 104
Joined: 06 Jan 2010, 09:50
Location: chennai
Contact:

how to intract with a Movie Clip in open space

Postby sankarganesh86 » 27 Feb 2010, 04:01

I am developing a small world using open space i used open space editor
to develop a map and get the map in flash
but i want to intract a movieclip in map
forex:click Event,Mouse Move Event how to intract with movieclip in open space
User avatar
Bax
Site Admin
Posts: 4380
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 01 Mar 2010, 08:50

Check the provided Ranch example: the house doors are interactive.
Paolo Bax
The SmartFoxServer Team
ffourcad
Posts: 130
Joined: 25 Feb 2010, 10:26

Postby ffourcad » 01 Mar 2010, 15:04

Hello,

I've added click triggers to some tiles of my map, and added an eventlistener in my main class (just like in the example), but the trigger doesn't seem to work when the skin is set on "walkable = false".
User avatar
Bax
Site Admin
Posts: 4380
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 02 Mar 2010, 08:17

ffourcad wrote:I've added click triggers to some tiles of my map, and added an eventlistener in my main class (just like in the example), but the trigger doesn't seem to work when the skin is set on "walkable = false".

Here we are talking of OpenSpace 2. You should add the click trigger to the skin instance, not to the tile instance.
Paolo Bax
The SmartFoxServer Team
ffourcad
Posts: 130
Joined: 25 Feb 2010, 10:26

Postby ffourcad » 02 Mar 2010, 09:04

Thank you for the answer.
I was talking about OpenSpace 2 too, and make a skin clickable doesn't fit my needs, since I don't want all the tile with this skin to be clickable. Is this going to remain like this, or is it an issue with the current beta ?
User avatar
Bax
Site Admin
Posts: 4380
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 02 Mar 2010, 09:21

This behavior won't change. You have to create two versions of the same tile: one containing the skin with triggers assigned, one containing the same skin but without triggers assigned.
Paolo Bax
The SmartFoxServer Team
ffourcad
Posts: 130
Joined: 25 Feb 2010, 10:26

Postby ffourcad » 02 Mar 2010, 09:42

ok.
Is there a way to get the Tile instance containing the skin/object we just clicked ?
User avatar
Bax
Site Admin
Posts: 4380
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 02 Mar 2010, 11:32

skinInstance.parent.parent
Paolo Bax
The SmartFoxServer Team
sankarganesh86
Posts: 104
Joined: 06 Jan 2010, 09:50
Location: chennai
Contact:

Postby sankarganesh86 » 05 Mar 2010, 04:27

I want to develop a game like FaceBook (Farmville) in Open Space it is possible to create game

Because in farmville we can able to update a map at run time but in openspace we want to create a map before the game starts.

please tell to me it is possible to create a game like facebook (farmville)
by using open Space
User avatar
Bax
Site Admin
Posts: 4380
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 05 Mar 2010, 17:10

Sorry, but we are not too familiar with Farmville, so we are not able to tell you if all the features of that kind of game is covered by OpenSpace. Anyway I suppose not, as OpenSpace is targeted at multiplayer avatar chats, while I think Farmville is more a single player game with social interactions.
Paolo Bax
The SmartFoxServer Team
ffourcad
Posts: 130
Joined: 25 Feb 2010, 10:26

Postby ffourcad » 25 Mar 2010, 17:14

I know I already asked questions about it, but I'm not sure why it's impossible to have the Tile click event available when the tile is walkable.
Actually I'd like to make something appear (like a target) on the tile where the user clicked, to show where the avatar is aiming. Isn't it possible at all ?
User avatar
Bax
Site Admin
Posts: 4380
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 25 Mar 2010, 17:21

Yes, it is. Check the end of the paragraph dedicated to Skins in the OpenSpace Editor manual (page 6).
Paolo Bax
The SmartFoxServer Team
ffourcad
Posts: 130
Joined: 25 Feb 2010, 10:26

Postby ffourcad » 26 Mar 2010, 09:10

All right, I understand that I must use onParentTileSelected, but since I wanted to do it on empty tile, it means the I must create an invisible (alpha = 0) skin, and add the onParentTileSelected methos in it. is it right ? is there nothing we could do with tile directly ?
User avatar
Bax
Site Admin
Posts: 4380
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 26 Mar 2010, 09:25

ffourcad wrote:All right, I understand that I must use onParentTileSelected, but since I wanted to do it on empty tile, it means the I must create an invisible (alpha = 0) skin, and add the onParentTileSelected methos in it. is it right ? is there nothing we could do with tile directly ?

Yes, exactly. There's no other way.
Paolo Bax
The SmartFoxServer Team
ffourcad
Posts: 130
Joined: 25 Feb 2010, 10:26

Postby ffourcad » 26 Mar 2010, 10:29

I created a skin, and i decided that it was more efficient to put the event on Skin Click rather than tile click (because the skin is bigger than the tile), but when the tile is walkable, i can't catch the click event on the skin. Is that the standard behavior, or is it a bug ?

Return to “OpenSpace v1 discussions and help”

Who is online

Users browsing this forum: No registered users and 1 guest