Flex :: Set Skin To Null For Button?
Jan 20, 2011How to set skin to null for button?
button = new Button();
button.useHandCursor=true;
button.buttonMode =true;
i want to set button.skin = null
How to set skin to null for button?
button = new Button();
button.useHandCursor=true;
button.buttonMode =true;
i want to set button.skin = null
ADOBE SYSTEMS INCORPORATED Copyright 2008 Adobe Systems Incorporated All Rights Reserved. NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms of the license agreement accompanying it.
[Code]...
I am trying to add tooltip in the skin of button bar button but not able to do that, what to do?
View 1 RepliesI have the skin below for my buttons:
<?xml version="1.0" encoding="utf-8"?><s:SparkSkin
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo"
[Code]...
I was wondering how I can add a different image for different buttons which have the same skin.
SkinParts are a great way to add event handlers and logic to an object that is instantiated in the skin, away from any business code. Often, though, I find myself wanting to do the opposite, and define parts that will be used in reusable, skinnable containers in the parent mxml files which will be inserted into the skinned containers.
What's the best practice for when you want to be able to define a control and a skin which can be reused with different controls inserted from outside the skin? Edit: A better way to put this might be that I want to use something that works a little bit like a SkinnableContainer, but that isn't limited to one area where content can be placed.
I have a CSS file containing the following definition :
[Code]....
Now, I want to use the disabled-skin defined in the CSS, as the upSkin of b1. So something like b1.setStyle("upSkin","Tab.disabled-skin"); But I am struggling with the exact syntax of the second argument for setStyle. What should I use for the second argument for setStyle method?
I am trying to add different icon on different buttons. I have my skin file ready but not sure if I have to create different skin class for different button. It sounds inefficient.
<s:Button id="pass"
width="110"
height="35"
[Code]....
I have spark skin a button with up, down, over, and disable states in a button component to create a modular. Is there a way when the user press and hold a key, the button will remain in 'down' state?
The button component include skinclass:
<?xml version="1.0" encoding="utf-8"?>
<s:Button xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
[Code].....
I extend Button to create ImageButton, and I extend ButtonSkin to create ImageButtonSkin. But, when I define hostComponent like this:
public var hostComponent:ImageButton
I get an error that there is a conflict with hostComponent:ButtonBase inside the ButttonSkinBase. How do I extend a skin AND provide a new hostComponent for it?
I am trying to create a FLV playback component (in Action Script 3) where the skin hides after the mouse is idle for a certain amount of time. I've read a lot of suggestions to set the skin to null (in action script)
[Code]...
TypeError: Error #1009: Cannot access a property or method of a null object reference.
As far as I can tell, there is no way to toggle visibility of the skin. The best I can do is turn the SkinBackgroundAlpha to 0, which does remove the background of the skin, but not any of the buttons or bars.
i have a sequence of buttons and each button has its own icon. I was wondering if I have to create a Spark skin file for each button in order to assign its icon.
View 1 RepliesI attempted to build a Flex 4 skin for a Spark button, typical practice. I adjusted the colors and other styles to my liking, including using dot selectors to specify alternate colors and such during different states. However, these are all ignored when the button is disabled. Regardless of what I do, in the disabled state, my button always has the wrong color and is alpha'd to 0.5 (even if I specifically state that alpha.disabled="1"). All the other skin states work as expected. This is my custom skin. If it were working correctly, it would appear to have no shadow or highlight, and would be a gradient grey color. Instead, it appears as a 50% alpha version of the up state (shiny green).
<?xml version="1.0" encoding="utf-8"?>
<s:SparkButtonSkin xmlns:fx="[URL]"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:fb="[URL]"
minWidth="21" minHeight="21" alpha.disabled="1">
[Code] .....
This is the code used to create and then disable the button:
_action1Button = new Action1Button();
view.actionGroup.addElement(_action1Button);
_action1Button.enabled = false;
The error was that _action1Button is not the actual button, rather, it's the container of the button. Doh! Switching it to _action1Button.actionButton.enabled = false; fixed the issue.
I'm trying to copy/modify the spark skin for the default button, but not sure how to find that skin. When I hover over <s:Button and Ctrl + Click it, it takes me to the Button class, but there isn't any skin information there.
View 1 RepliesHow can we embed the over,up,down etc skins defined as sybols in a .swf file... i mean in skin file how can i specify those symbols to be used as up,over,down skins.
View 1 RepliesI have a videoplayer with a custom skin class. I want to override the functionality of the fullscreen button. When I add an click event, the player still goes into fullscreen mode. How can I prevent the fullscreen event from firing?
View 2 RepliesI have tried to create an instance of Button class inside an itemRenderer element instance, but the button instance appears without its skin.
override protected function createChildren():void
{
super.createChildren();[code]....
I've created an button object in flash. The button contains 2 layers. One is the background image and on top of it is a textField. The textfield is dynamic. I use the button inside a movieclip and I export it in a SWC. The I'm trying to use it in flex.
I'm trying to do this:
var myComponent:MyComponent = new MyComponent();
myComponent.button01.theTextField.text = "Caption";
I get and instance of the button(myComponent.button01 is not null in Flex debugger), but the instance of the textField(myComponent.button01.theTextField) is null and I'm not able to change the text(but the default text appears onscreen). The code is compiled correctly in flex.
I exported the in swc the button control as well. So the button is not the default SimpleButton from Flash, but an derived class generated by flash(with the same name as the symbol defined in flash). It contains theTextField memeber, which is null.
Here is the button timeline(Layer 2 contains the textfield, and the textfield instance is named theTextField):
I am creating Dynamic Destinations
MessageBroker broker = MessageBroker.getMessageBroker(null);
MessageService service = (MessageService) broker.getService("message-service");
MessageDestination destination = (MessageDestination) service.createDestination("Group1");
[code].....
But I am getting Null Pointer Exception
MessageBroker broker = MessageBroker.getMessageBroker(null);
I have create a menu but when clicking on menu so that it shows, I get an error on the line because of the line "myMenu.show(null,null)". See function below:
private function createAndShowmyMenu():void {
myMenu = Menu.createMenu(null, myMenuDataProvider, false);
myMenu.labelField="@label"[code]........
I'm using the default CS4 FLVPlayback skin, mainly the SkinOverPlayMute.swf. I know there's a skinAutoHide option, but because I don't want it to auto play, I want people to see a play button when they first encounter the video (so they don't think it's just an image). But the skin needs to hide when the video is actually playing (so the video doesn't get blocked by the controls).
In other works - when video isn't playing: skin showing; when video is playing: skin hide.
I want to be able to target a button that is within the skin for a flvplayback component. This is my first real adventure with AS3 and..... (feel like I want to scream!)In the library for the skin I get "fl.video.skin.FullScreenButtonOnOver" and paste this into the main timeline with some code like this.
stop();
function edward(event:MouseEvent):void{ trace ("the button was pressed");}
fl.video.skin.FullScreenButtonOnOver.addEventListener(MouseEvent.CLICK , edward);
which comes back with the error "Access of undefined property fl" - which doesn't surprise me really.What do I do to target taht button
I am using a flvplayback component which I have attached to my own skin.
I want to be able to target the full screen toggle button since I can't get the fullscreen to work and others posts have led me to think that it might be better to code that bit myself.
For the skin fla the button that I want to get at has this written in the properties class box "fl.video.skin.FullScreenButtonOnOver"
I figured I might be able to get at this from my main timeline so I added the code below :
Code:
stop();
function edward(event:MouseEvent):void{
trace ("the button was pressed");
[Code].....
I am working in CS5/AS3 with an FLVPlayback component and a pre-made skin with some custom colors. It is a skin with the caption button included (SkinUnderAll to be exact). I'm using Timed-Text files for the caption content. The captions work just fine. All other buttons on the skin show up, but the toggle button isn't showing up.
I checked all of the linkage in the skin's FLA, checked the AS that creates the FLVPlayback and FLVPlaybackCaptioning objects. All seems fine there.
I've checked the paths and SWF locations to be sure all are in the right places.
I've also included a SKIN_LOADED event listener to get around the default captions-on issue. I'm just not seeing what the issue is. I'd prefer to not go back through my code and make a custom control panel with button components. Started this in CS3 and moved the file to CS5, so I'm not sure if there's something I overlooked in the documentation that spells this out.
I've skinned an hSlider's thumb with an image. But the image is pixelated, as though it's been forced to resize.It's just a pretty circle with a radius of 30 px.The other thing that happens is that instead of the new button being cleanly bisected by the track, it is just below the track, tangential to it. So now I have to reposition it by modifying its y value in SliderThumbSkin.mxml? And (presumably because its registration point is at upper left) when I slide it all the way to the right, it goes right off the end of the track until its left edge is at the track's right edge. This might also mess up calculations for the hSlider.value property.
You'd think you could just apply the skin and it would replace the button, but seems that both its position and size are being wrongly manipulated.Is the thumb's size automatically reset or resized somewhere? Is there a way to do this correctly and cleanly?
EDIT: Here's code for the entire test project:
//HSliderTest.mxml:
<?xml version="1.0" encoding="utf-8"?>
<s:ViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009"[code]......
I created a class in actionscritpt that extends the spark.components.Button, as I will be loading a bunch of buttons at runtime. I have a SkinnableContainer.mxml file that the spark buttons will be loaded into.When I use the addElement() method within that mxml file like so my custom skin for my button does not show.
[Code]...
I have an instance of the flvplayback component in my movie. I have the player skin set to "autohide" and "autoplay" set to false. Instead of having users click on the play button of the skin to start the movie I have incorporated a larger play button in the middle of the screen. The set back here is that when a user mouses over the movie to click on the larger play button the flvplayback skin appears as well.
I'd like to basically tell the skin "Hey don't appear on mouseover until AFTER the large play button is pressed." What code would I need for this in Actionscript 3?
My client wants SteelExternalAll as the skin for her swf. It's not on the skinning menu in CS3. Is it possible to download it somewhere?
View 2 RepliesAny way of building in a fullscreen button right into the skin of a video player using actionscript 2? Or perhaps have access to a source file? I've seen the skins with fullscreen with AS3 with CS3, but I need tut on skins with fullscreen using AS2.
View 1 RepliesI've added a "Close" button to my skin here: [URL]. Please click on "Animalia - Verse From The Zoo" to load the Skin. The "Close" button I've added to the skin is not doing anything. I want the "Close" button to close everything - the skin and the FLV - so that you're back to the five icons. Clicking on "Animalia" successfully uses the AS3 LOADER CLASS to load the Skin and FLV. The AS3 code which successfully loads the skin when you click on "Animalia" is:
// ANIMALIA video LOADER
var AnimalLoader:Loader = new Loader();
Animalia2.addEventListener(MouseEvent.MOUSE_DOWN, loadFromAnimalia);
function loadFromAnimalia(event:MouseEvent):void {
addChild(AnimalLoader);
[Code] .....
I copied the SKIN FLA file from the FLASH CS4 AS3 FLA SKINS FOLDER and built the "Close" button myself. And I've also added:
this.Close_Animal.x = 126;
this.CloseButton = "flash.bleah";
To the Skin FLA.
Which seems to have made the "Close" button appear at runtime. Flash won't accept any of the pre-programmed "fl.video" classes for the "CloseButton". And my knowledge there is lacking. IF that's the reason the close button is not working, I'm not sure. Any way to make the "Close" button on the skin close EVERYTHING (Skin AND FLV - so that you're back to the five icons as they were BEFORE you clicked "Animalia")?
I am relatively new to Flash CS3. I need to create a video file add a skin and put a voice over or background music. I have done all of it but I have a problem with the skin. On the skin there is a volume button for the video. How can I mute or control the volume of the video? Just like in youtube for example. You can turn it up or down. What is the code for it? Because when I click on the button to mute ir or turn it down it doesn't do anything to the volume. I had a separate video and a song but I went to Windows Movie Maker and associated the song with the video so now it is a whole: video with a song. So basically I just want to know what I need to do in order to control the volume of the video.
View 1 Replies