A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: An Arrow button

  1. #1
    Junior Member
    Join Date
    Apr 2007
    Posts
    2

    Unhappy An Arrow button

    Hi guys, I've been struggling with this problem for a week now, it's for a project and I already talked to my professor, and he did not know how to fix it, Flash is not something everyone around my area know how to use, so It's kinda hard to ask for help even to faculty members..

    anyway, I created a flash portfolio with some of my artwork, the buttons are many categories.. ANIMATION, COMICS, LOGOS, PHOTOGRAPHY and CONTACT INFORMATION, I used the Behaviors function in flash, that seemed to work alright if I want to link the ANIMATION button with an animation and so on, but if I keep clicking on the ANIMATION button it only shows 2 animation artworks.

    For that reason a left and right arrow buttons are required so the client can browse and see the 20 pieces I have in there, I have all my Images in one layer, a total of 20, I want an arrow to go to the previous frames and another one to go to the next frames so it can show all of them, and here is where my problem begins.

    Behaviors won't work with this since it only shows 2 artwork, so in actionscript what would be the code I have to enter in order to accomplish this? this is what I have now on Actionscript:

    nextFrame();


    and I get this error message when I Test Movie:

    **Error** Scene=Scene 1, layer=Buttons, frame=1:Line 1: Statement must appear within on handler
    nextFrame();

    Total ActionScript Errors: 1 Reported Errors: 1


    I even got flash mx 2004 to try the same thing since other people did not experience the problem I have, is the code I'm entering too short? that's what I feel, what else would I have to throw in there? any help is REALLY appreciated since no one has been able to help me with this.

    Thank You in Advance.

  2. #2
    Senior Member
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    194
    what youve done is put nextFrame() on the button by its self, you need to wrap it in an on handler

    on(press)
    {
    nextFrame();
    }

  3. #3
    Junior Member
    Join Date
    Apr 2007
    Posts
    2
    Can't believe my professor couldn't figure that out, I feel like a n00b but this worked like I wanted to thanks a lot

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