Tuesday, January 31, 2012

Loader And Functional Menu Framework complete


Thankyou Tyler for the music.
The "pre-loader" I made worked fine when testing on my computer in CS5...
But something is going wrong here... I think that... The pre-loader glitches
out when it tries to load but the .swf is not in focus. Just a hunch.

Update:
After trying multiple versions of loading I have decided the best way to
get the loader to work is by hard-coding the file-sizes to be downloaded in the
swf.
I just tried a 3rd party plugin with file: "F37_D" (version D) and it still had
the same problem. I hear this can be solved with a server side solution that
can answer requests for file sizes. BUT... Lets patch it up the simple way.
My loader class will have an optional parameter for a file-size override.
When in effect, it ignores the file-size given by flashes progress event.

Update#2:2012.02.03[5:49PM]
Version D has had the 3rd party plugin removed.
For the time being, my solution is a simple "sizeOverride"
parameter in the items I add to the loader.

As3 TLFTextField instance problems: may be a struct, not a class





I made a class that takes TLFTextfield objects on the stage and passes them to a constructor that uses them to setup an instance of my PL_PreLoader class. While testing I found that it looks like TLFTextFields do not work like ordinary display objects in that when I passed their instance name to my constructor they seem to have been passed by value rather than reference. This would explain why there are now DUPLICATE copies of each TLFTextfield sent to my constructor. I will do another simle test to see if this theory holds. I am thinking maybe TLFTextField internally is actually a STRUCT and not a CLASS.

Update: Further testing shows this problem only happens when the text object is
passed to a class that extends Sprite or MovieClip. And my guess, any display object. Also interesting is that this duplication only happens ONCE. Meaning taking the TLFTextField instance on stage and passing it multiple times to constructors of a class that extends sprite... the cloning will only happen once.