Friday, November 7, 2008

Fixing the Problems

I found that the problems in my design were due to the fact that I didn't have all my photo movie clips on one timeline. Because I had them each separated on their own timeline, i couldn't code my pages to flip in and out of different stages. Therefore I had to alter all my photo pages so that they were all on the same timeline. I did this by:
  • Opening up the original Flash file (ie. photos1)
  • Went into the second keyframe
  • Double clicked on the image and copied all the frames in that timeline (layers: button, image and actions)
  • Made three new layers Scene 1 (the main timeline) called button, image and actions (in the same order that they were in in their own timeline. These layers should be above the other ones currently there, except for the actions layer)
  • Pasted the frames at frame 2 on the timeline
  • Went to the second keyframe where the image originally was and deleted it
  • Went to frame 1 on the main timeline and copied the image I was working with.
  • Went to frame 2 where the new timeline was and pasted in place (Ctrl Shift V) the image into the beginning of the image layer. Deleted the other image
  • Altered the tween by going to the last frame in th timeline and adjusting the position of the image in it's final state
  • Clicked on the button and adjusted the coded to read:

    on (rollOver, dragOver) {
    _root.canflip=true; // flipping active
    }
    on(rollOver, dragOver){
    _root.canflip=false; // flipping passive
    }
    on(rollOut, dragOut, releaseOutside){
    _root.canflip=true; // flipping active
    }
    on(release){
    _root.canflip=true; // flipping active
    gotoAndStop(1); // go to page
    }

  • Went to frame 1 on the timeline, clicked on the button for the same image and changed the code to:

    on (rollOver, dragOver) {
    _root.canflip=true; // flipping active
    }
    on(rollOver, dragOver){
    _root.canflip=false; // flipping passive
    }
    on(rollOut, dragOut, releaseOutside){
    _root.canflip=true; // flipping active
    }
    on(release){
    _root.canflip=true; // flipping active
    gotoAndPlay(2); // go to page
    }

  • Continued to do this for the other images, making sure that all the layers correspond. Also for the last section of the second code here, I had to change the number in the brackets to the frame on the timline where each mini timeline started (ie. 30, 59, 114, etc)

After I completed this and exported each Flash file out as a .swf file with a page number as the title, when the book was formed, the photos finally worked!