is there any way to change the black in background in the VideoPlayer component that comes with Flex 4 ?
I can change every color but i can't change the black in background.
Thanks
if this one option doesn't help you, use this page to extend VideoPlayer with your own vision of logic, or if you are really have another option to add build your own component based on raw VideoDisplay like this.
Here is a sample changing background color
http://blog.flexexamples.com/2009/05/04/setting-the-base-theme-color-on-a-spark-videoplayer-control-in-flex-gumbo/#more-1056
Related
I wish to skin MenuBar, and change it's itemSkin to something else, like different background color for each menu item.
Is it possible ?
I found the solution
the main idea is to create a class overriding MenuBarItem.
Then - about the background - i have create one Image to store the color, and i switched it's position with the label of the menu item.
So far it is sufficiently good solution. :)
Is there an easy way to change the background color of a Flex 4 spark Button without messing with skins?
UPDATE: ok, figured it out, simply set the chromeColor attribute of the Button mxml.
For spark components, you can use chromeColor style:
<s:Button chromeColor="0xff0000" label="chrome red"/>
You can change the color style of the button. You can also have a bitmap fill.
Update: The above methods do not change the background.
Easiest way to change the background, you can use - opaqueBackground property.
Here is another way to change the background of a button without changing its skin -
1. Create a group with a rectangle and your button.
2. Set opaqueBackground of your button to null.
3. Make width and height of rectangle to 100%
4. whatever color you fill the rectangle with is the background of your button.
This can also be done via code like :-
btnID.addEventListener(MouseEvent.MOUSE_OVER, textChange);
btnID.addEventListener(MouseEvent.MOUSE_OUT, textChangeback);
private function textChange(event:MouseEvent):void
{
btnLinkDelete.setStyle("color", 0xFFFFFF)
btnLinkDelete.setStyle("chromeColor", 0x535151)
}
private function textChangeback(event:MouseEvent):void
{
btnLinkDelete.setStyle("color", 0x000000)
btnLinkDelete.setStyle("chromeColor", 0xfcffff)
}
I am posting it, if anyone want to change background color on mouse hover.
I have a custom preloader that I designed in flash. When I load it in flex, it loads with a white background. When I try to change the background to black in my flash file & load it in Flex, the background color remains white. I've also tried to update the compiler settings in Flex, adding "-default-background-color #000000" but I still get a white preloader background. I am using Flex 4. Here is my Pre.as file:
`
`
thx!
I encountered the same problem.
solved it using opaqueBackground :
loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, init);
private function init(e:Event):void{
loader.opaqueBackground = 0x000000;
}
Worked great for me.
This man solved it by adding background sprite and filling it with custom color you want.
And here http://iamjosh.wordpress.com/2007/12/18/flex-custom-preloader/ author also told that he added the compiler option like this:
Finally, let’s change the background
color of the application to match our
logo a little better. Just add the
following Flex compiler argument:
-default-background-color #FFFFFF
So, you might added this option to another one application you need instead.
UPDATE 1
Also look at this
http://cookbooks.adobe.com/post_Change_Background_Color_of_the_Preloader_Phase-1421.html
And please, explain once again your goals, are you want to set color or something another, from preloader or parent application or whatever you want, just let me know.
UPDATE 2
And listen, if you really want some cool bg, you might do next thing.
1)Forget about preloader mechanism.
2)Write Your BG application
3)Add swfLoader overlay to your bg application
4)Draw progressbar for this container
5)Enjoy with 2 application architecture instead of standard way.
Questions!?
I'm trying to change the background color and or text color of a BorderContainer in flex 4 using Action Script, but have not idea how to.
The Border Container component doesn't seem to have any properties like:
idname.color = "#333333";
idname.backgroundcolor = "#333333";
How might I go about doing this?
thanks!
You can set styles (which are different from properties) in ActionScript like so:
idname.setStyle("backgroundColor", 0xff0000);
Not sure if this is the only way to do it, but by creating a css style your able to change the background, text color, and other style attributes and call the style's name in Action Script.
idname.styleName = "css-stylename";
how can i get a title window with all rounded courners, so that i may make it whole round or circular shape ?
i want shape like circle..
set the property: cornerRadius
default is 4
A couple of possible approaches:
If you are using Flex 4 (spark TitleWindow as opposed to the halo TitleWindow) you can create your own skin and assign that skin in CSS. In your custom skin you can draw the background however you want, including an Ellipse set to the width and height of the TitleWindow.
If you don't want to create a skin, or you are using a halo TitleWindow, you can create a circular mask and set it as the mask property on the TitleWindow. The downside to this approach is that you will probably clip the title and the close button (if it is visible), not to mention the contents as well.
Hope that helps, let me know if you need more details on either of these approaches.