Large vertical gradients not working like examples

Hello guys, now this seems to be a very straight forward thing to do and there are loads of tutorials about the subject. None of them are helping me get this right though, and I can't for the life of me figure out what's wrong...
Im trying to create a simple gui component that has a vertical gradient, simple enough right... I create the sprite, and draw the gradient with beginGradientFill and a matrix with a 90 degree radian angle on it; but it stops working if the sprite has a long width, below is an exmaple of what I mean:
package
import flash.display.GradientType;
import flash.display.Shape;
import flash.display.Sprite;
import flash.geom.Matrix;
public class Main extends Sprite
public function Main()
var theWidth : Number = 800;
var theHeight: Number = 100;
var shape1:Shape = new Shape();
var matrix:Matrix = new Matrix();
matrix.createGradientBox(theWidth , theHeight, Math.PI*0.5, 0, 0);
var colors:Array = [ 0xffffff, 0x000000];
var alphas:Array = [ 100, 100];
var ratios:Array = [ 0, 255];
shape1.graphics.lineStyle(2,0xa1b0b6);
shape1.graphics.beginGradientFill(GradientType.LINEAR,colors, alphas, ratios, matrix);
shape1.graphics.drawRect( 0.0, 0.0, theWidth , theHeight);
shape1.graphics.endFill();
addChild(shape1);
If I change
matrix.createGradientBox(800, 100, Math.PI*0.5, 0, 0);
to
matrix.createGradientBox(800, 100, Math.PI, 0, 0);
it works fine - but horizontally - why is it that applying 90 degrees the fill does not work?
Thanks for your help, I really don't know whats wrong with this

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?

