Flash :: Flex Custom Component Won't Resize?

Apr 5, 2011

I am trying to create an expanding object with the following event handler

public function pickerMove(e:MouseEvent):void {
trace("in mouse move");
var offsetX:int = e.stageX - touchX;

[Code]....

Is there something that I don't know about custom components resizing?

View 1 Replies


Similar Posts:


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

Flash :: Flex Custom Component With More Inside?

Apr 14, 2012

I am creating a custom component in Flex with extends the BorderContainer class, and I would like to be able to place additional content within the tagset when I use it in my main application, like this:

<components:CustomComponent title="Hello">
<s:Label text="If you have one enter it below:"/>
<mx:Spacer height="15" />

[Code]....

This works just fine, except that my component definition had some additional things inside of it, such as a <s:Label/> and styling, which is replaced by the content within the tagset above when I go to use it.

If I do not put anything within the tagset, the content that was originally in the component is not replaced.

Is there a way that I can simply append additional content inside of the component when I go to use it, instead of it being replaced each time?

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 :: Flash - Which Container Is Mostly Used For Load New Custom Component

Jul 28, 2009

In AIR application i have link button like winner statistics . if i like this button then show winner statistics (canves) reports full page on my application . I Already created winner statistics using canves component .Which container is mostly used for view data ?
Please refer me ? i tried viewstack but it will overwrite Main page ?

View 1 Replies

FLEX :: Flash - Component Not Receiving It's Own Custom Event?

May 10, 2011

I made a movieclip in flash that dispatches a custom event: MyEvent.THE_TYPE = "the_type"in flex I have: <local:my_flash_mc the_type="do_something()"however, this is not working.in flash, my event bubbles is set to true. everything works fine in flash.in flex I am NOT using:

<fx:Metadata>
[Event(name="the_type", type="...")]
</fx:Metadata>

[code]....

View 3 Replies

Flash :: Events Not Firing In Custom Flex Component?

Jun 24, 2011

I'm taking my first stab at writing a custom flex 4 component by extending the UIComponent class. Unfortunately, I cannot get the component to respond to any sort of mouse events.I've tried setting mouseEnabled to true is the component, as well as setting mouseChildren to true in the parent (the stage object). It seems whatever I do, my click events can be detected from the stage, but not with the component.Here is my component class:

package components {
import mx.core.UIComponent;
public class DrawCanvas extends UIComponent {

[code]......

View 1 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

Flex :: Passing Properties To Custom Component In Flash Builder 4

Sep 7, 2010

I'm trying to pass some properties to a component I've created in Flash Builder 4. In my example below I want to pass the "label" property to update the label property of the Button.

// MyApp.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="[URL]"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:local="*">
[Code] .....

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 :: Custom Flex/ UIComponent Keeps Getting Painted Multiple Times During A Resize?

Nov 19, 2010

I've created a custom uicomponent and whenever the browser or its specific container is resized, a repaint occurs but the contents of the component get drawn again and again and again...So, if I move the container I'll end up with multiple circles drawn on top of each other but offset depending upon where the container is when the repaint occurs.My updateDisplayList code is below.Do I need to do some sort of clear so that it doesn't contiuously getting duplicated like this?

override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
super.updateDisplayList(unscaledWidth, unscaledHeight);
trace("height: " + parent.height);
trace("width: " + parent.width);

[code].....

View 1 Replies

Actionscript 3 :: Flex Component - When Resized, Resize All Inner Components?

Dec 10, 2011

My component has lots of inner components.When i resize the container component (panel), i want all inner components resize with same ratio. Which function should i use?

View 1 Replies

Flex :: Forcing A Child Component To Resize Itself Larger Than Its Container?

Mar 29, 2010

I am creating a component that displays a variable amount of "gauges" (square tiles of content if you will), that is laid out like so:

<HDividedBox id="container">
<VBox id="myComponent">
<HBox id="header">

[code]...

View 1 Replies

AS3 :: Flex - Auto-resize The Width Of A Spark Dropdown Component?

Nov 29, 2010

in flash builder 4 how do i use the skinning option to make sure the popup dropdown list changes it's width to fit the longest item in the list?(the prompt area - the component when it is closed - should not change it's width)

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

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 :: Resize An Entire Air App AS IS - Ignoring Component's Positions And Sizes Logic - Like Zooming

Dec 5, 2010

i have written an air app which is fixed in dimensions: 1000 w X 800 h i have set the resizable and maximizable tags of the app-xml to false, to prevent the user from changing it's size. this app looks and interacts perfectly at these dimensions but not at other: it has "bad" coding techniques in it like hard-coded display sizes and such, rtl and ltr combined layoutdirections and so forth...

when the applicationComplete event dispatches, i check Capabilities.screenResolutionY and if it is less then 800 i want to resize the app programatically (preserving the width/height ratio). i have tried all the StageScaleModes and tried changing the dimensions of the stage, the nativeWindow, the app itself("this") and so on in every combination.

i am looking for a way to resize the entire app as is, meaning i dont want to use display logic of the components and such, just to "shrink" or "expend" the whole app as is, with hard-coded pixel amounts to change within the logic of the app accordingly (change all sizes, locations, fonts etc.. in sync) the app should look and work exactly as it did in it's 1000x800 default size, only smaller or bigger

View 2 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

Flex :: Load My Own Custom Component Into An AIR Application?

Jul 23, 2009

I created separate own canvas component for Home page, Contact page, Rules page etc.In my main application it has link button like Home,Contact,Rules in application controller(child state) . [code]...

View 1 Replies

Actionscript 3 :: Flex Custom Button Component?

Aug 17, 2009

I want my custom button to look like the button sample below. More specifically, I want the width of the button to be determined by the width of the largest word in the label (i.e. width of "Elongated" in my example). The label must wrap, not truncate. And I want only one pixel between the top edge of the icon and my button's top edge. I have tried lots of things but to no avail so far. I have reduced the horizontalGap and verticalGap to zero and padding to zero. But still nothing.

[Code]...

View 2 Replies

Flex :: Passing Array To Custom Component?

Oct 18, 2009

I created a custom button component that accepts an array as a property. I set the property as follows:

titleDims="[{Month: comboBox1.text, Year:comboBox2.text, Sales Order:comboBox3.text}]"

and I get the following error:

"1084: Syntax error: expecting rightparen before colon."

Wat is wrong with the array syntax?

View 2 Replies

Flex :: Write Events For A Custom Component In It?

Jan 4, 2010

I have written a custom component for drawing a circle in Flex. But When I try to write a click event or mouseDown event for that component, it doesn't work.[code]...

The "Hello" Alert is displayed only at a particular point and guess is, at the point, (175,150) the x, y co-ordinates of the circle. But shouldn't it be displayed wherever I click on the MyCircle component?? how to enable it in that way?

Also the mouseDown function doesn't work for MyCircle,but if have the event for the VBox, the Alerts are displayed.

View 2 Replies

Flex :: Draw Overlay In Custom Component?

Jan 29, 2010

How would one create a custom MXML component in flex which is based on an existing component but draws an overlay over this existing component in certain situations.

Ideally, the new component should be based on (derive from) the exiting component so that occurrences of the existing component could just be swapped out with the new one.

I tried to override updateDisplayList() in the new component and to paint the overlay using this.graphics. This resulted in the overlay being drawn underneath the children of the existing component. I also tried to do the drawing upon receiving a render-event which lead to similar results.

When the external condition which should trigger the display of the overlay changes, I call invalidateDisplayList() on my new component. That works to trigger the drawing for both cases described above. The remaining problem seems to be to figure out how to draw on top of all the other components once they are added.

The following example should illustrate what I tried to do; when overlayEnabled was set and the component's invalidateDisplayList() method was called, the red rectangle would get painted in the background.[code]...

View 1 Replies







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