Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with loadmovie and levels

Status
Not open for further replies.

HumanBean

Technical User
Oct 1, 2004
13
AR
I have a main movie with a "home" scene, that has a number of buttons. This button have an animation, thay fade in diferent shades of gray. When you are over them the others turn light gray and the button selected turns red.

I tried different ways of doing this, and the only way to do it is using loadmovie for that events. So, the way it's animated can't be changed. The actionscript looks like this:

on (rollOver) {
loadMovieNum("/inicial_fondo.swf", 1);
loadMovieNum("/inicial_quienes_somos_1.swf", 2);
}
on (rollOut) {
unloadMovieNum(1);
unloadMovieNum(2);
}
on (release) {
unloadMovieNum(1);
unloadMovieNum(2);
gotoAndPlay("I_quienes_somos");
}

the "inicial_fondo.swf" is the background with the other buttons in gray, and the "inicial_quienes_somos_1.swf" would be the red mouseover of that button.

the problem is, this "events" are loading whenever you're over the button, and I need them to load before, so it doesn´t take time to appear.

I added an empty movieclip in the intro that has this actions, hoping it would work:

load_movie.loadMovie("/inicial_quienes_somos_1.swf", 0);
load_movie.loadMovie("/inicial_quienes_somos_2.swf", 0);
load_movie.loadMovie("/inicial_nuestra_manera_1.swf", 0);
load_movie.loadMovie("/inicial_nuestra_manera_2.swf", 0);
load_movie.loadMovie("/inicial_nuestra_manera_2.swf", 0);
load_movie.loadMovie("/inicial_construimos_marcas_1.swf", 0);
load_movie.loadMovie("/inicial_construimos_marcas_2.swf", 0);
load_movie.loadMovie("/inicial_areas_actuacion_1.swf", 0);
load_movie.loadMovie("/inicial_areas_actuacion_2.swf", 0);
load_movie.loadMovie("/inicial_nuestros_clientes_1.swf", 0);
load_movie.loadMovie("/inicial_nuestros_clientes_2.swf", 0);
load_movie.loadMovie("/inicial_soluciones_24hs_1.swf", 0);
load_movie.loadMovie("/inicial_soluciones_24hs_2.swf", 0);
load_movie.loadMovie("/inicial_contacto_1.swf", 0);


this doesn't seem to work.

If there's a way to load internal movies in levels and have the same effect while having them load in the begining somehow, please let me know

thanks in advance
 
IMHO: Your movie is going to be a bandwidth hog. You can accomplish the same thing with Movie Clips. So rather than using a "button" you use a MC with a transparent button(s) inside of it (them). Then you would just use:

Code:
on(rollover){
   //play named frame label
   gotoAndPlay("start");
}
on(rollout){
   //return to stopped position
   gotoAndStop(1);
}

By the same token you can easily write a function that will cause the other buttons to change color, play a different frame, or dance a jig :) All using MC's.

This way would also eliminate the delay you are experiencing.

Hope it helps.

Wow JT that almost looked like you knew what you were doing!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top