Hi
Phaelax so the general Overview of the APP will be as follows (It's pretty basic I think):
(I)Home page with a hexagon image I've designed, at each point there would be a button.
(ii) Clicking on one of the buttons on the hexagon will bring up a New Menu which will each have about another three buttons.
(iii) Each of these buttons will open and play a video. Each Screen will have a return to previous page or a main menu button.
I've made an attempt using different code snippets I've looked and giving it a go myself. I was trying to set it up to move from a first menu to a second one but when I click on the button it does not trigger the opening of the next menu so there's some error in my code (I'm very rusty at programming so I'm not surprised haha)
Thanks
Markus , cool suggestion I will definitely check that out what type of commands would you use to do that, is it setting X and Y values and basically setting up a range so if anyone clicks within that range the button is triggered?
Mobius that would be amazing I will email you about it, thanks
EDIT: Included Code
// set a virtual resolution
SetVirtualResolution ( 320, 480 )
// display a background
CreateSprite ( 13, LoadImage ( "Charisma.bmp" ) )
SetSpriteVisible (13, 0)
SetSpriteSize (13, 320, 480 ) : Sync() : Sync() : Sleep(500)
//CreateSprite (100, LoadImage ( "title.jpg" ) )
//SetSpriteSize (100, 320, 480 ) : Sync() : Sync() : Sleep(500)
//SetSpriteVisible (100, 0)
// main loop
global ButtonClear = 0
global gameState = 1
// 1 = Splash Screen
// 2 = Main Menu
// 3 = Get Present
do
Menus()
Sync()
loop
Function deleteButtons() //get rid of sprites/buttons not on the current menu
for i = 1 to 12
if GetSpriteExists(i) = 1 then DeleteSprite(i)
//delete any sprites that Exist
next i
ButtonClear = 1
//Set to 1 so it clears the old buttons and then STOPS
EndFunction
//What happens when Mouse Clicks a Sprite
Function ButtonClicked(ID)
Buttonhit = 0
if GetSpriteHit (GetPointerX ( ), GetPointerY ( ) ) = 1 then Buttonhit = 1
//Works Out which Sprite is hit
if Buttonhit = 1 then ButtonClear = 0
//if a Sprite is hit then call the function to Clear all the all button/sprites away
Print (Buttonhit)
EndFunction Buttonhit
Function Menus()
if ButtonClear = 0 then deleteButtons()
Select gameState
Case 1: // Splash Screen
//SetSpriteVisible ( 100 , 1 )
gameState = 2; ButtonClear = 0
EndCase
Case 2: // My Main Menu
//Get Present Button
// DeleteSprite ( 100 ) //Delete Splash Screen
Sync () //Refresh the Screen
SetSpriteVisible (13, 1) //Make Main Menu Background Sprite Visible
if GetSpriteExists(1) = 0 then CreateSprite ( 1, LoadImage ( "Button1.png" ) )
if ButtonClicked(1) = 1 then gameState = 3
//Create Button 1
SetSpritePosition( 1, 100,100)
//Pursue Purpose Button
`if GetSpriteExists(2) = 0 then CreateSprite ( 2, LoadImage ( "button2.png" ) ) //Create Button 2
`SetSpritePosition( 2 , 200 , 100 )
//Commit to Action
``if GetSpriteExists(3) = 0 then CreateSprite ( 3, LoadImage ( "button3.png" ) ) //Create Button 3
``SetSpritePosition (3,300,100)
//Move to the Next Menu
``if SpriteClicked = 2 then gameState = 4
``if SpriteClicked = 3 then gameState = 5
EndCase
Case 3: // Menu 2
if GetSpriteExists(2) = 0 then CreateSprite ( 2, LoadImage ( "Button4.png" ) )
//First of Buttons for Next Menu
SetSpritePosition( 2 , 300 , 100 )
//need to add code for what to happen when this button clicked later
EndCase
EndSelect
EndFunction