Week 23 – ActionScript – Learning Activity 5.2

Complicated stuff…. Fun though, nevertheless 🙂

“Please design and code buttons to use in the scenes you created in the previous activity.
Create two buttons – one for each scene.

Integrate the two buttons to the previous learning activity, and use Action Script 3.0 to activate the buttons.
The function of the buttons will have to make it possible to navigate between the two scenes (using the buttons).”

So I sort of did the same mistake as I did when the mandatory hand-in 06 was due.
All this coding can wreck your head easily – and we’re not even doing super complicated stuff.

Today has therefore been a great challenge. Not because the activity itself was difficult, but because I made a mistake.
The mistake was mixing up a capital letter, and writing a lowercase one instead in the code.

Correct scene 1 code:

stop();

frem_btn.addEventListener(MouseEvent.CLICK, neste);function neste(event:MouseEvent):void {

gotoAndStop(1, “Scene 2”);

}

Incorrect scene 1 code:

stop();

frem_btn.addEventListener(MouseEvent.CLICK, neste);function neste(event:MouseEvent):void {

gotoAndStop(1, “scene 2“);

}

My mistake was to write “scene 2” with a lowercase ‘S’. I also did this in the scene 2 code.
The direct result of this was that the button action did not work. I was not able to click my way into scene two.
I’ve been going crazy all day, checking the code a hundred times. I’ve been browsing the internet, and reading the full curriculum at least ten times.
Luckily, someone else have made this mistake before me, so I found the answer to my silly problem in our forum for Noroff students.

As mentioned in my previous entry, I’ll add all my Adobe Flash work to my student website eventually.
I haven’t gotten my head around how to combine Flash and Dreamweaver as of yet…

One thing at a time.

I’ve once again added my work to DeviantArt. Check it out right here:

Typography and Image – Action Script 3.0

Well, another school day over, another important lesson learned.
Be thorough and precise when writing your code, Marit.

Rock’n’Roll

-Marit 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s