When I use your code I get a gradient rectangle 800 px wide and 100 pixels tall with a white to black gradient running top to bottom. If I make the change that you quote, I get the same white to black gradient running right to left. How do you want this to be different?
You should change your alpha values to [1,1] rather than [100,100], the max for alpha is 1 in AS3.
Hi Rob, I'm really confused, if I create a new action script project and use the code i posted I get this:
As you can see its not going from white to black, but instead it just looks grey - although there is a gradient, it looks like its massive or something :S I don't get it
Im using flash builder 4, I create a new action script project, in the as file I paste that code into the constructor and run the application.
ps.. yes i know about the alphas need to be 1, it was a typo when i posted this, setting them to 1 doesn't seem to be my issue. Any other ideas?
Ok I tested the flash file on a different computer which had Flash player version 10 and it worked. I am using the new Flash player incubator 11 build. It seems to be the problem here, because the exact same file works on other versions of flash and other pc's. If I were to flag this up, where should I do it?
Where did you get the version 11 player? There should be a feedback mechanism or some sort of bug list.
You can download version 11 from the adobe labs site - its part of their new molehill release. I just reverted back to Flash 10 and lo and behold it worked :/ Not too sure why the new flash version would cause this problem though. hmm *scratches head*