Similar Messages

  • Lock Fill for Gradient Not Working (like it used to)

    This used to work on my last version of Flash (CS5.5):
    I use the brush tool to paint a gradient fill area. I then sample it with the eyedropper tool (either right afterwards or later) and notice that the Lock Fill tool option is now on. So far so good. I then continue painting, expecting the gradient to extend itself, because Lock Fill is now on. Instead, a solid fill color (somewhere between the 2 color stops) is painted. The only way I can extend the gradient is to paint the new fill area, then sample the original gradient fill and use the Paint Bucket on the new fill area. Argh...
    Is this a bug, a Flash setting that I can modify somewhere, or a planned change in the way Lock Fill works? I've tried this on 2 PC's running Windows 7 and get the same result.

    Please see DownloadHelper support for help with their add-on.

  • Hi, I have an iPod touch 5th generation which i got about 10 months ago and now my sound is not working. for example my music isn't playing nor are any of my game sounds. Someone help please.

    Hi, I have an iPod touch 5th generation which i got about 10 months ago and now my sound is not working. for example my music isn't playing nor are any of my game sounds. Someone help please.

    No sound form :
    - Speaker?
    - Headphones?
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up                                                                
    - Restore to factory settings/new iOS device.             
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar                                      

  • My passbook on my iphone 5 works the same as it did for the iphone 4, its not working like it should. why?

    my pass book on my iphone 5 does not work like it should, it works just the same as it did on the iphone 4, i tryed the date an time trick like 5 times an still nothing. i tryed factory reset an nothing. i know it workds different on the iphone 5 then the 4. but i dont know what else to do.

    Can you be more specific about what isn't working?  Are you running iOS 6 or iOS 6.1?
    Did you read the support page on Passbook?  http://support.apple.com/kb/HT5483

  • Siri is not working like it should i ask it to play songs and it just says sorry i cant do that any ideas y

    siri is not working like it should i asked it to play songs and it just says sorry i cant do it any ideas y

    Debbie:
    deborahfromwindsor wrote:
    he advises restarting by inserting the OSX disc and pressing down the C button to reboot from there then selecting disk utility, hard disk and repair.... Does he mean me to hold down the C key on the alpha keyboard or the ctrl key?
    Should I just ask for my money back??? If it is a simple repair do I just literally push the disc in, push the power button and hold down the C button?
    That's where I would begin, too, with
    Repair Disk
    Insert Installer disk and Restart, holding down the "C" key until grey Apple appears.
    Go to Installer menu (Panther and earlier) or Utilities menu (Tiger) and launch Disk Utility.
    Select your HDD (manufacturer ID) in the left panel.
    Select First Aid in the Main panel.
    (Check S.M.A.R.TStatus of HDD at the bottom of right panel, and report if it saysanything but Verified)
    Click Repair Disk on the bottom right.
    If DU reports disk does not need repairs quit DU and restart.
    If DU reports errors Repair again and again until DU reports disk is repaired.
    If DU reports errors it cannot repair you will need touse autility like TechTool Pro,Drive Geniusor DiskWarrior
    First we need to determine if the issue you are experiencing with the computer is software or hardware based. Once we have gotten things sorted out there should be time enough to make you decision about keeping or returning it.
    cornelius

  • I've updated to iso5 on my iphone 4 but some of the features are not working like the lock screen camera feature.  Have I done something wrong?

    I've updated my iphone 4 to ISO 5.  I could not connect to icloud yet however does this expalin why some of the features of ISO 5 are not working like the camera lock screen feature?
    Thanks
    C

    to see the camera icon, double-click the home button when you are on the lock screen. this will show the music controls and the camera icon. double click the home bgutton again to close them.

  • Iphone 4s Running Ios(7.1) Camera Focus Not Working Like Text On book It Showed Blurey Text & My Friend Also Same Modle His Camera Focus Perfectly..Is Is Possible To Fix It...Thnx Every 1

    Iphone 4s Running Ios(7.1) Camera Focus Not Working Like Text On book It Showed Blurey Text & My Friend Also Same Modle His Camera Focus Perfectly..Is Is Possible To Fix It...Thnx Every 1

    Hello SajidChaudhary,
    Thanks for using Apple Support Communities.
    For more information, take a look at:
    iPhone: Hardware troubleshooting
    http://support.apple.com/kb/ts2802
    Camera isn't functioning or has undesired image quality
    If the screen shows a closed lens or black image, force quit the Camera app.
    If you do not see the Camera app on the Home screen, try searching for it in Spotlight. If the camera does not show up in the search, check to make sure that Restrictions are not turned on by tappingSettings > General > Restrictions.
    Ensure the camera lens is clean and free from any obstructions. Use a microfiber polishing cloth to clean the lens.
    Cases can interfere with the camera and the flash. Try gently cleaning the lens with a clean dry cloth or removing the case if you see image or color-quality issues with photos.
    Try turning iPhone off and then back on.
    Tap to focus the camera on the subject. The image may pulse or briefly go in and out of focus as it adjusts.
    Try to remain steady while focusing:
    Still images: Remain steady while taking the picture. If you move too far in any direction, the camera automatically refocuses to the center.
    Note: If you take a picture with iPhone turned sideways, it is automatically saved in landscape orientation.
    Video: Adjust focus before you begin recording. You can also tap to readjust focus while recording. Exiting the Camera application while recording will stop recording and will save the video to the Camera Roll.
    Note: Video-recording features are not available on original iPhone or iPhone 3G.
    If your iPhone has a front and rear camera, try switching between them to verify if the issue persists on both.
    Have a nice day,
    Mario

  • After download ios5 my iPhone dose not  work like before why?

    After download ios5 my iPhone dose not  work like before why?
    i have iphone 3gs

    OK this is the issue after download ios5 my phone goes crazy like when i turn on my 3G i can`t  call someone and i cant even check my email i don't know why ...so after all this problem i have to turn 3G off and than call to my friend so why it work like this ?
    i restore my phone ...i restore as a new phone but still i have the problem ....

  • I would like to know why when i make a web page and test in my local browser it works fine then when i tranfer to my server i does not work fine example i used javascript to put a prompt bar on a page and it worked fine local but on server not working

    how come when i make a web site and i test it in my local server it works fine when i tranfer to server certain things do not work example i used javascript to put in a prompt bar for a newsletter page at the server it did not work but at local it did also it works at MOZZILLA but not internet explorer i also have cs4 was wondering if there is a way to test a page in dreamweaver and then transfer   THANK YOU X-FACTOR-MEDIA

    In future, please try to make the subject line of your posts shorter. In this case the following would have been sufficient: "JavaScript works locally, but not on remote server".
    Short, but meaningful subject lines make it easier for others to identify what your question is about, and often bring faster help.

  • Smudge brush not working like in regular Photoshop

    I just got Touch  for my Samsung Galaxy Tab 2 10.1 yesterday.  I needed a blending/smudging capability and saw that the toolset for Touch had both blur and smudge.  So I got it.  Blur seems to work fine...but smudge only seemed to darken my colors and formed a wierd edge, hard edge betwee the colors.  Not at all like in the regular Photoshop...I have CS6.
    I am thinking of returning the Tab 2 and getting the Note instead which has pressure sensitivity (or so I have heard)...but if there is no decent paint program out that will allow for halfway decent blending then I will simply return the Tab and wait a bit longer for the paint programs to evolve in this new format.
    Has anyone else noticed this effect with smudge?  Is there a setting that will make it work like it's full fledged cousin?
    Thanks

    I'm also having problems with the smudge/blur brush. My tablet (Samsung Note 10.1) was bought so I could do my work on the fly using a touch sensitive stylus with Photoshop. However the smudge brush simply isn't working as it should and this all but renders PS redundant in my portable work flow as I use this particular brush a lot.
    Like the original poster my smudge brush seems to be simultaneously burning/darkening. The harder I lean the more the image underneath darkens. Likewise if I lift the pen off between strokes each successive stroke darkens. Do it a sufficient amount of times and I end up with black even if I'm blending along the edge of 2 pale hues! I'm a very experienced Photoshop user so I'm fairly confident that the fault lies not with my brush settings but rather seems to be an unwanted side effect of the brush.
    As the Note tablet is a new device I'm guessing that there will be more complaints about this popping up as and when the Note becomes more popular as a creative tool. Meantime I find myself unable to do the work I bought the tablet for in the first place.
    Any ideas what software I can use to work around this? I need something which will allow me to work in layers with a smudge tool enabling me to - for example -  smudge and blend cross hatched lines to create a highly finished tonal surface. Ordinarily I would use PS for this! The ability to import this precisely smudged image into PS Touch for further editing would be a large bonus.

  • T400: vertical scroll not working on msn messenger or itune

    Does anyone have this problem? my T400 touch pad vertical scroll doesnt work on software like msn messenger or itune, and some other software like gtalk. I have install the latest UltraNav so I was wondering if anyone has this problem or can help me solve this problem.
    thanks
    Moderator note: Type added to subject line for clarity.
    Message Edited by Agotthelf on 15-05-2009 09:48 AM
    Solved!
    Go to Solution.

    Hello Lord442,
    please refer to this and this thread.
    I think adding MSN Messenger is the same procedure.
    By the way horizontal scrolling in Firefox needs this.
    Firefox web browser
    *,*,firefox.exe,*,*,*,WheelVkey,0,9
    Follow @LenovoForums on Twitter! Try the forum search, before first posting: Forum Search Option
    Please insert your type, model (not S/N) number and used OS in your posts.
    I´m a volunteer here using New X1 Carbon, ThinkPad Yoga, Yoga 11s, Yoga 13, T430s,T510, X220t, IdeaCentre B540.
    TIP: If your computer runs satisfactorily now, it may not be necessary to update the system.
     English Community       Deutsche Community       Comunidad en Español

  • Gradient not working

    For some reason after the update, the gradient: from color to transparent is not working.
    I select the linear gradient and it shows only as black:
    i click on the editor and it shows like it should:
    Any other gradient works, for instance:
    i am using
    any ideas?

    In the gradient tool options bar, turn on the Transparency checkbox.

  • Problems with "find nearby missing photos", not working like it should in LR4

    After I imported photos into LR4 I decided to split the event within the same folder creating 2 subfolders and proceeded to move the files within the finder. Went to LR4 and synchronized the folder but it didn't fix the file location on the missing files. So I tried finding individual files and checked the "Find nearby missing photos" but this doesn't seem to work like it did in LR3, because it won't find any nearby missing files even though they are right there new to each other in the same folder.
    I don't want to dremove them and re-import because I have added ratings and I fear I would loose this info if I did that...

    Your assumption that you would loose your ratings and develop settings is correct, if you would re-import.
    Reimporting is never a good idea.
    For the rest you have two alternatives: either you reconnect one image after another, or you undo on OS level what you did in the first place, then execute the move inside LR.
    Depending on how many images you moved this could actually be the fastest route out.
    "Find nearby missing photos" did not work reliably for me either in LR3. I have never found out when it did and when not, so I have preferred to learn how to perform any such operation inside LR.
    Another valid question is why you do not use collections for your desired split , and leave the folders as they were.
    According to my prejudice MAC users would not be as conservative in sticking to folder structures as Windows users..;-))
    Once you master LR folders could be very unimportant storage buckets, as every angle for organizing your images would be covered by (smart) collections and keywords and other metadata.
    Good luck, Cornelia

  • ITunes Wi-fi sync not working like it should.

    So I got a new ipod touch 4th generation because my other one broke. I'm trying to set up wifi sync so I don't have to connect the device to the computer incase it malfunctions. Half the time it doesn't work, and if it does work, I still have to connect it directly to the computer. Sometimes I use wifi sync the first time and it doesn't work, then I plug it into my computer and it detects it. Then I unplug it and use wifi sync and it works like it should. So it kind of defeats the purpose of using wifi sync if everytime I want to sync content through wifi, I'm forced to connect the ipod to the computer. Is there something I'm doing wrong? Please Help!
    Also, my Ipod is not even a month old and is working like new. It is refurbished.

    Have you looked here:
    iTunes 10.5 and later: Troubleshooting iTunes Wi-Fi Syncing

  • After the official 10.1 os update my bluetooth in car does not work like it used to.

    ***SORRY THIS IS CLONED of this http://supportforums.blackberry.com/t5/BlackBerry-​Z10/In-car-bluetooth-not-working-properly-after-10​...
    New to forum sorry.
    I have a BB Z10 and whenever I entered my vehicle the in-car bluetooth would connect/pair to the phone and the music which was great and had no problems with listening to music and making phone calls.
    But recently with the 10.1 update it's all gone wrong the phone does not respond anymore to making calls, but the music still plays and I can still remote control the music via the steering wheel. however there is  no call audio the call starts and it shows it being connected but no audio from the in car bluetooth.
    Now I did some CSI investigations into the matter and I have narrowed it down to anything previous to the 10.1 update works fine.
    I backed up the phone via BB link and then rolled back the updates and I found that 10.0.09.2372 works just fine with the in-car bluetooth with making calls and playing music I literally just tested this. I then installed the leaked 10.1.0.1880 hoping it was fixed but no improvement over the official 10.1 it still does not play call audio.
    I have now reverted back to the official 10.1 and restored phone backup and then once again tried as before with all the pairing one has patience for, it just will not work in my car. I desperately need my Z10 to work in my car!
    Is this issue going to be addressed very soon??? I am not the only one with this problem. Help anyone...
    I would also like it that the music doesn’t start automatically as I have deezer and would like that to be an option to play that music instead.
    Anyway thanks for your time... any help with who to contact or whatever would be appreciated.

    Same problem with my z10 since 10.1 OS update. Please help.

Maybe you are looking for

  • Flat File automation process - limitations

    Hello Everyone, I would really appreciate any insight on the process improvement suggestions. Background: Currently we have around 12 territories providing a new flat file with new data on a daily basis depending on the business activity. Which would

  • Voice control after 10.2.1.537 update

    The voice control on my z10 after this up date has no feedback commands. It will take commands and dictation but there is no audible response . All the settingsare what they should be and the app worked well with 10.1. Can anyone shed some light on t

  • Acrobat 7.0 PDF Printing with Black Boxes

    When I print a PDF file, areas of the document and sometimes the entire document, prints as a big box of black ink. This happens when I print a document that I've created or one that someone else has created and sent to me. This happens if I'm printi

  • Obtaining rowKey from MasterTable (ADF/BC/JSF)

    Hi, i try to obtain the selected row in the master table from a commandbutton thats located in the detail table. Typically i would use #{row.rowKeyStr} to obtain the current selected row. But now the setActionListener is located in the detail table -

  • Using macbook pro on a 32' Samsung tv

    Does anyone know how long the Apple DVI to VGA Display Adapter cable actually is? and will this allow me to dual display my laptop?