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
Similar Posts:
Nov 18, 2009
why a ComboBox component wouldn't work if it's in a movieclip brought in with attachMovie? When I click on the combo box, the menu drops down like normal, but no matter what I click on, it goes blank. Just spent a lot of time searching the net for an answer, found a few suggestions but nothing has worked.The combo box works fine if it's placed on any timeline in my main movie, but when it's in a movieclip that is attached with attachMovie, it stops working.
View 2 Replies
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
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
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
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
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
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
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
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
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
Mar 17, 2011
I am using a custom component at the top of my application that includes an image and a buttonBar. I have the namespace declared in main.mxml as comps and the package is components. When I assign the dataProvider to the buttonBar and run the application, all I get is a blank page. If I remove the dataProvider everything loads fine. the dataProvider is supposed to be the ViewStack component I have in the main.mxml. The buttonBar and image custom component is TopNav.mxml
The problem is that my TopNav component does not know the dataProvider I am asking it to change; MyViewStack. Do I need to create a public viewstack variable and pass it to the component?
View 1 Replies
Mar 16, 2011
im trying to output my database information in a text input field in flex by using remoteObject(cfc). The information is being provided by a database using a query and an array collection. I'm just unsure how i go about taking the queried array collection information and display it into TextInput Fields.
[Code]...
View 1 Replies
Jul 28, 2009
I've been able to avoid this issue by avoiding overlaps or breaking the top layer down to a bitmap but in this particular design I need to have overlapping buttons. Previously if I had an MC overlap a button (cs3/as3) the button wouldn't work so in this design I made sure the hit areas weren't overlapping and the buttons do indeed work. Problem is when you click them, most of the time, there will be what looks like a single frame blink. In recording the issue the blink is the exact size of the full button being pressed. [URL] All of the buttons do it, Home, Bio, Demo, Contact. If it doesn't do it at first, keep clicking and they will.
View 1 Replies
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
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
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
May 6, 2010
I am looking to subclass RemoteObject. Instead of:
<mx:RemoteObject ... >
<mx:method ... />
<mx:method ... />
[code].....
View 1 Replies
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
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
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
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
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
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
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
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
Aug 18, 2010
I'm trying to create a custom component which is being fed with XML data coming from the server.My problem is that the CollectionEvent listener doesn't get fired and thus labels not updated -Games.mxml (my custom component with listener):[code]
View 2 Replies
Jan 10, 2011
I'm trying to extend the mx:Box container so that two buttons sit on the outside of the container to cycle through it's contents (similar to a scrollbar).
I've made a custom component that looks basically
like "mx:HBox->mx:Button mx:Box mx:Button" where the buttons and box are children of the hbox.
How do I offer the user access to the box (say its dataProvider and itemRenderer) through my custom component?
So they just need to write 'local:MyCustomComponent dataProvider="rar" itemRenderer="rar"/>' and my box inside that component can use it?
View 1 Replies
Mar 21, 2011
I have a Flex application, running with Flash Player, not AIR, that contains a Tree that I would like to put a custom context menu on.
Tried just doing <mx:Tree ... contextMenu="{MyClassWithStatic.menu}">, but that didn't do anything.
Went searching, and found this quote from some Adobe docs somewhere
In Flex or Flash Builder, only top-level components in the application can have context menus. For example, if a DataGrid control is a child of a TabNavigator or VBox container, the DataGrid control cannot have its own context menu.
so went upwards, trying each parent element until I reached my <Application>-element, which is consistent with what they wrote.
Tried making a Flex component, based on Group (the default) which contained my tree, and the context menu on the top-level element there, hoping it would work, but to no avail.
Is there any other way to manage this that I haven't found yet?
The code I use to create the menu:
var menuItems:Array = [];
var rename:ContextMenuItem = new ContextMenuItem("Rename");
rename.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,
[Code].....
View 3 Replies
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