Building a Basic Flash Site Part 2- Making Navigation Buttons work in Actionscript 3/Flash CS4

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
4,571
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Nov 4, 2009

This is the midterm material for my Flash Class. Here, we add actionscript to make the buttons work and complete the navigation. In part 3, we'll start adding content to the content layer. http://www.davebricker.com

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (inntoon)

  • Shadowfox84, glad this was helpful. Also see youtube.com/watch?v=gR9b4xcyPE­8 for more on event listeners and buttons

  • get syntax error on function goStart(evt:Event):void {

    can´t find the error?

  • Can't help you without seeing the code. Are you missing a bracket? If you use only the one line above, you'll get an error. If you use,

    function goStart(evt:Event):void {

    }

    you won't have a function that does anything, but you won't get an error.

    Otherwise, try posting a whole block of code. Also, specifics about the error message would be helpful.

  • when I test with only the "home" and "bounce" code, it works great. When I add in the final script for the "fly" button, it loops.

  • you're probably using a gotoAndPlay('fly"); instead of a gotoAndStop("fly") - a common mistake

  • I have just tried this and when I tested the movie it flicked through the letters instead of linking the letters to the buttons. I've checked the actions script and can't see any mistakes, any suggestions?

  • you need a stop() action on frame 1 to keep the timeline from running like a movie. You want it to stop on frame1 until the button tells it gotoAndStop("another_frame");

see all

All Comments (15)

Sign In or Sign Up now to post a comment!
  • This is great thankyou so much

  • a day late for my final, and after watching several other tutorials, yours is the only one I really understood. I FINALLY UNDERSTAND THIS. THANK YOU!!!

  • @riottgirl

    i had the same problem

    turned out that in the end i typed AddEventListener instead of addEventListener

    20 minutes wasted on one capital letter lol duh

  • @inntoon

    found the problem, simple but so annoying...

    first function spelled funtion in my code and then failed to name my buttons.. thought I did, but nope.. :-) thanx. It works fine! Great tut.

  • @inntoon : nope. I'm using a gotoAndStop

    function goflyer(e:Event):void {

    gotoAndStop("flyer")

    }

    btn.Flyer.addEventListener(Mou­seEvent.CLICK,goflyer);

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more