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


Similar Posts:


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 :: 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

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

Flex :: Flash - Make A LinkButton Selectable?

Aug 26, 2010

Is it possible to make a LinkButton selectable? That is, the text from the LinkButton can be selected and then copied. LinkButton does not have the selectable property.

View 1 Replies

Flex :: Make Background Fades When A Custom Component Is In Focus

Mar 26, 2010

I created a custom component that is a s:SkinnableContainer. I want the background and other items to fade out when this component is visible. Something similar to what happens when calling Alert.show(..) so the Alert box is in focus and everything else is faded out.

View 2 Replies

Actionscript 3 :: Make A Custom Auto-complete Component In Flex?

Nov 30, 2010

I need to make an auto complete component in flex that fetches the auto complete results from a remote database using a webservice. I have the webservice and querying part worked out. I've already made custom components in action script by extending VBoxes. However I cannot figure out how to generate the popup window that is supposed to show under the text input in my auto complete text box.

[Code]...

View 2 Replies

Actionscript 3 :: Make A Custom Method That Takes An Arbitrary Flex Component As An Argument?

May 15, 2011

I'm trying to write a custom fadeTo(component, x, y):void method, which takes an arbitrary Flex Component as an argument and moves it to a given location, but smoothly.

The problem I'm running into is the following.

I want to send the component itself as argument, like this: (using Button as an example only)

fadeTo(myButton, 200, 500);

(this should move myButton smoothly from its current position to the position indicated as parameter)

However, I don't really know what type an arbitrary Flex Component is. How should I handle that?

View 1 Replies

Flex :: Make PopUpManager Correctly Show Custom Component Based On Spark TitleWindow?

Jan 28, 2011

I use this code to create and show a MessageWindow:

var newTitleWindow:MessageWindow = PopUpManager.createPopUp(contextView,MessageWindow, true) as MessageWindow;
newTitleWindow.text = message;
PopUpManager.centerPopUp(newTitleWindow);

[Code]....

There is no nested components displayed when I run my app.

The debugger shows they are created and visible.

To my "amusement" the components are shown when I replace s:TitleWindow with mx:TitleWindow.

I really want to use spark TitleWindow.

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

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

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 :: 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.0 :: Make A Custom Image Loader Component?

Nov 14, 2008

I want make a custom Image Loader component.

View 1 Replies

Flex :: Url - Use The @ContextRoot In A Button Or LinkButton?

May 13, 2010

I'm trying to create a button that will simply link back to the context root. I noticed flex has a @ContextRoot attribute that appears to work only in certain cases. For example, if I try to use it in the following mxml:

<mx:Button label="Back to Root" click="navigateToURL(new URLRequest(@ContextRoot()), '_parent')"/>

I get the following error: Error: Attributes are not callable.

View 2 Replies

Flex :: Disabled The Doubleclick In Linkbutton

Nov 24, 2010

when i doubleclick on the linkbutton its still working i dont know even though i have made linkbutton doubleclickenabled property =false too.

View 1 Replies

Flex :: Enable (open In A New Tab) For LinkButton?

Sep 13, 2011

I would like to enable the (Open in a new tab) option when a user right clicks a mx:LinkButton, take the address that linkbutton is supposed to go to and allow the user to click on (open in a new tab) and get to that address in a new tab. Is there an easy way to do that.

View 1 Replies

Css :: Flex 4 - Create A Custom Css Value For A Component

Nov 5, 2009

is there any way to create a custom css value for a component and have it available to the skin class that component is using? for example, if i define this in a css file:

[Code]....

is there a way to make myCustomValue available in the PanelSkin ?

View 3 Replies

Flex :: Event In A Custom Component?

Sep 11, 2010

I'm just getting started with custom events in a custom component. And I don't quite have the hang of it, yet. I've got a component with a button in it. When it's clicked, I want to call a function in the main app.

Custom Component:
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" >

[code].....

View 1 Replies

IDE :: Flex Application As Custom UI Component

Dec 22, 2009

I'm making a UI for a component in Flash. I wanted to use Flex and have had no luck getting the onUpdate exernalInterface call to fire properly. I'm referencing the functionality described here: [URL]. First off, I can't embed the SWF in the FLA. It just won't start the Flex SWF. Even using the external swf, it seems that the onUpdate function is either called too early or not at all. Here's what I've tried:

Tying the externalInterfce declaration to the initialize, preinitialize, applicationComplete, and creationComplete events. Sub-classing my application and putting the externalInterface in the constructor. Neither of these options work. When I create a basic AS3 project in Eclipse and put the externalInferface in the constructor, it works as expected.

View 1 Replies

Actionscript 3 :: Create Custom Flex Component In Flex 4?

Sep 6, 2011

I need to create custom component like [code]...

Here, I need to create custom component object, changing their element values and appending that custom component in VBox. What are the correct syntax to implement this one?

View 2 Replies

Flex :: Use A Remote Image As Icon For A LinkButton?

Jul 9, 2009

We are creating a LinkButton programmatically and would like to set it's icon to an image retrieved from the remote server rather than something embedded within the SWF. The .icon property expects a Class but I can't figure out how to create one equivalent to an @Embed but from a dynamically generated URLRequest or URL String.[code]...

View 5 Replies

Flex :: Get Linkbutton Label Name And Selected Row Of Datagrid?

May 12, 2011

i am using below code for using linkbutton in flex datagrid

<mx:DataGridColumn headerText="Case ID" width="80">
<mx:itemRenderer>
<fx:Component>

[Code]...

now on link button click i want linkbutton label name and selected row inside lnkCaseIdClick method, how can i do this?

View 2 Replies

Flex :: Access Linkbutton Outsid Datagrid?

May 13, 2011

I am using this [code]...

How can I access lnkCaseId outside the datagrid?

View 1 Replies

Flex :: Extend A LinkButton To Allow HTML Text?

May 26, 2009

I am feeding the label to my LinkButton directly from a string I receive from a Google API that puts html to format the label.

I want to extend linkbutton to allow this. I wrote a class myself to allow html text for the label and that aspect of it works but now the background that appears when you hover is way too big. I tried to override measure() to fix this but I didn't have a clue how. Here is the class I wrote:

package com.kranichs.components
{
import mx.controls.LinkButton;
public class HTMLLinkButton extends LinkButton

[Code].....

View 1 Replies

ActionScript 3.0 :: How To Use Flex Custom Component In Class

May 27, 2009

Our software team has been developing flash applications using AS3 (via the FlashDevelop IDE and the free Flex SDK). Recently, some members of the team started exploring FlexBuilder and Flex (wow... why did we wait so long?). The problem is that some folks continue to develop using pure Action Script 3 (FlashDevelop) while others are creating custom components in FlexBuilder. How do the AS3 developers use the Flex Custom components built in FlexBuilder in their AS3 Applications?

View 7 Replies

ActionScript 3.0 :: Flex - Custom Component (swc) Won't Display?

May 29, 2009

I used a FlexBuilder Library Project to create a custom component library (swc). The custom component is a control bar with text fields and buttons, etc.The vast majority of our team's code is done in pure AS3 I've successfully included my new SWC in the lib and build path in our AS3 project.I've also successfully instatiated an instance of my custom component, but for some reason, it will not display. I know it exists, because 1) the compiler had no complaints, and 2) I can trace property values of the custom component and get valid output from the trace statement.

trainer.games.board.MatchThree {
import flash.display.Sprite;
public class Test extends Sprite{

[code].....

View 5 Replies







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