0 Replies Latest reply on Mar 7, 2008 1:48 AM by lilalfyalien

    Creating a dynamic loaded template screen

    lilalfyalien
      Hi all,

      I'm having a little trouble with getting the architecture logic right on a program I'm making. I'm a bit of a beginner so I'm probably missing something fundamental.

      I have a scene which is a template screen. At the beginning of the scene, text is loaded in from an instance of a Screen class which I've created using a method getCurrentText(). Now I have another class ScreenIterator which holds these Screen classes in order. So when the scene is loaded I find a global variable screenNo which tells me where in the list my next screen to be displayed is in the list I take it out of the Iterator and on that object call the getCurrentText() method. Now this works fine except I can't implement a back and next button. How could I do this?

      The only way I've got it to work is to set the global variable screenNo +1 or -1, then go to another switcher scene which then takes the control back to the normal screen and then it works. Is this the only way to get it to work? Is there anyway I can get it to work using some kind of delegate? I don't quite know how, can someone help or explain why the approach I originally tried doesn't work?

      Thanks in advance!

      Lilalfyalien