Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4109552
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T21:48:45+00:00 2026-05-20T21:48:45+00:00

I have some main time line variables I need to access and manipulate from

  • 0

I have some main time line variables I need to access and manipulate from inside a movieclip timeline. However, when I try to subtract from a global variable, one that’s declared on the main timeline on frame 1 outside of a function/whatever, it says:
Symbol ‘lemon_cup’, Layer ‘actions’, Frame 1, Line 54 1120: Access of undefined property lemons1.

So how can I “import” this variable and make it accessible and useful inside of a moveiclip’s timeline?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T21:48:46+00:00Added an answer on May 20, 2026 at 9:48 pm

    First, do you have an ActionScript class defined as your document class? You should go ahead and do that and make sure your variable is defined there. Make sure it’s public (or have a public accessor function). That way the variable value exists outside of the particular part of the timeline where it’s defined (which means its existence can come and go).

    Then, anywhere in any timeline script where you want to access the variable, get a reference to “root” which will return your linked document object. You can then access the variable’s value through that object:

    var myVarCopy:Number = MyDocumentClass(root).myVar;
    

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some code static void Main(string[] args) { int j = 0; for
I have some BitmapFrames created on a thread other than the main UI thread;
I have some code here to call minizip(), a boilerplate dirty renamed main() of
I have the following two links in my main menu, and I have some
I have to execute some code in the context of the main thread. I
I have a main function in javascript that is function a() { some code
I have a one main Workflow which calls several activities asynchronously. Some of the
The scope of this is that we have three main projects. Some of the
In my main script, I am doing some archive manipulation. Once I have completed
I have some files that are uuencoded, and I need to decode them, using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.