all groups > flash actionscript > march 2007 >
You're in the

flash actionscript

group:

Creating a changing level to load too


Creating a changing level to load too BushyMark
3/18/2007 11:51:10 PM
flash actionscript: Hey everyone,

I am creating a navigation system that is comprised of multiple swf's, and I
am trying to create a transition. My goal is to have the currently loaded swf
play an outro while the new swf plays it's intro. My idea was to do this by
rotating the levels that each of the swf's load into with a variable. As you
will see from my code . . . I am still fresh to AS, I keep getting an error. I
think I have the right idea, but I am missing something in the syntax.

currClip is a variable that will change when the corresponding button is
pressed.

I am getting the syntax error on the _level + "currLevel" + .play;

**Error** Scene=Scene 1, layer=a, frame=1:Line 13: Operator '+' must be
followed by an operande
_level + "currLevel" + .play;

Total ActionScript Errors: 1 Reported Errors: 1

Am I on the right track?



currLevel = 4;
function changeLevel() {
if (currLevel == 4) {
currLevel = 3;
} else {
currLevel = 4;
}
}

function loadLevel() {
_level + "currLevel" + .play;
changeLevel();
_level0.myMCL.loadClip("currClip", "currLevel");
}
Re: Creating a changing level to load to kglad
3/19/2007 4:05:12 AM
you are:



AddThis Social Bookmark Button