Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Actionscript 3.0 Classroom in a Book tutorial code doesn't work

Guest
May 26, 2013 May 26, 2013

The following code is taken from Actionscript 3.0 Classroom in a Book, chapter 5.  It only produces a flickering empty image on the stage.  Can anyone see why?  The supposed error messages don't seem to point to any errors.

chapter 5 disfunctional script.jpg

TOPICS
ActionScript
840
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , May 28, 2013 May 28, 2013

It looks like you used a 1 where a lower case L is intended (as in ldr - short for loader)

Translate
Guru ,
May 26, 2013 May 26, 2013

for starters: functions can not start with numbers.

rename all your functions and report back.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 27, 2013 May 27, 2013

Those numbers aren't in the malfunctioning Actions frame.  I only added them to the text file copied here so that I could better track the error messages to lines of script.  Thanks for your prompt reply.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
May 28, 2013 May 28, 2013

I don`t refer to the Line numbers you put in there, but to the fundtion names.

A function/var cannot have a leading number.

so all the functions like

1dr1 are invalid

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 28, 2013 May 28, 2013

You solved it.  Thanks greatly for taking the time.  Please see my reply to Ned for complete explanation.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 28, 2013 May 28, 2013

It looks like you used a 1 where a lower case L is intended (as in ldr - short for loader)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 28, 2013 May 28, 2013
LATEST

You have an eagle eye, and I greatly appreciate it.  I was reading the code off of a 10 inch Kindle, and the "l's look like "1"s.  I would have torn my hair out over this; like forever.  I'm very greatful.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines