ActionScript 3.0 :: Can't Get TextArea To Take Focus Skin
May 9, 2011
I can't get my TextArea to take the focus skin which I did in the mxml skin file below. Can anyone help me with this. Note that in my application css file I have specified the focus skin as such :focus-skin: ClassReference("skins.focusSkin");
I've wrote a custom itemrenderer for a List component (Flex 3.5) which is a VBox with a Label and a TextArea wrapped inside. All works fine so far but I want the TextArea in the first itemrenderer to receive focus so that it instantly becomes editable when tabbing onto the List. Is that possible and if how would I achieve this?
I've already added an event listener that selects the item at index 0 but the textArea in it should also be focussed at that moment _list.addEventListener(FocusEvent.FOCUS_IN, onListFocusIn);
private function onListFocusIn(e:FocusEvent):void { _list.selectedIndex = 0; }
I'm using Flash CS4. Everything functions as it should when CS4 previews the swf after compiling it. However, after embedding the flash item in a webpage, if the textArea loses focus within the flash piece, the textarea's built-in UIscrollbar resets to the very top. Here's the kicker: if I add a FOCUS_OUT event listener to the textArea to store the current scrollbar value, I find that the scrollbar value has been reset to minimum even before the FOCUS_OUT event is triggered! WTF? I think this is occurring because the textArea's htmlText propery is dynamically populated. Adobe AIR has advanced methods for handing HTML, but not simple AS3, oh no. How obnoxious. What can be done?
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'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 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?
How 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.
when i have this line active(the red one) it gives me automatic focus, so no clicking to be able to detect key input so i got that going for me which is nice BUT when i have it active(not commented out) i get this big yellow line which goes away when i click it(seeBelow)
Unfortunately, when I start placing text in this text area. Either through code or user input, the text will be placed on a new line after about 80-100 pixels. Yet I want it to start a new line after 320 pixels (it's length).
Is it possible to save text of textarea in some variable or so and with its textformat (more than one color) and then reuse it to replace text in textarea?
I tried saving htmlText of textarea but the problem is when i replace it in textarea <p> tags causes problem.There will always be another extra line.
Is it possible to save text of textarea (flash 10, as3, cs5) in some variable or so and with its textformat (more than one color) and then reuse it to replace text in textarea?
I tried saving htmlText of textarea but the problem is when i replace it in textarea tags causes problem. There will always be another extra line.
If anyone wants to view p tags problem try following. Just click on text and then move your down arrow key, cursor will go to next line.
I just cannot get the skin controls to show in my movie [URL] as you can see the skin is there -[URL]swfit's also in with the flash movie here -[URL] I just can't get it to show up! I've tried setting the "CustomURL" for the player to[URL]
I have a couple of video clips loading to the stage via loadExternalMovieclip. The video clips were imported FLV's, given skin styles, and exported as SWF's. When I open the SWF's directly in FLash Player, all is well -- the controls appear and work fine. But when they are loaded into an empty, placeholder MovieClip, the skin does not appear![url]...
I have imported a video and all seems to go swimmingly, on publish to swf it appears as i would expect but the moment i view it in the html file the play back skin drops off?
I have created a flash movie with a video in it. I used a skin when I imported the video. It plays fine in Flash. When I export the .swf file and drag it into Dreamweaver the skin does not show up.Once in Dreaweaver I set the parameters to wmode_transparent.If so how do I go around it b/c I will need it transparent.
On my air application I'd like to create chromless nativewindow but I don't find how to do that.Indeed, I success with window but with this component type each window appear on Wndows taskbar, so I must found how to do the same (skin, maximise, reduce, move...) with another component.
I am creating my own skin for the FLVPlayback component. I coped an existing one, renamed it and made some changes very easily.
However, I want my player to have fewer buttons. I had a go at removing some buttons from the layout_mc but when I published I found that the buttons I had taken out were appearing in the video playback area of the stage (I'm not really surprised it didn't work because the manuels say that layout_mc isn't actually put onto the stage at runtime, its just used for working out where things will go...)
ANyway, how to I successfully delete a button such as the fast forward
I'm using dynamic text for my site and the UIScrollBar but i want to change the skin of the scrollbar. It is very old school looking. I want something more like they have in the link below: [URL]
I have an elearning course, a .swf, that loads multiple .swfs as the user progresses through the course. At the end, there is a quiz. The quiz.swf uses the radiobutton component. I have developed some custom skins to use on the radiobutton component. I have figured out that:I have to add an instance of a radiobutton in the main .swf for the radiobuttons in the quiz .swf to show.I have to copy the radiobutton intance from the quiz swf library to the main swf library if I want my custom skins to show in the quiz swfWhile, this works fine. It is not practical. I want the quiz.swf to more modular. So I can pop it in to any course and not have to go back in and add the radiobutton skins to each course.
My client wants SteelExternalAll as the skin for her .swf. I have CS3 and it is not available from the skinning menu, though I know it's supposed to be there. Is there someplace I can download it?