themolotov.net


Skip To Content

Actionscript 3 Flash Loader

Title is intentional for search engine crawling purposes.

We're working on a site that does a funky image gallery slideshow for a header. Loading external images is simple enough in Flash, but we ran into a problem while doing so. Apparently, different instances of the Loader() object will, if called before the previous load request completes, will terminate the previous request.

As the Loader object can contain only a single child, issuing a subsequent load() request terminates the previous request, if still pending, and commences a new load.

From Adobe: http://livedocs.adobe.com/flex/3/langref/flash/display/Loader.html

Looking at it now, it makes sense (and it helps that it's so explicitly spelled out in the docs :P). We were thinking of it previously as Loader() being a 'class' and that instances of the Loader object were independent of each other. However, in Flash, this is not so - instances of objects are not independent (when working with MovieClip objects, this was obvious and frequently irritating when a 'copy' was intended to be a 'duplicate'). We were looping through and re-instantiating the Loader() object, and killing our previous requests before the images were actually loaded. This resulted in us being left with only the last image.

I get so irritated with Flash. I still don't like it, but I'm trying. It's become more fun - if only for the stress it puts your brain under. Alon and I were talking the other day that it's like programming in 3D: top down in a single script, top down in layers, and left to right of the 'timeline'. Throwing and catching exceptions is fun and I'm learning a lot about what I consider 'non-linear' programming.

It's wierd to be working in Flash, using more the text editor than the stage or the timeline.

I post stuff like this so that other people may be able to solve some annoying Flash quirks more quickly.

Scientology

I've noticed a lot of people/sites/whatever are taking up proverbial arms to the Church Of Scientology. This as on the first page of Digg this morning a raid on the Scientology center in Austin, Texas.

As crazy as I think Scientology is, I believe in the freedom of religion and the freedom of speech even more-so. Call it a 'cult' or whatever you want, but they deserve this discrimination as much as any other religious group. When a group of like-minded people group together to band against something they don't like (whether it legal or otherwise) you are left with mob rule.

People are stupid.

Empty Statistics

Statistics that make claims like this:

1 in 8 Americans know someone with Alzheimer's Disease.

Are completely fucking stupid and useless. The popularity of those afflicted with AD is completely irrelevant and worthless. If you're trying to impose weight or severity on something, use appropriate information, not complete fucking bullshit.


All Content Copyright Jon Gartman 2006, unless otherwise noted.
This site is part of the molonet. Generated in about 0.202 seconds.
Spiral out, keep going.