04-14-2002, 02:36 PM
|
#1
|
|
Registered User
Join Date: Jan 2002
Posts: 20
|
loadMovie too slow
Hi,
I'm sure that there is an easy way to do this, but I don't know it. I have my main movie, and I have some buttons which should superimpose little blocks of text when pressed. Each block of text should stay visible until the next button is pressed. I have made different .swf's of each block of text and used the loadmovie command to access them, but there is a disturbing lag time between the pressing of the button and the appearance of text.
There must be a command to allow me to load each block of text on the initial loading, and just call them up when I need them, and have them on a different levels so that they show over top of the main movie. (Is Loadmovie the only command which allows placing things on different levels?)
This one is driving me crazy, so I'd appreciate any response.
Thanks,
sreebar
|
|
|
04-14-2002, 02:42 PM
|
#2
|
|
Oops I did it again
Join Date: Oct 2001
Location: Melbourne
Posts: 8,579
|
put all your load movies in the first frame and set visibility of each text level to false
eg
_level5._visible=false;
then when a button is pressed set the visibility of the appropriate layer to true
cheers
|
|
|
04-14-2002, 02:43 PM
|
#3
|
|
Addicted To FLASH
Join Date: Dec 2001
Location: Egyptian in UAE
Posts: 12,436
|
Post the code u r using
__________________
â€* GOD Is Near â€*
Questions Don't PM for Questions . Thanks
An eye for an eye, make the whole world blind
_____________________________________________GHANDI
|
|
|
04-14-2002, 05:14 PM
|
#4
|
|
Registered User
Join Date: Jan 2002
Posts: 20
|
Billy T,
I tried what you suggested, but now all the layers are visible all the time (each layer of text shows on top of each other). The following is the first-frame Frame Action:
loadMovieNum ("page1.swf", 1);
_level1_visible=false;
etc. for each level and page number.
And on each button is the script (changing layer # for each button):
on (press) {
_level1_visible=true;
}
Where have I gone wrong?
sreebar
|
|
|
04-14-2002, 05:17 PM
|
#5
|
|
done
Join Date: Jun 2001
Location: portland, or
Posts: 8,106
|
may just be a typo in your post, but there should be a "." between _level1 and _visible like this
_level1._visible=true;
__________________
tg
---
what the hell was i thinking?
|
|
|
04-14-2002, 05:17 PM
|
#6
|
|
Registered User
Join Date: Jan 2002
Posts: 20
|
Quote:
Originally posted by farafiro
Post the code u r using
|
Farafiro,
The code I was using before was simply attached to each button:
on (press) {
loadMovieNum ("page1.swf", 1);
}
|
|
|
04-14-2002, 05:28 PM
|
#7
|
|
Registered User
Join Date: Jan 2002
Posts: 20
|
Quote:
Originally posted by tg
may just be a typo in your post, but there should be a "." between _level1 and _visible like this
_level1._visible=true;
|
Tg,
I corrected the script as per your suggestion, but my problem remains the same.
sreebar
|
|
|
04-14-2002, 06:04 PM
|
#8
|
|
done
Join Date: Jun 2001
Location: portland, or
Posts: 8,106
|
post your fla. i'll take a look.
or try this:
//based on 4 text boxes
ActionScript Code:
//frame1
for(var i=1;i<5;i++){
loadMovieNum("page"+i+".swf",i);
this["_level"+i]._visible=false;
}
//when you click a button
on(release){
//set levels to not visible
for(var i=1;i<5;i++){
this["_level"+i]._visible=false;
}
//make one of the levels visible depending on which button was pushed... in this case '2'
_level2._visible=true;
}
its a bit of a hack... the code could be cleaned up alot... but i'm out of here for now.
__________________
tg
---
what the hell was i thinking?
Last edited by tg; 04-14-2002 at 06:13 PM.
|
|
|
04-14-2002, 09:13 PM
|
#9
|
|
village halfwit
Join Date: Jul 2001
Location: USA, PA
Posts: 3,328
|
Unless you need your text pre-formatted you could probably use loadVariables(). That way you wouldn't have to worry about levels, lag-time or creating seperate SWF's.
Save each block of text as a seperate variable within a single text file and load that file at the beginning of the movie. On button press load a different variable into a single dynamic text box.
This might also help keep file sizes down since you will only need the font outlines embeded in one dynamic text box rather than including them in each SWF.
Maybe it'll help,
-PiXELWiT
http://www.pixelwit.com
__________________
There are no answers, only choices.
Last edited by pixelwit; 04-14-2002 at 09:20 PM.
|
|
|
04-14-2002, 09:15 PM
|
#10
|
|
Oops I did it again
Join Date: Oct 2001
Location: Melbourne
Posts: 8,579
|
yeah every time you click a button you need to the _visible of all the text to false and then just one of them to true
cheers
|
|
|
| Thread Tools |
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT. The time now is 05:08 AM.
///
|
|