Flex :: CommitProperties In A Custom Component Doesn't Work With Percent Width

Apr 1, 2011

I'm creating a custom component (based on ComboBox) and overriding some base methods. Recently I've found it acts weird when I set it's width in percents, rather than a fixed width. It tends to continuously call the commitProperties method and fail in the end. When I set it's width to fixed value - all works like a charm. What am I missing to implement? Here's some code ..

override protected function commitProperties():void {
super.commitProperties();
//some stuff ...

[Code]....

View 2 Replies


Similar Posts:


Actionscript 3 :: Flex Calendar Component Lifecycle: ValidateNow - ValidateDisplayList - InvalidateDisplalList - CommitProperties

Nov 4, 2009

I am extending VBox to make a Calendar component. What method should I override to add the code to draw itself? What is the difference between all these methods? Is there something I should be putting in each one, or is there a specific method I can just override, add my drawing code, and have it work?

View 5 Replies

Flex :: Extending Panel : Calculating Title's Width In Custom Component?

May 28, 2011

I'm extending the Flex 3 panel component. I need to figure out the width of the title's text. Because, title is a private variable in panel, I can't access it via title.width.I know the font, fontsize (14), and length of the title (which will vary). Knowing this info is there a way to calculate how many pixels wide the title is?

View 1 Replies

Flex :: 4 - Component Move Event Doesn't Work

Apr 6, 2010

I have a CustomTextInput component based on TextInput (Spark) component. The instance of this class is placed on a popup window (TitleWindow). How can I capture the popup move (dragging the title) event inside CustomTextInput implementation?

MoveEvent.MOVE event of the CustomTextInput itself doesn't work. Of course, I can't access the parent popup window inside the component implementation, because it's a common component that can be used not only on the popup windows.

View 1 Replies

Flex :: Make This LinkButton Custom Component Work?

Apr 5, 2010

package {
import mx.controls.LinkButton;
import flash.text.TextLineMetrics;[code]....

my issue here is if you use this component you will see that the text is bunched up into a very small area. It does not fill the entire width of the linkButton.

View 1 Replies

Flex :: Why Wouldn't A Flex Remoteobject Be Able To Work Within A Custom Component

Mar 31, 2010

I have a remoteobject within my main.mxml.I can call a function on the service from an init() function on my main.mxml, and my java debugger triggers a breakpoint.When I move the remoteobject declaration and function call into a custom component (that is declared within main.mxml), the remote function on java-side no longer gets called, no breakpoints triggered, no errors, silence.[code]

View 2 Replies

ActionScript 3.0 :: Width Doesn't Work - How To Make It Work

Apr 21, 2010

I have a button object that I need to scale to align with the variable width of an array of images.However, when I set the width in code, the button does not actually become that width. Tracing out the width gives me the correct value, but on screen.. it's off.

I've proved it to myself by scaling the same button object manually in the properties pane and visually comparing. Both of the buttons below have a width of 410.

Code:
navigatorDown_btn.width = 410;
navigatorDown_btn.x = (stage.stageWidth/2)-(navigatorDown_btn.width/2);
trace(navigatorDown_btn.width); // output: 410

View 4 Replies

Flex :: Spark RichEditableText Word Wrap With Percent Width And Fixed Height?

May 11, 2011

I know this question has been asked before but the other solutions didn't work for me quite well. here's my sample application.

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"

[code].....

View 1 Replies

Actionscript 3 :: Flex 4 Disptaching Custom Event From Custom Component (why Flex Converting Custom Event To Mouseevent)?

Mar 2, 2012

This is NOT duplicate of my earlier post (its is slightly different)But this is similar issue with similar error but its not the same error The error I am getting now is below while dispatching the custom event from my custom component

TypeError: Error #1034: Type Coercion failed: cannot convert events::MapEvent@a74ab51 to flash.events.MouseEvent.
dispatchEvent(new MapEvent(MapEvent.CLICKED_ON_MAP));

Note: The error in my earlier post is giving below error message

Type Coercion failed: cannot convert flash.events::Event@81ecb79 to com.events.ShopEvent

The difference here are two things, the earlier error is while converting flash event to custom event and now this one is while converting custom event to flash event and secondly, I have no clue why it is trying to convert to the mouseevent where I am just dispatching my custom event with proper listeners.

This is my custome event

package events
{
import flash.events.Event;
import ui.map.MapElement;

[code]...

View 1 Replies

IDE :: Scrollbar Component Doesn't Work With XML?

Jan 22, 2008

I created a dynamic text box that links to a xml text document. I've also added the Scrollbar component to the text box. It scrolls fine in preview mode...but once I upload the file, the scroll bar becomes disabled.

View 1 Replies

Professional :: Import Of Custom Class Doesn't Seem To Work

May 30, 2010

OK, I have my custom class defined in a file called "rootInstace.as". This is what it contains:
 
[Code]...

View 3 Replies

Actionscript 3 :: Custom Cursor Event Doesn't Work?

Mar 27, 2010

the custom cursor is a sprite. using it to click another sprite no longer triggers the MouseEvent.Click event. it looks like my custom cursor is being clicked on the sprite i want to click

Is there something i need to enable?

View 1 Replies

Flex :: Force All Item Renderers To CommitProperties?

Mar 5, 2010

I have an item renderer that checks an external source for display information. If that information changes, I want to force all item renderer instances to check it.

What's the best way for force all the item renderers in a list or grid to either commitProperties or execute some other method?

I've read that resetting the grid.itemRenderer property will make them all initialize. I've also received the suggestion to iterate recursively through all the grid's children and call invalidateProperties on all the UIComponents I find.

View 2 Replies

ActionScript 3.0 :: DataGrid Component Scrollbar Doesn't Work

Dec 12, 2009

Trouble with my DataGrid component (aDg), i want to tell it to got a fixed height, and then have a scrollbar when the lines into the Datagrid are biger than its height, but with this code, it doesn't work, the grid continues to get bigger without scrollbar :

[Code]...

View 1 Replies

Flex :: Put Custom Code In A Custom Component In Flash Builder?

Dec 11, 2010

In the main file, I would write[code]...

But if I want the component to have that behaviour innately, where do I write it in the mybutton mxml file to have it reference itself?[code]...

View 2 Replies

ActionScript 3.0 :: How To Make MC Width 100 Percent With Tint

Nov 18, 2010

I'm fairly new to flash especially AS3 and I'm trying to make a MC width 100% with the color changing (tint) but I want the rest of my content to remain a fixed size/non scalable and centered. I've seen this tutorial [URL] but don't have a clue where to start.

View 1 Replies

ActionScript 3.0 :: Same Video Component To Play Back Flv Doesn't Work

Jun 5, 2011

I am using Video (actionscript-controlled) component in my videoRecorder swf. What it does is it connects to webcam, record the video. This works fine. The problem comes when playing the flv back.After user stops the recording, I am using the same video component to play back the flv. But, it doesn't work. Checked the url, and its fine.When I use the same flv url in any flv player, the video gets played back. Am I missing something? Or Video (actionscript-controlled) can't handle playback videos?[code]

View 0 Replies

ActionScript 2.0 :: Placing A Video Component Into The File And It Doesn't Work?

Sep 3, 2009

using an old file that utilizes actionscript 1.0. I tried placing a video component into the file and it doesn't work. This leads me to believe I need to convert my old actionscript 1.0 to at least 2.0. The old actionscript simply moves a movieclip at certain intervals when the play button is pressed or the slider bar is dragged. When I exported the movie using 2.0, the following errors occurred in the compile errors box.Here is my actionscript that causes these errors.

[AS]
// playhead button coordinate
trace(_root.playheadBtn._x);
// playhead button moves strip[code]......

View 3 Replies

Actionscript 3 :: Make A Custom Flash Component Work With Any Font?

Jun 21, 2011

So we have a component we have written ourselves that deals with text display and translation between languages, reading translations from a file. Ideally what we would like to do is have this component be compatible with any font we can embed in the main .swf's library. What's the best way to do that?

Currently we are going down the route of having our component have an attribute for the font name, lets say 'Font1'. We drag the component into the .FLA file we want and then add a new font to the library called 'Font1' and set it to the typeface we want. This is proving to be inconsistent and problematic which implies it's not really an ideal way of doing it.

Is there anyway to achieve the feature we want? The key is flexibility, we want to easily support languages (hence the component) but we don't want design to be limited in their font selection. Its not practical to embed a range of fonts in the component for example, as it adds to file size and is restrictive.

View 1 Replies

Flex :: Make A Custom Component Or Extend The List Component For A 2D Top Down View MAP ?

Nov 11, 2010

I'm building a top view 2D map, that it's objects are stored on the server.The kind of objects are 10 and might be a photo, label, button, lists, mix of them or labels with tooltips.The component must request the "areas" that are missing on screen.An area is 1000x1000 px and is cached in flex.To move in the map, will be like in google maps (drag-and-drop).I should be able to have another list and move objects from one to another using drag-an-drop on objects. Ex.: I grab an objects from a list and I move it on this map, I release the mouse button and the item is placed there.Now the problem is: I build a custom component for this trying to emulate the item renderer for performance and recyclage, implement drag-and-drop on objects and request the areas that are missing?

or

I extend the List component from spark and I add some features as multiple kind of itemrenderers and use recycle on them. Of course it must be able to request the missing areas on the screen and cache it's data.Maybe create a custom layout is needed too.What I need is something that must be really fluid, so the lighter this component is, the better.

UPDATE: *There will be not any object over another.

*I will not use hitTest on bitmaps because all bitmaps are wrapped in another component,as they,for now are itemrenderers.

Anyway I already begin to do this using a class that extends the SkinnableDataContainer and a custom layout. As the layout is not like a grid, is sparse, random items at diferent points(x, y).How to get the localX and localY, relative to item renderer and not to the Spark List, from a DragEvent in Flex 4?

View 1 Replies

Flex :: Dispatching Custom Event From A Custom Component?

Sep 8, 2011

I have a custom Flex 4.5 component (to be used in a List) -

Game.mxml (represents a clickable playing table in a card game):
<?xml version="1.0" encoding="utf-8"?>
<s:ItemRenderer [code].......

But I never see the "game clicked: " trace. Does anybody please know why? I'm probably missing something minor, because I can see the "Clicked: 8946" trace.

View 3 Replies

Flex :: Disptaching Custom Event From Custom Component?

Feb 16, 2012

This is similar to the question asked here. I am dispatching custom event "ShopEvent" but i am getting error "Type Coercion failed: cannot convert flash.events::Event@81ecb79 to com.events.ShopEvent"Note: Error is thrown from the parent custom component (3rd code snippet), I have added more details thereThis is my custom event. See the first constant, I copy pasted the event name in custom components.

package com.events
{
import flash.events.Event;

[code]......

View 3 Replies

Flex :: Define Custom 'contentGroups' In A Custom Flex 4 Component?

May 12, 2010

The spark panel component for example can be written like this

<Panel title="Skinny">
<child components ... />
<controlBarGroup>
<child control bar components ... />
</controlBarGroup>

[Code]...

The motivation here is that I can now create a couple different skin files to change the look and layout of those subgroups. Reading source of the spark panel, there are some calls within the mx_internal namespace such as getMXMLContent() which is a method of the spark group component, but which I have no access to.

Does the description above make sense? How can I create custom 'contentGroups' in my custom Flex4 component that can use nested mxml child components? Should I approach this a different way?

View 2 Replies

ActionScript 3.0 :: Button Remove Content Of UILoader Component (doesn't Work)?

Jan 30, 2010

I have a problem with the Home button. I want to disappear content of the 3 UILoaders components that I have on stage.I try to use the method removeChild(UILoaderName) but it doesn't work. This is my code:
 
function goStart(event:MouseEvent):void
{
gotoAndPlay(200);
count=1;
removeChild(central);

[Code]...

View 3 Replies

Android :: Flash Player Doesn't Work When Setting A Custom User Agent In WebView

Jun 20, 2011

I am trying to use the Flash + Set the browser to a desktop agent on the Galaxy Tab.

mWebview.getSettings().setUserAgentString("Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.11) Gecko/20101019 Firefox/3.6.11");
mWebview.getSettings().setPluginsEnabled(true);

So the issues is, when the UserAgentString param is enabled, flash player wont load as many websites like Iplayer don't recognise the browser in the WebView.

This may be a bug in the Samsung browser. Anyone have any desktop agents that the WebView will accept whilst enabling flash?

View 1 Replies

Actionscript 3 :: Why Won't Visual Elements Display Inside Custom Component Extended From Another Custom Component

Sep 6, 2011

I created a custom MXML component, TurboContent, that extends the NavigatorContent class:

<s:NavigatorContent xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">

[Code].....

In this case, the 'myButton' component never shows up, but all the elements of the base component do (3 buttons and a datagrid).

View 2 Replies

Actionscript 3 :: Flash - Scale Pixel Width And Height By Percent For Fullscreen?

Jun 10, 2011

How does flash scale for fullscreen?For example, if I draw a shape and give it a width and height of 100px (square)...does that scale up proportionally when the flash is made full screen? Or does that object stay 100px x 100px?

View 2 Replies

Flex :: Get Width Of Dynamically Created Custom Uicomponent?

Jul 15, 2009

I have some custom components, that derived from UIComponent. I overloaded the updateDisplayList so they have custom look. I've created a layouter that lays out these custom components, but to place them correctly, I have to know the custom componets width, height. They are created dynamically. After all of them created (creationCompleted event fired for every), i try to laying out them, but width/height property is still 0. I am also tried to add them to a canvas, before the layout process.

how to create custom UIComponent that placed dynamically, and get to know the width and height of it.

With the use of the mx_internal namespace I can set width and height (using the internal $width and $height fields), and it looks like it is working. But not so clean/good solution.

View 2 Replies

Flex :: Limit Width Of Custom List Itemrenderer

Jul 23, 2009

I'm using a custom itemrenderer to display a list of photos and need to know how to control the width. At the moment it does this: Which, as I'm sure you'll agree, is eye-bleedingly ugly. The list is created like this:

[Code]...

View 3 Replies

Actionscript 3.0 :: Preloader Doesn't Show Percent And Scale Of Progress Bar

Jun 13, 2011

I used the preloader AS3 found here and it work fine localy but in firefox 4.0.1 it doesnt show the percent and the scale of the progress bar.
is there an issue ?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved