EragonZZZZ
Member
|
Yep. Congrats for figuring that out yourself, by the way. I was hoping you'd realize that, because it makes my next little 'bite' easier to chew on. When you reference things in flash, you often times if not always must use what is known as an absolute or relative path. That tells flash exactly where to look for an object. What you discovered is you must put _root.player for the game to work. That is because your player, I assume, is on the stage. _root.player tells Flash to look on the stage for something known as "Player". A more complex example of this would be, say, the AdventureQuest player (sword, shield, armor, head)- To reference the PLAYER: _root.player (if the player is on the stage, which we'll assume he/she is) To reference the SWORD: _root.player.sword To reference the SHIELD: _root.player.shield To reference the HEAD:. _root.player.head The easiest way to figure out paths is to remember to name every symbol that you put into your movie so you can remember what it is. Then, in your scripting window, click on the button at the top that looks like a cross-hair. There are two options at the bottom. Select absolute (easier, and I find it works better) and locate your symbol (it gives you a window to do this. You'll see). Then just press okay and the correct path to go to your symbol is placed in the script window.
|