views:

5

answers:

0

Hello, being my first time to post a question on a site this kind, I'll try my best to do it OK.


I'm Using ActionScript 2.0 attempting to check the existance of a certain file, with this code (I found it browsing the net):

var myPelican:Number = 0;
var myVars = new LoadVars();

myVars.load("portfolio_img/("+pCounter+").jpg");
myVars.onLoad = function(success){
    if (success){
        trace("I found the file!");
        _global.myPelican = 15;
    } else {
        trace("I didn't find the file");
    }
}

Problem is I need myVars.onLoad function to modify var myPelican declared above. Code example doesn't work, but I think you get the picture.

Any idea on how to modify a var declared on _level0 from inside a function? Is it possible at all?

Thanks in advance...