Wednesday, 5 May 2010

Actionscript Woes [Edit]

Edit:

Hey!  Great news!  This is solved!  You have to declare a variable --> _currentframe .

So for all the places where you can access my inventory, set the variable on the frame itself

myFrame1 = _currentframe

So when you click button to go to inventory and the 'Return' button, plug in

gotoAndPlay(myFrame1)

Now I can go to the inventory menu and return to where I previously was and not warp to the beginning of the map yay!

Cheers to Graham for that.

---------

Wow, looks like I won't be able to do chapter II afterall.  I can't seem to understand actionscript still so the programing prototypes are going so, so slowly.

The currently problem I'm having is to make a button similar to that of the 'back' button on a browser.  Meaning, once you click on it, you'll go to a specific place and clicking 'back' will take you to the frame you were on previously.

This link shows the same problem I'm having and I've had a look at the sample file posted but I still can't seem to crack it.

'Previous' button.

Will have to make multiple copies for it to work, since I don't think I can figure it out in time...d'oh.

2 comments:

  1. aww thats a real shame. So no chapter 2 at all?? I really wish I cou;d suggest something more helpful but unfortunetly I have no idea. Though I thought you got the whole going back thing down? I mean you always end up going back when you click on an item in the prototype you made (so after examining the door it went back to the regular game screen), can't you use something like that?

    ReplyDelete
  2. Ah, my tutor and I have worked it out so I've managed to get everything working now! But because of the mechanics of it, i need to change the game design on the inventory to get it working in way that wouldn't be annoying when playing it.

    For the door thing that's because everything you click 'back' there is only one path to go hence why it always go back there. If you were on another area of the map, it would be different.

    ReplyDelete