TwelvestoneFlash

_root = _level10


Sign in

  • Waiting for Godot ( 730 k posts )
    Just conversation.
  • Thunder Dome ( 23 k posts )
    Photoshop Tennis and Collabs.
  • Photography ( 5.1 k posts )
    For all you shutterbugs, sh...
  • Flash ( 18 k posts )
    ActionScripting to tweens, ...
  • Front End ( 5.9 k posts )
    general front end design an...
  • Back End ( 9.7 k posts )
    serverside scripting, progr...
  • Projects and Theory ( 12 k posts )
    This forum is for discussio...
  • FAQ ( 269 posts )
    All those nagging questions...
  • Design ( 17 k posts )
    graphics & all aspects of g...
  • Purgatory ( 3.6 k posts )
    12stone Jail, feel free to ...
tomandjerry
 
2008-10-10

Hey everyone Im no Flash expert but Im wondering how come to access variables on the _root level I have to go _level10. And if so what level would I use to access _global?

Im thinking it has to do with the movie getting loaded by another movie? How would I go about finding out that it is levelX i just got lucky with findng level10 this time.

The movie is not mine, Im just doing getvariables on it.

Thanks! k

Hideaway
 
2008-10-10

To access variable on the _root, it's simply _root.someVar as long as the variable is defined in the scope of _root.

If you're loading a sub-movie and that movie uses it's own _root variables, then you need to set the submovie's _lockroot = true...

I generally stay away from using _root and AS3 no likey...

tomandjerry
 
2008-10-10

Is there anyway to figure out the X in levelX? And what if lockroot isn't true? then does it go by level?

And how do you access the global vars please k

Thanks for the reply!

Hideaway
 
2008-10-10

Any _global var must be set AND accessed using _global.varName

//on _root timeline _global.myVar = "Hello World";

// In some movieclip loaded or placed anywhere where _root is the above _root timline trace(_global.myVar);

Try to not use levels! When you load a movie into a movieclip, that you access the newly loaded movieclip using the target's properties...

// using _globals for whatever reason _global.myMovie = _root.someMovieClip.loadMovie("path.swf", root.someMovieClip.getNextHighestDepth());

// Anywhere in the timeline/child timelines _global.myMovie._y = 100; trace(_global.myMovie); // _level0.someMovieClip;

tomandjerry
 
2008-10-11

When i do getvariable with javascript it doesn't seem to work :( I tried: GetVariable('_global.myVar') and it doesn't work :( any other way? the root in this movie gets accessed by _level10 :(

I have no control about the levels :( Its not my movie its another file. Im trying to setup a cool interface on the page with firefox extension

Sorry, you must be a member to post to a conversation. Either log in or sign up to get involved.
TwelvestoneFlash

_root = _level10