Flex :: Call One MXML From AS Code?
Feb 23, 2011I am creating an AIR application, The mainapp.mxml has a button and VBOX. When clicked on button, child.mxml should be displayed in VBOX.
View 2 RepliesI am creating an AIR application, The mainapp.mxml has a button and VBOX. When clicked on button, child.mxml should be displayed in VBOX.
View 2 RepliesI have a page made of custom components. In that page I have a button. If I click the button I have to call another page (page.mxml consisting of custom components). Then click event handler is written in Action-script, in a separate file. How to make a object of an MXML class, in ActionScript? How to display the object (i.e. the page)?
[Code]....
I have created a mxml file , and i would like to display it in a pop up window. i have alrdy done the pop up window, but i couldn't display the mxml file i have done. I am not trying to call the pop up window in the mxml page. this is my popup window i have done:
[Code]....
Can you recommend articles,books and best practices on designing Flex applications? (both AIR and web).I've read Creating components and enforcing separation of concerns with Flex and Building components by using code behind.Does the application always have to start on the Main MXML? Can't I instantiate the first view from an ActionScript class?How would you add a handler to the first MXML and give the flow control to it?I'm trying to write zero code on my MXML files to keep the view decoupled from code. Is this possible in Flex?
View 3 RepliesI have created a custom component (named customtitlewindow) the code of which is as follows:
<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
[Code]....
The main purpose of mine is that for all the popup windows shown to end user all of them be closed when the escape key is pressed and all of them be closed upon click of the closebutton displayed at the titlebar.
But on the "escape key" press nothing is happening.
URL...what I need is to add more than one method to the RemoteObject.Using the other question's example but adding one more method, how would this look in actionscript?[code]Needs both the result and fault methods in the Responder. And I've added multiple different methods using this.
View 1 Repliesi write a sound playback class that stop the older sound and play the new sound.After that i need an extra method in this class that trigger when the sound play is complete.I successfully achieve this, but i need to inform the main app (main.mxml) about the completion of that sound playing.
here is my sound playback class.
package com.m2b.data
{
import flash.events.Event;
import flash.media.Sound;
[Code]....
Flash Builder generated AppName-app.xml descriptor for every AIR project. There are a number of settings, values there, including below. Is it possible to read these in your code without explicitly loading this XML at runtime (even this I don't know if it's possible)? Maybe Loader.info or similar?
<!-- The name that is displayed in the AIR application installer.
May have multiple values for each language. See samples or xsd schema file. Optional. -->
<name>ffff</name>
[code]...
What is the difference between :
giving a function reference in the result attribute of the HTTPService class like this :
protected function httpserviceCheckUpdate_resultHandler(event:ResultEvent):void
{
var version:Number = event.result.text.version as Number;[code]....
If both of them are same then how can I provide the event parameter using the second approach (as written in the result attribute of the httpservice class)? Which one of them is the better way of doing things in FLEX.
I've a grid view in flex, one of the columns is rendered like this:
[Code]....
now I've a problem that the function in button click is not being recognized. It says "call to a possibly undefined function" even though it was defined. What is wrong with this? How do i make a button in a grid call a function in the same mxml file??
I have been working on a charting flex document listing repository statistics for work and it can be seen here -http [url]...orialJorum.swf Unfortunately,my hard drive died last week and the MXML source files were wiped(I know I should have backed it up). As I cant really afford paying $80 to decompile to get the MXML script, I wondered if anyone could do it for me as I put many hours into that piece of work. I have tried using the demo version of SWF Decompiler and Trillix but unfortunately they only give you the component code and not the <script/>
View 3 RepliesDoes MXML get compiled down to as3 and then converted to flash bytecode? Also, is there a significant performance penalty to compiling mxml vs compiling as3?
View 3 RepliesI 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]....
I want to call a function in main flex app from the custom preloader code in actionscript before it dispatches complete event. Also i want to know how to call back to a function in preloader code from application
View 1 RepliesI am trying to override a Button class, i have a few properties which i wish directly initialise with the mxml description of the component, like :[code]which function is triggered ( in order to override it ) when all properties with mxml description is fully initialised with their values ?
View 1 RepliesWhat 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].....
i have defined some functions in a component mxml file let us say addbutton() now i want to call this function in main mxml file.
View 2 Repliesmain.mxml
[Bindable]
private var _dp:ArrayCollection = new ArrayCollection([
[code].....
I'm trying to get the AS3 Flash remoting example found here: [URL]. and I keep getting this error: Code: Select allError #2044: Unhandled NetStatusEvent:. level=error, code=NetConnection.Call.BadVersion at amfphp1_fla::MainTimeline/frame1() Here's the code I'm trying:
[Code]....
I have 2 files: Main.mxml with application and one MyObject.as.I create the instance of MyObject in mxml and can call its every public function from mxml. But what if for some reason I need to call some function declared in mxml from MyObject class?
View 2 RepliesA Flex components values are initlized by init methord. In an application flow, How to refresh a mxml component data value ; as init is callled at the start up it self only.
eg. of mxml componet may be as simple as button label or text as complex as repeater whose data provider is a web service ( means a fresh quesy should be made to pull the data and refresh the dataprovider of repeater )
suppose i have 3 buttons(for example say, productin, marketing, sales ) on my main.mxml..once i click on one button it should take me to abc.mxml page with production data, once again if i click on second button it should take me to the same abc.mxml but with marketing data. same as for 3rd button also, how can i achieve this ?
View 2 RepliesI want to create a actionscript mobile project in FB4.5. There is very little information on this by the way. Anyway I want to link to another mxml component by clicking on a button. in flex it is easy but how do i call this in AS3?[URL]..
this is how flex does it <s:Button label="Continue" click="navigator.pushView(MyNewView)" styleName="next"/>
i thought of drawing the interface using mxml markup. When the user clicks on a button it should call a specific method in a .as file. How can i do that in mxml ?
View 2 RepliesI've been trying to create a custom mxml component that extends another custom mxml component (i.e.MyMXMLComponent -> BaseMXMLComponent -> Group). I've been reading that trying to add visual children to MyMXMLComponent caused error with Flex 3 but that's no longer the case with Flex 4.
What I want to know is whether this is a supported/fixed/documented feature of Flex 4? or just some undefined behavior in Flex 4 that may get changed with future updates?
if this is supported and documented feature, does anyone have link pointing to adobe document stating it as such?
Anything like that out there now? I know there was a rather buggy formatter for FB 3, but how about a mature code formatter for FB 4?
View 1 RepliesThis is a project I'm working on for a simple demo tutorial application in Flex. I am using mxml pages. You can see to the left that I will have my main application and then other mxml files (In the Examples Package) as the examples that will be loaded into the main application mxml. How can I dynamically pull the value from the object in the list to load the child mxml file into the container that I have further down in the application?
View 1 RepliesI have a method in CustomPanel.mxml and I need to use id which is available in Main.mxml. Below is my sample code
Main.mxml
<local:CustomDivideBox id="div1">
Custompanel.mxml[code]....
I would like to include an MXML file in my MXML file in the same way you can include an external file in AS3 using the include directive. Using the include directive brings the code from the external file into the original file at compile time placing it in the same scope. For example,
Application.mxml:
<Application>
<source="external.mxml"/>
[code].......
I am looking to subclass RemoteObject. Instead of:
<mx:RemoteObject ... >
<mx:method ... />
<mx:method ... />
[code].....