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


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

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

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

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

ActionScript 2.0 :: CS3 Show/Hide Mc's In Array?

Oct 13, 2009

Several arrays are created by passing a number (k) from a different array,for every item in the array I need to have a little dot.I have a movieclip on the timeline with a maximum of 15 dots.So if the array has only 6 items, the last 9 dots should dissapear.

PHP Code:

function fill_items(k:Number) {
var item = josXML.firstChild.childNodes[2].childNodes[k];

[code].........

But the dots_total[t]._visible = false; part isn't working...Maybe it's the wrong way to achive this, but i can't seem to figure out why it's not working.

View 2 Replies

ActionScript 1/2 :: Hide And Show Datagrid?

Aug 7, 2011

How do I hide a datagrid and then show it?I have a button to select. The button when clicked should show the datagrid. Once the user clicks a cell on the datagrid, it should hide again.

View 1 Replies

ActionScript 3.0 :: Show And Hide Text?

Feb 5, 2012

I have button (csignal_btn and endsignal_btn) and i have dynamic text (csignal_txt and endsignal_txt). Now how i can when is unhovered to no be text (alpha=0), and when hover csignal_btn to show csignal_txt (alpha=1)?? Same thing for endsignal_btn

View 3 Replies

Flex Show / Hide On Mouse Over / Out

Mar 23, 2010

i need to show the second one when there is a mouse over the first one and hide it when it goes out of the first one also i want the second container content to be usable (mouse clicks/moves)

View 2 Replies

ActionScript 3.0 :: Show And Hide Elements In DIV?

Jul 30, 2009

I have a problem with showing and hiding a link to another page. The following is the code thats placed inside cfform(format is flash).

[Code]...

View 0 Replies

ActionScript 2.0 :: Show/Hide Scrollbar?

Sep 27, 2004

1. I've downloaded the Source for MX included in the "Hide/View the Scrollbar Component" page of It simply doesn't work when I open the file and publish it. I'm using Flash MX 2004, ... has anyone experienced the same problem and solved it?2. I've been able to set the scroll visibility with an external dynamic text using several procedures. One of them is:

SB1.setScrollTarget(_root.Texto1);
if (Texto1.maxscroll > 1) {
SB1._visible = true;

[code]....

View 3 Replies

IDE :: Show/hide Movie Clip With Xml?

May 14, 2009

i wanna do a flash that reads an xml, in which the xml tells my flash to show or hide movie clips (they have instance names).

Code:
//added in the frame
var elights = _root.mc_elights ;
var logo = _root.mc_logo ;
var croom = _root.mc_croom ;

[code]....

i however, want to do this via xml, so that i could have my programmer colleague create a php to call for this database.

View 1 Replies

ActionScript 3.0 :: Hide / Show With Only One Button

Mar 9, 2012

I'm not happy with my hide/show function..... the code works, but I think it is a waste of space on my stage that I need two buttons to hide and show a movieclip... there must be a better way

[Code]...

View 3 Replies

IDE :: Hide/show The Mouse After Some Period ?

Sep 27, 2009

I want to hide the mouse after some period when there is no mouse movement (i.e. 5 seconds), and then for the mouse to reappear when the user moves their mouse again.

View 1 Replies

AS3 :: IDE : CellRenderer - Components Don't Show Up

Apr 15, 2010

I'm used to item renderers in Flex but inexperienced with Flash AS3 components.I want to create a List that renderers items like this:

1) a slider

2) a couple of text fields that my designer can place and style as he likes

It's a survey form. I expect to grab the _listData.owner and dispatch the user inputs and bubble them up to the form.

1) drag a list onto the stage
2) create a symbol in the library with the base class of com.blah.skins.renderers.SurveyItemRenderer
3) Export this class as SurveyItemRenderer
4) set the list's cellRenderer style to SurveyItem renderer
5) give the list data to show

I tried using CellRenderer, but the class seems to reject being associated with a symbol (and I could not find any examples of CellRenderer being used that way), so SurveyItemRenderer implements ICellRenderer.When I run it, other library symbols and graphics shows up in the renderer--WITH THE EXCEPTION of the slider. Other Flash components that I put on the stage do not show up either, until you roll over (Button), or if they have text in the them (Label). Slider never shows up.

Components will show up on the stage, just not in the SurveyItemRenderer. WHY NOT? I feel like I'm missing something basic. Here is the class, minimal because I'm still testing:

Code:
public class SurveyItemRenderer extends MovieClip implements ICellRenderer
{
protected var _listData:ListData;
protected var _data:Object;
protected var _selected:Boolean;

[code]...

View 1 Replies







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