Flash Variables and Multiple Movieclips AS2

September 12th, 2010

Flash variables hold information usually numbers, letters (string), or true/false data (boolean) . Recently I’ve been working on a project that uses many vars to pass, store, and retrieve information. I soon realized that the variables were only accessible with actionscript in the timeline they were created in, unless you give a path to the variable in the actionscript.

For example, if you were writing code inside a movieclip on your main timeline, and you wanted to access a variable inside another movieclip on the main timeline, you would write the code something like this:

_parent.mcInstanceName.variable or _root.mcInstanceName.variable

This can get fairly complex quickly when you are using loadMovie or loadMovieNum to place another swf inside a container MC. That’s why I find it very useful to use the trace command when testing a path to make sure that the variables are doing what you want.

Here’s an example of using trace to show a variable’s value:

trace(_root.mcInstanceName.variable);

I hope you found this information useful. Thanks for visiting my blog!

  • Share/Bookmark

Drive Insane Traffic to Your Website

March 1st, 2010

Using the power of Ping.fm I am able to post all over the internet simultaneously and drive insane traffic to whatever I want instantly. Pretty cool huh?

  • Share/Bookmark

Graphic Designer in Asheville

December 21st, 2009

As you may know I am a web developer based in Asheville. I am not only a web developer, but I am also an excellent graphic designer too. If you need a flyer, brochure, business card, poster, sign or whatever I am your guy. You can see some examples of my work in my graphic design portfolio.

I also handle flash animation and widget development. I create cool slide-shows, calculators, music/video players or even completely flash websites. You can see some flash examples in my flash portfolio.

imagesI also wanted to let you know that now through Christmas I’m running a web design special:

50% off all prices listed on the services page. That includes gift certificate purchased before Christmas as well. This is the best time to buy, before I get all booked up. I take care of projects in the order received.

  • Share/Bookmark

Webhead Service on Facebook

  • Shopping Cart


  • Latest Products


  • Newsletter

    Subscribe now, and you will receive an instant download of the ebook... "63 Killer Marketing Strategies" by Dan S. Kennedy:
    name:
    email:
  • Pages

  • Recent Posts

  • Archives

  • Meta

  • Tags