Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

Re : choose your own adventure game with video transition

$
0
0
Glad to hear!

I did make it as a string in my classPage but it is still not working.

This is how my Class page looks now.

class Page{
  import processing.video.*;
  Movie myMovie;
  String bodyText; //string used for displaying the text
  PImage backImg;
  int[] options;
  int[] nameMovie;
  
Page( String nameMovie_, String nameImage){
     //  bodyText = theString;
     nameMovie = nameMovie_;
     backImg = loadImage(nameImage);
     myMovie = new Movie (this, nameMovie);
     myMovie.play(); 
  }
  
              
  void setBodyText(String theString){// sets a string for the bodytext object
   bodyText = theString;
  }
  
  void setOptions(int[] theOptions){
    options = new int[theOptions.length];
    arrayCopy(theOptions,options);
  }
  
  void nameMovie(int[] myMovie){
    Movie = new int[myMovie.length];
    arrayCopy(myMovie,Movie);

  }
  

  
  void display(){ //sets display option for text to be centered and have a buffer zone of 20 pixels.
   image(backImg,0,0);
    textAlign(CENTER);
    fill(#03FF00);
    text(bodyText,20,20,width-20,height-20);
  }
  
  void chooseOption(int theNum, int name){
    if(theNum < options.length){
      currentPage = options[theNum];
    }
  }
}

can show my setup page if you'd like as well

Viewing all articles
Browse latest Browse all 1768

Trending Articles