ActionScript :: Using MXML Components As Classes?

Jun 20, 2010

I have two MXML component files and try to work with them as classes. One of them has a simple function:

GUIFriend.mxml
<mx:Script>
<![CDATA[
public function createName(f:Friend) {
return 'friendProfile: ' + f.uid;

[Code]...

View 2 Replies


Similar Posts:


Flex :: MXML Syntax To Assign Properties Of Subcomponents In Custom MXML Components?

Jun 4, 2011

I am working on a custom Flex 4 component which is an aggregation of two existing flex components. I would like to be able to specify my own custom properties for the component as well as access the existing public subcomponent properties via MXML. For instance I might want to adjust the font color or style for the label and text input. toy component which aggregates both a label and a text input:

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

[code]....

View 1 Replies

Flex :: Extending MXML Custom Components Via MXML?

Feb 3, 2011

What I'd like to do: create an MXML component with some children, then extend it via MXML to create a new component with more children, without losing the original set.In other words

create a component bc.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:BorderContainer xmlns:fx="http://ns.adobe.com/mxml/2009"

[code].....

View 1 Replies

Flex :: Thumbnails For Mxml Components In It?

Oct 19, 2009

Is it possible to make some kind of 'dynamic' thumbnails for mxml components which I'm using in my application? By 'dynamic' I mean if I change some layout in mxml component, my thumbnail refreshes according to new layout without any screen capturing,photoshoping or similar

View 2 Replies

ActionScript :: Using Flex Components Without Any MXML

Jul 29, 2011

My Main.as extends flash.display.Sprite, I want to use a ComboBox component in the as, without any mxml, how to implement it? I read this Possible to use Flex Framework/Components without using MXML?, Its main as extends spark.components.Application, but still need a mxml file. Its main idea is to rewrite the Application component, and reuse it in mxml file. That is not what I want. I uses Flex SDK 4.1

View 1 Replies

ActionScript 3.0 :: Flex Components Without MXML?

Nov 1, 2010

I'm working on an AIR project in Flash Builder 4. My question has apparently been asked a lot (according to Google), but I haven't found a satisfactory answer so I'll be very detailed in what I'm looking for:Is there any way to create an AIR project in pure ActionScript that:Is truly object-oriented (i.e. the entry point is an ActionScript class with instance variables and methods)?Can instantiate mx and spark controls without MXML?I was able to accomplish #2 in fairly different ways by following these two sets of instructions (with only a tiny bit of initial MXML):

[URL]

However, neither of those allows me to accomplish #1. If I declare a private member variable outside the entry point function, I get an error from the compiler that the keyword 'private' can only be used in a class.If you like MXML, feel free to post your viewpoint as well. My reservations revolve mostly around these perceived notions:The learning curve of MXML seems steep.The time it will take to become good at MXML will not be worth the investment since its main purpose is to ease GUI development (which I'm already good at anyway).Like I said previously, I don't want to be an "XML programmer". I'd like to maintain the power and flexibility of OOP.

View 1 Replies

Flex :: Sharing Variables Between MXML Components

May 29, 2010

I have several mxml components in an app, all of which need the same variable called genericX. I've included that variable in the main mxml and made it public
[Bindable] public var genericX:Number = 102;
But I still can't access it from other mxml components. If I try to do this for example, it doesn't recognize the variable.
<s:Button x="{genericX}" label="Click" />

View 5 Replies

Flex :: Creating Custom MXML Components?

Jun 21, 2010

When I define custom propertie in my MXML component, I also want to define a set of possible values of that property to make Flex Builder show then (possible values of the custom property) when I invoke code completion function.

View 2 Replies

Flash :: Swf Cannot Reference Mxml Components On An Event?

Jul 4, 2010

this piece of code is being placed inside a swf which is then being placed inside a mxml swfloader. The ProductDesigner is the name of the application and the selectRed is a HSlider mxml component. The error that I receive is that "Access of undefined propertyProductDesigner" in the Flash CS5 when testing the swf. Yes I am able to pick up the intellisense to know that it knows that there is a ProductDesigner in the whatever it's called.

private function ChangeColor(event:MouseEvent):void
{
var red:uint = ProductDesigner.mainTabs.tabContentColor.selectRed.value;

[code].....

View 1 Replies

Actionscript 3 :: Show And Hide MXML Components?

Nov 9, 2011

I am working on an application where I need to basically have 2 separate screens and I need to be able to switch between them. I am a total noob to Flex & Flash and I have not found anything on how to do this in my 2 days of Googling. It really shouldn't be this hard to do!

Here is what I have tried. I created a Flex Project and added 2 MXML Component files called Test1 & Test2 and each simply have a button in them which have a label of Button1 & Button2 so I can see if the correct component is showing. Below is the button code in the Test1 MXML Component file[code]...

View 1 Replies

Flex :: Components And Main.mxml Communication?

Mar 7, 2012

I'm building a Flex 4 Application in AIR.I've made a main.mxml and a login.mxml component. It all works but i can't communicate between my two mxmls (MAIN and COMPONENT)The login works but then it has to send a event tot the main that i can change the state in the main.Here is my cropped code.

login.mxml
//resulthandler if login is succesfull
loginUserResult.addEventListener(ResultEvent.RESULT, loginUserResultHandler);

[code].....

View 3 Replies

Actionscript 3 :: Edit Objects Within Custom AS3 Components Using MXML?

Apr 27, 2011

I'm writing a Flex application using Flash Builder 4 and I'm having a bit of trouble with an AS3 object.Essentially, it is a BorderContainer, with a few buttons and images, and programming logic that determines how these interact with eachother and a database.

What I want to be able to do is configure the layout/style of the inner components using MXML and CSS. I can configure the inherited objects, but not ones that I have defined.[code]...

View 2 Replies

Flex :: Access MXML Components Within Ascript Files?

Jul 29, 2011

How do I get round the following error: Access of undefined property pMatrixBack . How do I access this component from within the ascript file?[code]...

View 2 Replies

Flex :: Components In Window-Based MXML Frozen

Jan 27, 2012

Creating a window-based mxml component, but in design mode all components that I'm adding are not movable, why? If I create component based on group f.e., it's ok, but based on window - they are frozen. Using Flash Builder 4.6.

View 2 Replies

Actionscript 3 :: Creating Components By MXML Or By SCRIPT/FLEX?

Mar 9, 2012

im trying to figure out what is better for run-time, creating components in MXML or by SCRIPT?. I built an app that recieves data from a server without knowing how much data exactly. In worst case scenerio , ill need 10 LABELS and 2 DATAGROUPS.But i usually need something like 3 LABELS and 1 datagroup. what is better? creating all components in advance and than not include in layout the ones i dont need, or make some checks and then create only the components i need by script? I made some tests , but it wasnt really decisive, run-time was pretty much simillar.Im guessing it must be stated somewhere what is better. Does anyone have an answer for me?

View 1 Replies

Actionscript 3 :: Overriding A Setter In MXML Components In Adobe Flex

Dec 15, 2011

I am trying to override the text setter in the Label component but it behaves weirdly sometime super.text works and sometimes not! and the traces show that there's no error with my code.

here's my code:

import spark.components.Label;
public class LabelXX extends Label
{
private var _initialText:String;

[Code]....

View 1 Replies

Actionscript :: Flex - Setting ScaleX / Y In Mxml Effect The Components Size

Jan 1, 2010

I'm playing around with the scaleX/Y in the canvas tag and have noticed some strange behaviour. When I set scale in in mxml the width and height of the canvas are adjusted accordingly. For example if I have a canvas like this: <mx:Canvas width="1000" height="1000" scaleX="0.1" scaleY="0.1" />

The canvas now appears on screen to have a width and height of 100 and if inside my creationComplete callback I check the width and height property they are indeed 100. But if I do exactly the same thing except I set the scaleX/Y property from actionscript the canvas on screen appears to have a width and height of 100 as expected, but when I check the width and height property of the canvas they are still at the previous values of 1000.

View 1 Replies

Flex :: Define Components Path In Each Module / Just Main Application Mxml?

Apr 16, 2010

I'm implementing a Flex application with several modules.I'm reusing the same component in all these modules.I was wondering if I'm correctly importing it in each mxml module definition: xmlns:hillelcoren="com.hillelcoren.components.*"Should I import it only once, in the main application mxml instead?

View 1 Replies

Flex :: Create Skinnable Components In MXML Using Spark Component Architecture?

Oct 14, 2010

There are lots of examples of how to create skinnable components in AS3 using the new Spark component architecture, however I've yet to find any such examples using MXML.What I'm mainly referring to is defining the skin parts and skin states. It seems as though the SkinPart metadata is supposed to be associated with properties and as such can't be used in MXML, is this correct?

View 1 Replies

Flex :: Classes Must Not Be Nested - MXML

Jan 7, 2010

I'm trying to build a simple FLEX application. Unfortunately, I get '1131: Classes must not be nested.' errors even with the simples MXML .... the error pops out at the mx:Application openning tag: (I'm using PureMVC if it's important)

<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"

[Code]....

View 2 Replies

ActionScript :: Flex - Get MXML And Classes Out Of Swf?

Jun 2, 2009

Is there a possibility to generate the source out of the swf-file? I mean for example if I have my Actionscript and MXML files and compile them to a swf, can I get the source back out of the swf file?

View 2 Replies

ActionScript 3.0 :: Accessing AS Classes In A MXML Document?

Sep 21, 2009

how to put actionscript classes into an MXML document? Lets say my class represents a movieclip, a rotating triangle for instance. How do i put that into a <mx:vbox> containter? I can do the AS work in a <mx:Script> tag, but how do i embed my class instance?

View 2 Replies

Flash :: Opensourse Set Of Components Or Some Framework For Creating Flex Mxml Graphs (Node-based UIs)?

Apr 15, 2012

Is there any opensourse, free set of components for creating Flex mxml graphs? like aviary Peacock style ones with at least Drag, drop, and connect generators so each graph element could have or something like that. Framework should be opensource (like GPL, LGPL etc) BTW: I found one wary bacic made by Erno Aapa with Degrafa but I would really love to see something much more Flex 4 - mxml oriented and frienfdly.

View 2 Replies

Flex :: MXML Views - Passing Dependencies Into Constructor Of Classes

Oct 6, 2009

I'm used to building applications using pure AS3. I always pass dependencies into the constructor of classes I make, but this method seems to not work out well for Flex MXML views. It seems like I should define setters on the MXML class, which map to attributes in the tag/class instantiation. But using this method I cannot specify which properties are required and in what order I expect them etc. What is the preferred method to give a Flex view it's dependencies?

View 3 Replies

IDE :: Components Disappear When Published - Export Classes

Mar 3, 2009

I've built a small, simple web page. One frame uses 3 ComboBoxes and one UIScrollBar. I set up my Components by dragging them from the Library and using the Property Inspector to give them values. Everything works fine and shows up when published... but then eventually, when published, all of the components show up as blank rectangles. I'm trying to minimize the data being loaded during Frames 1 & 2 due to the preloader. I chose to Export Classes in Frame 3. When I do this, my Components (in Frame 9) disappear. How can I solve this?

View 1 Replies

Actionscript 3 :: - Access Objects Instantiated In Flex App's MXML File In Other Classes

Jul 29, 2011

I've got an object declared and instantiated in my Flex application's singular MXML file: public var CDN:CDNClass = new CDNClass; I would like to access this same CDN object (and its public methods and properties) in another class declared in a separate .as file as such:

[Code]...

But when I try to access the public method parsePlayList in the CDN object in a method in the class defined in the .as file, I get the following error: Access of undefined property CDN The reason I want to do this is to break up the logic of my application into multiple AS files and have minimal MXML files, probably only one.

View 2 Replies

ActionScript 2.0 :: Radio Button UI Components Messes Up My Custom Classes?

Jan 25, 2007

I've written 3 classes and i'm using them in the first frame of my FLA.when i add the Radio Button to my stage, my classes don't do what they're supposed to do. Even if i just leave the radio button component in my library,

View 6 Replies

ActionScript 3.0 :: Make A Global Varaible ArrayCollection That Can Call From Different Classes/components In Flex?

May 26, 2009

How can I make a global varaible ArrayCollection that I can call from differint classes/components in flex?

View 1 Replies

Actionscript 3 :: Make Non-document-class Classes 'aware' Of Stage Components In Flash?

Dec 2, 2010

I am working on a text adventure game which will have at least a few components (a text area for narrative and text input for user input) on the stage at all times. Therefore, I have created those components statically through Flash's WYSIWYG design environment. I gave them instance names "myTA" and "myTI" respectively. I was able to get my main class (the document class for the stage) to interact with them (dynamically adding text one character at a time like a typewriter at runtime), but other classes in the same package don't seem able to recognize the stage components. Below is the relevant [code]...

View 5 Replies

Flex :: Mxml - Components Bound To Empty ArrayCollection At Load Time Don't Render As Expected When The ArrayCollection Is Updated?

Oct 27, 2009

I'm new to Flex and am using TileList bound to an ArrayCollection. The array collection is empty at load time, and then updates with the results from am HTTPService call. The problem is that the item renderers aren't being rendered as expected, I'm guessing because there was no data when they were first rendered at load time. Here's simplified example:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" >
<mx:Script>

[code].....

View 2 Replies







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