Skip to main content
Inspiring
April 24, 2006
Answered

Global array - doesnt work, then does

  • April 24, 2006
  • 4 replies
  • 355 views
I have a global array on a movieclip that passes info to a function in the first frame of its slide. When you mouse over the MC the info for the array comes back as undefined, but if you mouse over a second time the function gets the correct info. I'm guessing that it must be order of events or something like that, but I really have no clue. What's the deal here?
This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer Andy Williams
Well, I figured it out. It was a newb mistake, but I'm a newb so that makes sense.

In the MC I
1. defined a variable
2. called the function
3. defined the global array

it needs to be
1. define the variable
2. define global array
3 call function

hopefully I can learn from this mistake.

4 replies

Andy WilliamsAuthorCorrect answer
Inspiring
April 24, 2006
Well, I figured it out. It was a newb mistake, but I'm a newb so that makes sense.

In the MC I
1. defined a variable
2. called the function
3. defined the global array

it needs to be
1. define the variable
2. define global array
3 call function

hopefully I can learn from this mistake.
Participating Frequently
April 24, 2006
that is why you need to paste some codes.
we can't help you if we can't see the codes.
hence, the error on line 47 you're getting.
Participating Frequently
April 24, 2006
there's an error in frame 1 line 47.

paste some codes.
Inspiring
April 24, 2006
I'm sorry Shyaway, I'm not sure what you are talking about. I've not posted any code or file concerning this problem.