home
eureka!
1/3/2005 11:36:00 AM

Breakthrough at 11:35AM! I've been creating a flash file that has one frame, and the actionscript loads an image, and a slogan and sets the color of the slogan, based on a variable. First I was setting the variable outside of the functions, and I was getting slightly wonky results. Sometimes the correct image would load but the slogan would be wrong or the color of the text would be wrong.

Now I'm setting the variable in a this.onLoad = function(){} and passing the var to each of the other functions. (I'm treating this as my public main function. I will later pass the variable dynamically with FlashVars.) A simple thing like variable scope can be lost when you are coding in an environment you are just getting used to. I guess I was thinking that there are too many instances to go wrong, as I've created a movieclip in my library, and then created one instance of the movieclip on the stage in the first frame, one to load the dynamic text, and one to attach a jpeg. Each of these instances I thought could be overriding my property setting with actionscript. Nope.

Last night I spent at least an hour trying to .loadMovie() with a gif. Here's a hint for you other Flash beginners. You can't treat a gif like a movie...however you can treat a jpeg like a movie.

I'll tell you this though, the feeling of getting the results you expect is the same as any other programming language. It's like candy to a baby when it works.

Link | Comments?
This was automagically filed under geek

<<<< Previous bling Next blong >>>>
Last 10 entries
two thousand and seventeen : 1/31/2017 : 4:44:00 PM
Luck, awareness and quantum entanglement : 11/19/2016 : 11:11:00 AM
the black journal : 10/18/2016 : 8:53:00 PM
Not aware of the tulips : 9/29/2016 : 2:30:00 PM
The practice : 8/9/2016 : 9:07:00 PM
Filling up my cup : 7/20/2016 : 11:41:00 PM
Happiness and intelligence : 7/7/2016 : 11:11:00 PM
My departure from Technology. : 5/27/2016 : 2:32:00 PM
Introducing the Zenbit 1.0 beta. : 1/15/2016 : 6:14:00 PM
Metric : 9/17/2015 : 10:50:00 PM