A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Sounds easy, but maybe it is not?

  1. #1
    Junior Member
    Join Date
    Aug 2012

    Sounds easy, but maybe it is not?

    I was wondering how you would go about writing script for a simple page turner app.

    I will explain better.

    If you are on a website and you are reading something when you get to the bottom of the page you might have an option that says go back a page or go to next page.

    how would you translate that to flash mx, so that you can link your pages the same way you would in html.

    so your flash pages in effect might be page one, page two, page three, page four etc, and when you get to the end of that page you can click to go to next page, or back a page or whatever the case. Is this possible? as I want to add in some kid cartoon type features and flash will do this better then html.

    hope I haven't confused everyone

    cheers Siege

  2. #2
    Senior Member Steven FN's Avatar
    Join Date
    Mar 2010
    CA, USA
    Pretty easy just use good old "nextFrame" or "gotoAndStop".

    Say you have a movieclip called "Pages" and in each key frame is a different page, and on the first frame you have a "stop();" action, so that "Pages" won't keep playing through each frame in a loop.

    Then you have a "nextBtn" and "prevBtn" inside the "Pages" movieclip on its own layer. So two layers total of "pages" and "buttons". Make sure to extend the frames of "buttons" to the end, it will have one key frame and then just right-click the timeline and insert frame. Then just add something like the following after the STOP action:

    nextBtn.onRelease = function(){
    _this._parent.nextFrame(); // use _this._parent.prevFrame() for prevBtn

    Hope that makes sense.

  3. #3
    Junior Member
    Join Date
    Aug 2012

    thanks again, seems simple enough I will give it a crack tomorrow. Just creating some cause and effect style programs for special needs kids 3-4 yrs old, so it doesn't need to be pretty they won't mind


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center