A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Scrollpane components colors

  1. #1
    Member
    Join Date
    Jul 2001
    Posts
    58

    Scrollpane components colors

    Ok guys i learned here how to change the scrollpane color dynamically with this script:

    globalStyleFormat.face = 3688282;
    globalStyleFormat.shadow = 0;
    globalStyleFormat.darkshadow = 0;
    globalStyleFormat.highlight = 16777215;
    globalStyleFormat.highlight3D = 0;
    globalStyleFormat.applyChanges();

    Now what i am asking to myself is this:
    How can i control the colors that i am applying??
    I mean in the first line of code i set up the scrollpane face color...but what is that number?? its not an hexadecimal value and i cant understand how to control the applioed colors..i mean, how can i set up the scrollpane slide color to an orange?? #ff9900 for example???
    Thanks to any1 who reply this post!!
    Flashkit is the greatest flash resource in the world!!!
    Richard

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Frankly, I've never seen this notation...

    I allways use...
    ...
    myFormat = new FStyleFormat();
    myFormat.scrollTrack = 0xFF9900;
    myFormat.arrow = 0xFF0000;
    myFormat.face = 0x999999;
    myFormat.darkshadow = 0xFF0000;
    myFormat.shadow = 0x00FF00;
    myFormat.highlight = 0x00FFFF;
    myFormat.highlight3D = 0xFF00FF;
    ...

    Or...

    scrollbar1.setStyleProperty("arrow", 0x00FFFF);
    scrollbar1.setStyleProperty("face", 0x000000);
    scrollbar3.setStyleProperty("face", 0xFF0000);
    test.setStyleProperty("foregroundDisabled", 0x0000FF);
    ...

  3. #3
    Senior Member
    Join Date
    Sep 2000
    Location
    Pittsburgh
    Posts
    252
    Richard,

    Your close you just need to assign your color values in the form oldnewbie has above: 0x123456

    also using a globalStyleFormat will apply that format to all of your components 'globally' which may or may not work for you.

    There is a short description in the AS dictionary.

    Hope this helps,
    Dunc

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center