PDA

View Full Version : Loading data on demand


Toowoomba
10-26-2001, 04:32 PM
I've got a little size problem here:

The main movie contains a mc (content) with about 55 Keyframes. Each Keyframe contains a small .jpg (around 4-5kb) and some text. The user is able to click through all those data by two basic buttons on the main timeline.
Button1:
on (release) {
tellTarget ("content") {
prevFrame ();
}
}
Button2:
on (release) {
tellTarget ("content") {
nextFrame ();
}
}

Now to the problem: the size of the mc (content) is about 280kb !!
I would like to load the pics just on demand, but without losing
this basic back and forth navigation.

Hmm, I hope I made myself clear. You might wanna have a look at
the movie but note that it preloads 305 kb at the moment.

Thanks for your help.

---------
Please excuse my English since it is not my mothertongue.


http://home.t-online.de/home/Tobias.Schichtel/trip.htm

geak
10-26-2001, 05:59 PM
In order to load them in "on demand" you would have to make each frame or piece of content an external movie and load it into a level or a blank movie clip. Try optimixing your file as well because with the jpegs you are using the file shouldn't be that big. Make sure that you are using symbols and reusing the symbols every where possible.

Toowoomba
10-27-2001, 09:32 AM
Thanx geak,

I thought about something like this aswell. Since I'm absolutly new to actionsscript I wonder if someone could help me out on
loading those external movies with my basic back and forth navigation. I guess I would have to define some sort of variable in order to load the next or previous .swf into a blank movieclip or level. I would really appreciate any help or hints on that. :)

The jpgs are optimized with photoshop and already at low quality
would you give me a hint how to get them even smaller?
Thx.

geak
10-29-2001, 03:56 PM
I don't think the problem is in your jpgs. Go into publish settings and check generate size report. It will give you an itemized list of how big each item in your movie is.

As for the next and previous. I don't have time to give you detailed AS. But this might get you started. In your next and previous you need a variable and a counter ie count++; You will have to name your external movies myextswf1.swf myextswf2.swf etc... then in you load movie command say loadMovie("'["variable"+count]'", ,) my syntax is a little off as I do not have flash or ASDG in front of me right now So could someone give Toowoomba the correct syntax/ Thnx

salud
10-30-2001, 07:00 PM
I'm having the same problem, if someone can help I would apreciate....

Thanks