Copy link to clipboard
Copied
hi,
my game is built using AS3, No time line code.
I have an image in the stage (frame 1) which acts as the Background
However I cant seem to figure out how to make it, so when it becomes level 2 the background image changes to a different image?
I know its a conditional statement, but I don't know how to switch the images if you understand what I'm saying.
would be something like
if (CurrentLevel ==2)
{
//code
}
1 Correct answer
Are you allowed to use Movieclip symbols? If so, then you can create a Movieclip (placed in frame 1) that has the different images on different frames and control which frame that Movieclip is on with your code.
Otherwise you will need to look into dealing with the Loader class for your images, where you load them dynamically.
Copy link to clipboard
Copied
How do you intend to change the images... go to a new frame.... or load a new image?
Copy link to clipboard
Copied
I cant use new frames because my game is built with AS3 only, I only use the frame1 of the time line, here this is what i mean
Copy link to clipboard
Copied
Are you allowed to use Movieclip symbols? If so, then you can create a Movieclip (placed in frame 1) that has the different images on different frames and control which frame that Movieclip is on with your code.
Otherwise you will need to look into dealing with the Loader class for your images, where you load them dynamically.

