Flash Games
 FAQ   Search   Memberlist   Usergroups   Register  Profile   Log in to check your private messages   Log in 


a problem with levels



 

Post new topic   Reply to topic  
   DEVPPL Forum Index -> Flash Forum
View previous topic :: View next topic  
Author Message
dazz_club
250+ Club


Joined: 15 Jul 2005
Posts: 313
Location: Chester and Hull

PostPosted: Mon Mar 06, 2006 1:24 pm    Post subject: a problem with levels Reply with quote

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
View user's profile Send private message Send e-mail
Samuel Rounce
100+ Club


Joined: 30 Oct 2005
Posts: 116
Location: London, UK

PostPosted: Tue Mar 14, 2006 9:09 pm    Post subject: Re: a problem with levels Reply with quote

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:
Code:
UnloadMovienum();

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
View user's profile Send private message AIM Address MSN Messenger
dazz_club
250+ Club


Joined: 15 Jul 2005
Posts: 313
Location: Chester and Hull

PostPosted: Wed Mar 15, 2006 2:50 pm    Post subject: Re: a problem with levels Reply with quote

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
View user's profile Send private message Send e-mail
Samuel Rounce
100+ Club


Joined: 30 Oct 2005
Posts: 116
Location: London, UK

PostPosted: Wed Mar 15, 2006 9:58 pm    Post subject: Re: a problem with levels Reply with quote

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
View user's profile Send private message AIM Address MSN Messenger
dazz_club
250+ Club


Joined: 15 Jul 2005
Posts: 313
Location: Chester and Hull

PostPosted: Fri Mar 17, 2006 3:19 pm    Post subject: unload code in button instead is alot better then my way Reply with quote

Hi,

Thanks for creating that code for me, works a treat.

Cheers!!
Back to top
View user's profile Send private message Send e-mail
Samuel Rounce
100+ Club


Joined: 30 Oct 2005
Posts: 116
Location: London, UK

PostPosted: Fri Mar 17, 2006 9:36 pm    Post subject: Re: a problem with levels Reply with quote

No Probs
Back to top
View user's profile Send private message AIM Address MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    DEVPPL Forum Index -> Flash Forum All times are GMT + 1 Hour
Page 1 of 1

 
 
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums.
Click here to Register

If you are a current member here on DEVPPL, please login below:

User: Pass:
Log me on automatically each visit:

 


Powered by phpBB © 2001, 2005 phpBB Group - Modified by DEVPPL

Flash Games - Sitemap