user3300378 user3300378 - 1 year ago 234
ActionScript Question

Where can I see the Contents of

My company wants me add something to a .fla file that someone else made, and I have never learned anything about flash since highschool. I'm getting to know the stuff but here is one thing I don't know how to handle.

btnNext.onRelease = function(){
test = true;
new Tween(_root.inform, "_x", Strong.easeInOut, _root.inform._x, Stage.width*-1, 20, false);
var sound:Tween = new Tween(_root.jKey, "_x", Strong.easeInOut, _root.jKey._x, 40, 20, false);
sound.onMotionFinished = function(){
test = false;

In the code there is a lot of like
I searched about _root and They all say it's the way to access
. but I don't know where to find what comes after _root. I checked the library and there was no such file like jKey or infoB.

I'm using ADOBE FLASH 6 and this action script I think is not 3 but 1 or 2.

Answer Source

They are instances of MovieClips which have been attached to the root timeline and your code is referencing them by their instance names. They are added to the stage either:

  1. manually, by dragging an item from the library and dropping it on the stage (in which case you should be able to see them on the stage before you compile) or
  2. dynamically in the code, using the attachMovie method to create an instance of an item from the library (see documentation).

If they've been added to the stage manually you can inspect the instance name in the properties panel which should appear when you click the element on stage. If they've been added using the attachMovie method, the instance name is the second parameter of the method used to attach it.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download