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

Scene works fine on own, doesn't work when used with whole movie

New Here ,
Aug 04, 2014 Aug 04, 2014

I am building a tutorial and at the end is a small quiz game. I have the quiz game in a separate scene from the tutorial. The quiz keeps track of right and wrong answers and displays the number of correct answers at the end. When I test this scene on it's own, everything works fine. When I test the whole movie, the total is just 0. When I trace the score variable, it just comes up as 0. Why is it that it only works in the individual scene and not the whole movie?

TOPICS
ActionScript
149
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 ,
Aug 04, 2014 Aug 04, 2014

When you test the whole thing in flash do you get any errors? My first guess is that the variable(s) or textfield(s) where you are storing the score information is out of scope. You are probably getting some sort of null reference error.

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
New Here ,
Aug 05, 2014 Aug 05, 2014

That is the strange thing. I do not get any errors when running it.

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 ,
Aug 05, 2014 Aug 05, 2014
LATEST

If there are no errors then I'm guessing that the variable that holds the score is getting reset to 0 in the main movie somewhere. Try using a trace to look at the value of that variable as the movie runs.

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