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 7609021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:04:15+00:00 2026-05-31T01:04:15+00:00

After reading a tutorial of Flash, I am still not sure what exactly is

  • 0

After reading a tutorial of Flash, I am still not sure what exactly is the program flow in general:

Specifically, I have a demo of a flash game (sort of super mario style). In it I have two types of weapon – a simple fire and big fireball. I reviewed the code in order to learn flash better [I am very new – since around monday this week].

I saw that the program has a variable that keeps track of the number of uses I have left in each weapon. I tried to review all the places this variable was used but I couldn’t find where it affects the drawing onto the screen.

I even tried removing the variable declaration and then testing it – so I may find all references to the variable — By the way any convinient way of finding all references to a variable/method/class [I am using ADOBE FLASH CS5.5]?
Also, I tried changing the variables starting value to “12” and I noticed that when I test the game, the weapon has 12 uses indeed.

So my problem:
1. It seems that this variable is somehow affecting the drawing. Yet, I don’t know how it does so since all the code I have found that uses this variable has nothing to do with drawing. It is all, logic, like

if(var <= 0){
    var--;
} else{
    return false;
}

Where is this influence coming from?

  1. Any way to get all references to a variable [like in eclipse ctrl+shift+g]?

Thank you very much.

  • 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-31T01:04:16+00:00Added an answer on May 31, 2026 at 1:04 am

    Flash can have code on a variety of different things.

    • External classes
    • Movie clips
    • Frames

    Depending on the tutorial they will put code on any and all of them and it makes it very hard to follow. In general it is always best to place code in external classes and only on frames when absolutely necessary. AS3, in fact, does not let you put code directly on movie clips to avoid just the problem you’re having.

    I’m going to assume you’re using AS2 because of your problem of not finding code alongside of the fact you said you deleted the declaration of the variable and everything still worked. (AS2 lets you get away with a lot)

    If you unlock any layers that are locked and select all, you might find almost invisible movies that appear as just dots. Lots of bad tutorials put code on invisible movies like that to run everything. Deselect everything, select just that movie clip and then hit [F9] to pull up the action window to see the code.

    The other option is that the code is just on a movieclip somewhere. Start clicking on them and looking in the action window to see if there is anything there.

    No matter what it sounds like you’re using a bad example. Search for AS3 tutorials as that is a more optimized version of actionscript and it prevents a lot of bad practices like what you’re seeing.

    An AS3 tutorial I just came accross


    [edited]

    To further answer your question, program flow happens with the flash VM first firing an onEnterFrame event which any movieclip can listen to. (In AS2 it would call onEnterFrame on every movieclip. This was abandoned in favor of the event so your class does not have to update on every frame) Once that has happened the VM then draws everything to screen. For a more complete overview I found this website

    Your problem sounds like everything is contained in external classes. Here’s an example

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

Sidebar

Related Questions

After reading Evan's and Nilsson's books I am still not sure how to manage
After some reading from this tutorial , I have the following partly working code:
I have gone through the following tutorial : http://www.javaworld.com/community/node/2915 And after reading the above
I have been developing a sample application after reading Rails 3 Tutorial book. In
I'm trying out ASP.NET MVC, but, after reading a huge tutorial, I'm slightly confused.
I'm reading Ruby on Rails tutorial. On chapter 9 after wrote all the code,
I seem not to grasp the concept of Events and such. After reading a
After reading the Head First Design Patterns book and using a number of other
After reading this question , I was reminded of when I was taught Java
After reading a bit more about how Gnutella and other P2P networks function, I

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.