| View previous topic :: View next topic |
| Author |
Message |
dazz_club 250+ Club

Joined: 15 Jul 2005 Posts: 313 Location: Chester and Hull
|
Posted: Mon Mar 06, 2006 1:24 pm Post subject: a problem with levels |
|
|
Hi,
I have a question about the website I am currently working on and the one which is causing me the problem regarding levels.
[url]
http://www.thermochromicinks.com/New%20Folder/thermochromics_inks_test.html
[/url]
As you notice the links above, home, ink range, applications, etc, they all load on to level 2. If you visit the applications page and click on any of the links below, Reebok, Guiness, Meltitta. Once you have selected one, they will load into the white visible box onto level 3.
Now if you click one of the top links again, home, ink range, applications, etc, the file that has been loaded is still visible.
How do i unload these files (level 3) so the files on level 2 can bee seen again.
cheers |
|
| Back to top |
|
 |
|
|
Samuel Rounce 100+ Club

Joined: 30 Oct 2005 Posts: 116 Location: London, UK
|
Posted: Tue Mar 14, 2006 9:09 pm Post subject: Re: a problem with levels |
|
|
Hey there it's a pretty simple to load and unload movies and I remember I was kicking myself when I found out how to unloadmovies as it's such a simple process.
To unload a movie just use:
The only argument here is the level number. so for example as you're loading just the example animations onto level 3 you could just clear it everytime you click a button at the top so for example for the faq button you'd have:
| Code: |
faq_btn_mc.onRelease {
UnloadMovieNum(3);
LoadMovieNum(faq.swf, 2);}
|
Simple eh? |
|
| Back to top |
|
 |
dazz_club 250+ Club

Joined: 15 Jul 2005 Posts: 313 Location: Chester and Hull
|
Posted: Wed Mar 15, 2006 2:50 pm Post subject: Re: a problem with levels |
|
|
Hi Samuel Rounce,
Thanks for the quick reply, I thought no one would reply to this.
The first code you had given me i used it and pasted it in a layer rather than in the button itself.
i will use the second code you had given me as it makes more sense to put it in a button rather than a seperate layer in a swf file.
At the moment here is what action script is asigned to my buttons:
| Code: |
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "home";
container.loadMovie("home.swf");
} else if (_root.currMovie != "home") {
if (container._currentframe >= container.midframe) {
_root.currMovie = "home";
container.play();
}
}
}
|
would it be possible to integrate this code:
| Code: |
faq_btn_mc.onRelease {
UnloadMovieNum(3);
LoadMovieNum(faq.swf, 2);}
|
into the code above?
cheers |
|
| Back to top |
|
 |
Samuel Rounce 100+ Club

Joined: 30 Oct 2005 Posts: 116 Location: London, UK
|
Posted: Wed Mar 15, 2006 9:58 pm Post subject: Re: a problem with levels |
|
|
Check the code below that's got the command put in where it's needed in the code for the button.
| Code: |
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "home";
container.loadMovie("home.swf");
} else if (_root.currMovie != "home") {
UnloadMovieNum(3);
if (container._currentframe >= container.midframe) {
_root.currMovie = "home";
container.play();
}
}
}
|
|
|
| Back to top |
|
 |
dazz_club 250+ Club

Joined: 15 Jul 2005 Posts: 313 Location: Chester and Hull
|
Posted: Fri Mar 17, 2006 3:19 pm Post subject: unload code in button instead is alot better then my way |
|
|
Hi,
Thanks for creating that code for me, works a treat.
Cheers!! |
|
| Back to top |
|
 |
Samuel Rounce 100+ Club

Joined: 30 Oct 2005 Posts: 116 Location: London, UK
|
Posted: Fri Mar 17, 2006 9:36 pm Post subject: Re: a problem with levels |
|
|
| No Probs |
|
| Back to top |
|
 |
|