Jump to content


[COMPONENT UPDATE] Revised button with NextScene / Previous Scene even


18 replies to this topic

#16 Seranum

    New Member

  • New Members
  • Pip
  • 8 posts

Posted 23 September 2009 - 03:40 PM

Great, thank you very much. This is the answer, which I was looking for.

Once again thank you !!!

#17 maximus350zx

    Advanced Member

  • Members
  • PipPipPip
  • 58 posts
  • Gender:Male

Posted 21 April 2010 - 04:42 AM

Jon

Thank you so much for the work you put into the wordspheregotoscene.swi. I'm running SwishMax3 V3 Build 2009.11.30. From within swish, if I click on the play button and hit the square button, it works, but I get a debug window and the code is:

Square : Events:Menu_wordsphere,Square
Triangle : Events:Menu_wordsphere,Triangle

I can't figure out whats causing this - any ideas?


Edited by maximus350zx, 21 April 2010 - 05:49 AM.


#18 Jon Herron

    Advanced Member

  • staff Moderator
  • PipPipPip
  • 1234 posts
  • Gender:Male

Posted 21 April 2010 - 08:26 AM

Hi,

Have a look in the events function. It looks like there may be a trace statement left in there.
You can comment out or delete that line.

The messages can be ignored and will cause no harm.

Jon
For News, tips and tutorials checkout the blog at http://blog.swishzone.com
You can also follow us on Twitter: http://twitter.com/SWiSHzoneDOTcom

#19 sccarter

    New Member

  • New Members
  • Pip
  • 1 posts

Posted 14 February 2012 - 01:20 PM

View PostJon Herron, on 23 September 2009 - 07:55 AM, said:

Here is a similar example using buttons.
Note that the buttons are named Button_1 .. Button_4
and they all call the same events function "Events"

Scene_1 has the following events function:
function Events(n,v) {
	trace("Events:" add n add "," add v);
	
	switch(n) {
		case "Button_1":gotoSceneAndPlay("Scene_2", 1); break;
		case "Button_2":gotoSceneAndPlay("Scene_3", 1); break;
		case "Button_3":gotoSceneAndPlay("Scene_4", 1); break;
		case "Button_4":gotoSceneAndPlay("Scene_5", 1); break;
	}
}

Jon


Thank you very much for posting this. I spent an hour trying to figure out how to define a particular scene within a component button. After viewing your post and adding the function event in the script within the scene, I can now get the button to go to a specific scene.

This is such a great forum, especially for beginners.

Regards,

Scott





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users