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! 
- Has been a member for 3-4 years
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Author had a File in an Envato Bundle
- Item was Featured
- Author was Featured
- Exclusive Author
- Sold between 100 000 and 250 000 dollars
- Bought between 50 and 99 items
- India
- Referred between 200 and 499 users
- Has been a member for 2-3 years
- Item was Featured
- Author was Featured
- Exclusive Author
- Sold between 1 000 and 5 000 dollars
- Bought between 1 and 9 items
- Has been a member for 3-4 years
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Author had a File in an Envato Bundle
- Item was Featured
- Author was Featured
- Exclusive Author
- Sold between 100 000 and 250 000 dollars
- Bought between 50 and 99 items
- India
- Referred between 200 and 499 users
- Has been a member for 2-3 years
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Author was Featured
- Beta Tester
- Exclusive Author
- Sold between 50 000 and 100 000 dollars
- Bought between 10 and 49 items
- Spain
- Referred between 100 and 199 users
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?
- Has been a member for 3-4 years
- Author was Featured
- Exclusive Author
- Sold between 5 000 and 10 000 dollars
- Brazil
- Referred between 1 and 9 users
package {
import flash.display.Sprite;
[SWF(width=500, height=400, backgroundColor=0xff0000, frameRate=30)]
public class color extends Sprite {
public function color() {
}
}
}
- Has been a member for 2-3 years
- Item was Featured
- Author was Featured
- Exclusive Author
- Sold between 1 000 and 5 000 dollars
- Bought between 1 and 9 items
The possible way looks like making a bitmap image by referencing stage then getting its color.
- Has been a member for 3-4 years
- Author was Featured
- Exclusive Author
- Sold between 5 000 and 10 000 dollars
- Brazil
- Referred between 1 and 9 users
XanderRock said
The possible way looks like making a bitmap image by referencing stage then getting its color.
yes you are right me bad 
us a shape VF 
- Has been a member for 3-4 years
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Author had a File in an Envato Bundle
- Item was Featured
- Author was Featured
- Exclusive Author
- Sold between 100 000 and 250 000 dollars
- Bought between 50 and 99 items
- India
- Referred between 200 and 499 users
XanderRock said
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…
pezflash saidYes, but it would be hassle free if possible within actionscript.
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?
- Has been a member for 2-3 years
- Item was Featured
- Author was Featured
- Exclusive Author
- Sold between 1 000 and 5 000 dollars
- Bought between 1 and 9 items
VF said
XanderRock saidThe bitmapdata draw method doesn’t gets bg color of stage. hmm…
The possible way looks like making a bitmap image by referencing stage then getting its color.
I just checked it, it keeps turning out as FFFFFF .. Maybe some more modification needs or extending the stage class
- Has been a member for 2-3 years
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Author had a Free File of the Month
- Author was Featured
- Exclusive Author
- Sold between 10 000 and 50 000 dollars
- Bought between 1 and 9 items
- Croatia
- Referred between 1 and 9 users
tsafi said
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![]()
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.
