Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

simple Flash pre-loader

New Here ,
Jun 28, 2018 Jun 28, 2018

Hello,

I'm putting back online a very old Flash project (2001) which needs to load tons of swf. https://focused-mestorf-27ac7d.netlify.com/

in my base file, I need to create a simple text preloader that will work for every swf loading without having me to update each button action calling the swf url, otherwise I'll have to update every button (1000 or 2000 of them) which will be a ton of work.

is it possible to do? I haven't touched Flash and AS3 for 10 years. I'm super rusty...

I'll appreciate any help.

TOPICS
ActionScript
876
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jun 28, 2018 Jun 28, 2018

Welcome back!

first of all you are better to create a class out of the timeline.

Then use GreenSock (ActionScript Animation made Easy - GreenSock Animation Platform GSAP ) libraries for a dynamic and efficient preloader

I guess the text preloader is linked to each swf so just make an array in your class

if it's static or if it constantly changing import it from your server in JSON.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 28, 2018 Jun 28, 2018

it's static.

not sure what you mean about array class, I'm really ultra rusty, I feel like I can't do anything with Flash nor AS3 now.

if I have to link a text preloader to each swf that would not work. as I said, too many swf files. but all the swf load on the same level (replacing each other every time a new one loads) so perhaps a preloader for that level?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jun 28, 2018 Jun 28, 2018

to create a class

Adobe Flash Platform * Creating your own classes

so if your swf won't change in real time it's better to create your array

directly in your class like

swfList = ["mc1.swf","mc2.swf",...]

then use Greensock preloader to load your SWFs.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 28, 2018 Jun 28, 2018

I can't list all the swf, that would be a daunting task, I don't even know how many files I have. this is a 1 year photo diary, so 366 swf for each day and then 1 to 20 swf per day that are the photo diaporamas.

I got a main menu that has 366 buttons calling each day, then I got buttons inside each swf day calling the extra content. I can't be editing any of those. as it would take me forever.

alternatively, I'll be happy to just have a loop animation just to show something is loading. but can I call a movie clip on the root without having to add that action to every buttons calling the swf files?

like a script in the root file saying that if something is loading then roll that clip?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jun 28, 2018 Jun 28, 2018

your logic is not adapted to this task, you should imagine another way to achieve what you want to do.

so as you don't know how many swf before the process so it's dynamic, not static.

and the only way to automate this kind of task is to create dynamically an array of all these swf on the server side

and import it as JSON or else, then create one button that manage all your preloads with text.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 28, 2018 Jun 28, 2018

my logic is that all the swf already have been made and I have no time to re-edit each button calling all those swf in order to incorporate a loading script as it seems I would have to add the script on each button (2737 of them) calling an url.

so I think the simple solution would be to have a movie clip (loading animation) on the base file that would appear everytime an url is called and then disappear (alpha or got to X frame) once the swf is loaded.

surely that's possible right ?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jun 29, 2018 Jun 29, 2018

sure it's possible, but it's not the most efficient solution...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 29, 2018 Jun 29, 2018

well, the most efficient solution would really be for me to not have to edit 2737 buttons.

I'll take any solution that would make that possible. would you help? perhaps for a small fee?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jun 29, 2018 Jun 29, 2018

why not....

- are your swf located on the same place?

- are the name normalized? (like swf1, swf2 etc..), if not, could you provide the entire list on a file?

- are the swf need to be loaded only?

thanks

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jun 29, 2018 Jun 29, 2018

Also provide the FLA...

It seems also that your photos are very low resolution, is it normal?

manage all the buttons with loops and dynamic logic is the right way to go.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 29, 2018 Jun 29, 2018

all swf are in separate folders, per month and day. and have arbitrary names.

for instance for January 04 2002:

files/01/04/02.swf

files/01/04/02_arbre.swf

files/01/04/02_art.swf

files/01/04/02_lumiere.swf

I guess I could find a way to catalog all the files in a txt file.

but I don't want to pre-load all the swf, too many of them, and close to 1.5 Gb total. I really just want either a simple text percentage loader for when a swf loads or a simple animation to let the visitor know something is loading.

that project was done in 2001, picts were super low resolution back then. so yeah it's normal.

here are a few files:

Dropbox - diary-sample.zip

I'm including the first day April 12 2001, which only has 1 picture diaporama, so 01.swf for that day as only 1 button calling 01_birthday.swf but most days have more diaporamas

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jun 29, 2018 Jun 29, 2018

Thanks, you don't have to load all in one time, the thing is every button must target one

function with different params to target the right swf.

if you are patient (as I'm quiet busy for now) I can do it. if it's urgent, Kglad or Joao Cesar would be very happy to help you out  in a few hours.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 29, 2018 Jun 29, 2018

but then does that means editing each action button? cause that could take a while.

it's not super urgent. I did want to bring it back online within a week though if that's manageable.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jun 29, 2018 Jun 29, 2018

For your case it needs to create buttons dynamically according to each year, month and day.

you don't have to manage manually all these buttons, it's not the right solution for such kind of project.

also if the project is from 2001 I guess it's in actionscript 2 right?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 29, 2018 Jun 29, 2018
LATEST

humm, but how can you generate buttons in the right place for the photo vignettes? they were carefully created so when a vignette is on top on another so are their invisible buttons, and some vignettes are the buttons themselves when there is only 1 or 2 pictures to preview. I feel like it's adding complexity and work.

can't we just have a script in the main flash like: if swf is loading then play loading animation ? I feel like it's possible to make and it would be much simplier.

yes it's AS1 or 2.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines