A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: set the background color of a contentpane with AS

  1. #1
    Junior Member
    Join Date
    Sep 2008
    Location
    In the middle of the univers
    Posts
    7

    set the background color of a contentpane with AS

    Hello alltogether....

    I have a little problem with changing the background Color of a contentpane with AS...
    the name of the contentpane is contentpane1... and onClpEvent(release) I would like to change the background Color auf the contentpane (and also of annother shape....)...

    I allready tried the following code-line:

    _parent.contentpane1.setBackgroundColor("0xffffff" );

    but nothing happened...

    What is wrong with this statement.. ?

    kind regards

    torfnase :-)
    Last edited by torfnase; 09-10-2008 at 12:46 PM.

  2. #2
    theSWEEN thesween's Avatar
    Join Date
    Nov 2005
    Location
    Hertfordshire, England
    Posts
    305
    Hi torfnase,

    I've never seen this before/wasn't aware you could use this but I don't think you need the _parent.. so it would just read contentpane1.setBackgroundColor("0xffffff" );

    Hope that helps??

  3. #3
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    There is no function like that to set the background color.
    If you place one on stage using the gui, you can select the color you want.

  4. #4
    Junior Member
    Join Date
    Sep 2008
    Location
    In the middle of the univers
    Posts
    7
    thank you all,
    I managed to solve the problem...

    I am working on a TAB-Interface, where the content is displayed in a contentpane. The active TAB has to be in the foreground, to make it look naturally. OK I could not change the background color of the contentpane, but now I change the "face" of the TAB, which has the same effect....

    This is quite easy by using the following statement:

    _root.button2.setStyleProperty("face",0xff0000);

    to make the face red :-)

    greetings :-)

  5. #5
    Junior Member
    Join Date
    Sep 2008
    Location
    In the middle of the univers
    Posts
    7
    allright,
    most of the work is done...

    if you would like to have a look at the results :-)

    klick me !!

  6. #6
    Ubi bene, ibi patria Nightcap's Avatar
    Join Date
    Jun 2007
    Location
    GA, USA
    Posts
    184
    Quote Originally Posted by torfnase
    allright,
    most of the work is done...

    if you would like to have a look at the results :-)

    klick me !!
    Very nicely done and you clearly explained the possibilities of the contentpanel in the text.

    Tschüss!
    Everybody thinks of changing humanity,
    Nobody thinks of changing himself.

  7. #7
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    Quote Originally Posted by torfnase
    allright,
    most of the work is done...

    if you would like to have a look at the results :-)

    klick me !!
    The content pages don't show when viewing the site with FireFox.
    It looks like you typed you url's in a way IE understands and FireFox doesn't.

  8. #8
    Junior Member
    Join Date
    Sep 2008
    Location
    In the middle of the univers
    Posts
    7
    Quote Originally Posted by w.brants
    The content pages don't show when viewing the site with FireFox.
    It looks like you typed you url's in a way IE understands and FireFox doesn't.
    uupps
    I only tested the interface with IE. It is obviously a problem with the Flashvars...

    I put the names of the html-Snippets to display in a Flashvar like this:

    <param name="FlashVars" value="schritt_1=1&schritt_2=2&schritt_3=3&schritt _4=4&schritt_5=5&schritt_6=6&schritt_7=7&einblendu ng=1">

    but that does not seem to work in the FF :-(

  9. #9
    Junior Member
    Join Date
    Sep 2008
    Location
    In the middle of the univers
    Posts
    7
    allright, I fixed it :-)

    now it is working fine even in the feuerfuchs :-)

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