ActiveDen

Possible to get Stage bg color?

2998 posts
  • Has been a member for 3-4 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Author had a File in an Envato Bundle
  • Exclusive Author
  • Sold between 100 000 and 250 000 dollars
  • Elite Author
  • Bought between 50 and 99 items
  • India
  • Referred between 200 and 499 users
VF says

Is there any way to get the background color of stage through action script? Already tried a few tricks and looks like it is impossible! :(

1 year ago
137 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Bought between 1 and 9 items
XanderRock says

You mean to learn the color or the change it in runtime?

1 year ago
2998 posts
  • Has been a member for 3-4 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Author had a File in an Envato Bundle
  • Exclusive Author
  • Sold between 100 000 and 250 000 dollars
  • Elite Author
  • Bought between 50 and 99 items
  • India
  • Referred between 200 and 499 users
VF says

Just need to get the empty stage color. No need to change.

1 year ago
2968 posts
  • Has been a member for 2-3 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Beta Tester
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Elite Author
  • Bought between 10 and 49 items
  • Spain
  • Referred between 100 and 199 users
pezflash says

If i’m not wrong the stage color is not something inside the swf, but setup in the html object directly, so i guess you should try with external interface to communicate with the browser. Could be an option?

1 year ago
3678 posts
  • Has been a member for 3-4 years
  • Exclusive Author
  • Sold between 5 000 and 10 000 dollars
  • Brazil
  • Referred between 1 and 9 users
tsafi says
pez pez pez ….here you go ,you can even set size/frame Rate if you need . will work on your fla don’t worry its not just flex :P
package {

    import flash.display.Sprite;

    [SWF(width=500, height=400, backgroundColor=0xff0000, frameRate=30)]

    public class color extends Sprite {

        public function color() {

        }
    }
}

1 year ago
137 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Bought between 1 and 9 items
XanderRock says

The possible way looks like making a bitmap image by referencing stage then getting its color.

1 year ago
3678 posts
  • Has been a member for 3-4 years
  • Exclusive Author
  • Sold between 5 000 and 10 000 dollars
  • Brazil
  • Referred between 1 and 9 users
tsafi says

The possible way looks like making a bitmap image by referencing stage then getting its color.

yes you are right me bad :P

us a shape VF :P

1 year ago
2998 posts
  • Has been a member for 3-4 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Author had a File in an Envato Bundle
  • Exclusive Author
  • Sold between 100 000 and 250 000 dollars
  • Elite Author
  • Bought between 50 and 99 items
  • India
  • Referred between 200 and 499 users
VF says

The possible way looks like making a bitmap image by referencing stage then getting its color.

The bitmapdata draw method doesn’t gets bg color of stage. hmm…


If i’m not wrong the stage color is not something inside the swf, but setup in the html object directly, so i guess you should try with external interface to communicate with the browser. Could be an option?
Yes, but it would be hassle free if possible within actionscript.
1 year ago
137 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Bought between 1 and 9 items
XanderRock says


The possible way looks like making a bitmap image by referencing stage then getting its color.
The bitmapdata draw method doesn’t gets bg color of stage. hmm…

I just checked it, it keeps turning out as FFFFFF .. Maybe some more modification needs or extending the stage class

1 year ago
1301 posts
  • Has been a member for 2-3 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Author had a Free File of the Month
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 1 and 9 items
  • Croatia
  • Referred between 1 and 9 users
Tean says

pez pez pez ….here you go ,you can even set size/frame Rate if you need . will work on your fla don’t worry its not just flex :P
package {

    import flash.display.Sprite;

    [SWF(width=500, height=400, backgroundColor=0xff0000, frameRate=30)]

    public class color extends Sprite {

        public function color() {

        }
    }
}

But this is compile not runtime.

1 year ago
by
by
by
by
by