Flex :: Event Path - What Way To Choose?
Apr 26, 2011
Imagine we have an object dispatching some event and this object should perform some action on this event. What's the right way of catching this event? May I listen to this event directly in my object or should I let this event travel through EventMap? Example: I have a popup window with form. On submitting form, I'm going to send a request to remote server and close this popup. Is it ideologically correct to perform popup close on click without dispatching custom event to EventMap?
View 2 Replies
Similar Posts:
Apr 3, 2012
I am coming from flash to flashbuilder I have a directory, AS3_classes_dir, on my computer that stores all of my classes, including my greensock and papervision packages. In every flash app that I make I include that directory in the Source Path, so that I can import whatever I may need. Compiling in flash (using ctrl/enter) takes very little time; only the classes that are specifically imported are compiled.So today I did that in flashbuilder, included AS3_classes_dir via Flex Build Path/Source Path ... but now the compile time are a couple of minutes, even though I am not even importing ANY of the classes from within.
View 2 Replies
Aug 19, 2011
I have several nested VBoxes in flex, and I'm aiming for one of them to get scrollbars if the total content is larger than the window height. However, when I grow the container, it doesn't get scrollbars at all (vertical scroll policy is AUTO), and the outer container stretches past the bottom of the screen, causing the entire app to get scrollbars. So it looks something like this:
[Code]...
View 2 Replies
May 10, 2010
HTTPService has a property resultFormat which can be set to any of the following: array e4x flashvars object text xml .I looked at the documentation to understand the difference, but still couldn't understand when to use each. I'm looking for the lightest weight of all of them.
P.S. I'm consuming output from my own server, so can change the output format as needed to make it compatible with each.
View 1 Replies
Aug 10, 2009
I have recently been using Charles the debugging app. And noticed a very chatty app named skyrocket (a very very cool slide presentation app) sending a lot of data across the wire. It is built in flex by the looks and I was wondering why they had chosen to send their data using base64 and not amf. Is it because they don't want to be locked into the flash platform? Or could there be another reason. Is it to store it as XML in the database as they don't want to be dealing with amf when handing data to other services/clients (iPhone etc).
View 2 Replies
Jan 20, 2010
I am builder a graph that is going to cover an entire month. The user may change the Month/Year but there is no point in choosing a date for the month as it is going to show the entire month anyways. So is there a way to maybe make the DateChooser date always the first and only allow the user to pick the month and year?
View 1 Replies
Feb 20, 2010
I'mm using flex builder 3. I have an xml file that looks like this, notice the flag property. It can be either 0 or 1:
[Code]...
View 1 Replies
Mar 7, 2011
im kinda confuse why people use flash cs5 and some are using flex, flashdevelopl and etc..
View 3 Replies
Apr 16, 2010
I'm in the process of planning a banner project, where I want to being able to output all banner formats (about 10+ of them) from the same flex project. They will all contain pretty much the same content but with some variation, and because of the size limit I want to load only the necessary assets for each format.
I wonder if there's a way to dynamically load different assets (in form of swf or swc) depending on some setting? I can of course load different swf:s into the main swf but I want only one swf per format. How about launch configurations, is there a way to choose different swc:s there?
View 1 Replies
Jul 17, 2009
I have a flex MXML UI that is building a set of radio buttons using the Repeater component:
<mx:Repeater id="radios"
dataProvider="{_lists.(@id == _question.single.@response_list).group.listItem}">
<mx:RadioButton groupName="responses"
[Code].....
View 3 Replies
Jan 8, 2010
Previously it was put as keepLevel1(event.target) at each seperate function. Now I would like to make it frun the functions after an object is successfully loaded. How should I change the (event.target) to?
ActionScript Code:
private function startSearch(event:MouseEvent):void {
var loadID:String;
loadID=searchArea.text;
myLoader2.load(new URLRequest("GetData.aspx?id="+loadID));
myLoader2.addEventListener(Event.COMPLETE,processXML2);
[Code] .....
View 0 Replies
Jul 18, 2010
So I've created a script where a mc is clicked on and the player can draw a path using the mouse. I'm trying to figure out how I can get the mc to follow the path drawn out by the player's mouse and when the player clicks again, it erases all of the path.my code is below
Code:
import flash.display.Sprite;
import flash.events.MouseEvent;[code].....
View 14 Replies
Apr 12, 2011
I have editable grids which are 2-way binded to my model. What I want is to validate my data when user edits any cell before it get updated in model. I have applied my validation at ItemEditEnd handler, but, I want to apply validation in between itemEditBegin and itemEditEnd events.
View 1 Replies
Aug 22, 2011
I hava a custom component and it contains a child icon. If I add a mouse-click event listener to both component(click-listener1) and icon(click-listener2), the event dispatched sequence is click-listener2, then click-listener1. I can understand it. But if I add a custom event to component (listener1), and mouse-click event to icon(listener2), when icon is clicked, the component will dispatch the custom event. In my test, the event dispatched sequence is listener1, then listener2. It doesn't match with event-bubbles rule.
In my opinion The custom event is dispatched in listener2, which triggers listener1. Why event flow sequence is not listener2, listener1?
In component.
icon.addEventListener(MouseEvent.CLICK, iconClickHandler);
private function iconClickHandler(event:MouseEvent):void
{
[Code].....
View 1 Replies
Feb 9, 2011
I'm trying to build a flex project, linking it to some RLSs. When setting up the project in Flex Builder, the corresponding "build configuration" (that I got by adding -dump-config to the compiler options) generates (among other things) a tag like this :
<runtime-shared-libraries>
<url>some-lib.swf</url>
<url>some-other-lib.swf</url>
[Code]....
View 2 Replies
Mar 5, 2009
I hope this is the right place to post this I am working on a flex project in AS3 (no mxml).. I unchecked the "Generate Html wrapper file" and when I compile for debug it works fine in my target deployment path (which is called WWW).
my problem is: if my document class is on the root of the sources folder, the generated SWF will be on the root of the Deployment folder (WWW/main.swf) .... but if my document class is inside a package like com.projectName.main.as for example, the generated swf file will be:
[Code]...
View 1 Replies
Nov 9, 2011
the same class is passed to the mxmlc compiler in SWF library as a symbol linkage class and again in a source-path. But the compiler uses the definition from the source-path so creating new instance of that class won't create new instance of the library symbol. How do I tell the compiler to prefer the definition linked to the symbol (the one dfrom SWC)?
I have my design assets in an FLA file and they are linked to classes (e.g. [URL]. Then I export those assets to a SWC library and pass it to the compiler. Now when I create an instance of the class (new MyAsset();) it will be a new instance of the library object.
But there are other classes too in the source folder (e.g. "com.myproject.model.*" so I need to pass the source folder to the compiler too. And that is the problem, now the compiler will use the MyAsset.as definition from the source path, not from the SWC where it is assigned to the library object so if I create new instance of MyAsset now it won't duplicate the library object.
View 1 Replies
Nov 24, 2004
Here's what i'm trying to do: Hide a MC depending on the path variable as:
[Code]...
Well that doesn't work, for some reason, i can't use a string as a multiple level path..
View 5 Replies
Feb 15, 2010
I was wondering if it possible to write up some AS that will take line paths that you have drawn and convert them into a Path object? For example say you drew a jagged line from left to write, would there be a way to have AS convert that into a Path object.
View 11 Replies
Aug 31, 2011
Is it possible to draw out a path in the flash editor, set its visibility to hidden, and use this path data to animate objects in AS3?
View 1 Replies
Aug 27, 2004
i have a quick question what is the syntax if u want to use parametrs to define a path inside a path? i mean:
[CODE]...
does anyone know.... it's very important!
View 6 Replies
Nov 9, 2011
This is a head scratcher. Why would a root relative path cause a Security Sandbox error.. but an absolute path to the exact same path work fine..
[Code]...
View 0 Replies
Apr 12, 2009
I am having trouble using a custom event in flex. I need to dispatch an event from inside two nested components and receive it in the main application file. The basic set up is a main application file importing a custom "gallery" component.
[Code]..
View 1 Replies
Feb 21, 2011
I am working on a project that is primarily ASP.NET based. The main project is meant to be deployed to multiple locations for different clients, so one client might be located at website.com/client1 and another at website.com/client2. Within the application, we regularly use the application root operator ~ to get the path to a resource.
We also have a bunch of Flex applications that get deployed in there, and many rely on web services within the ASP.NET application. What I'm after is a way to reference the services relative to the application root. Here's an example of the location of some files for two client deployments:
[URL]
FlexApplication and webService are both exactly the same, so what I want to do is something like this in the Flex code:
var myService:CustomService = new CustomService(~/services/webService.asmx);
myService.callMethod("Test");
I would like to avoid using relative paths for the usual reasons. Is there a good way to do this or a good way to pass the root url to the flex application from ASP.NET?
View 3 Replies
Aug 24, 2011
what should i do to get chart's data on the click of respective data Legend. suppose i have array [{id:123, label:sales, year:2010},{id:124, label:refunds, year:2010}]for a column chart which has year in x-axis and sales iny-axis.two legend showing labels sales and refund.What i want is to get the whole data (id:123, label:sales, year:2010) on clicking of the legend 'sales'.What should i do? I tried listening mouse click event and itemClick event.
View 1 Replies
Jan 27, 2012
I am trying to understand event propagation in Flex framework and have a following doubt on it:
Scenario: I have a built-in component DropDownList on change of which I want to create a custom event refreshPreview and want to propagate it to a custom component PictureComponent.
In the custom component's mxml, I have added the Metadata directive as follows to register a refreshPreview event with the compiler
<fx:Metadata>
[Event(name="refreshPreview", type="flash.events.Event")]
</fx:Metadata>
Layout Details: In my main mxml application I have laid out DropDownList and the custom component such that both are siblings (i.e. have a common indirect parent)
e.g.
<s:Group id="contentGroup">
<s:Group id="formGroup">
<s:Form x="11"
[Code]....
I am seeing that the refreshPreview event is not getting propagated to the custom component.
I doubt this is because the built-in component is a sibling of the target (where the event got generated) and not a parent. how to make refreshPreview event propagate to custom component?
View 1 Replies
Apr 8, 2011
I am displaying some flash content on a fairly standard page. This works really well when the flash, xml file and html page are sitting together in the same directory.url...However, I want to display that same content in another page which is deeper inside the site but outside of the directory that houses the .swf and .xml files as well as the assets.[code]The js files are loading properly but the flash content is not, so I could use a little help getting that sorted out.
View 1 Replies
Apr 30, 2011
What does _level0,_parent and _root mean in flash?What's the difference between absolute path and relative path?
View 1 Replies
Nov 2, 2010
Where can I find the path to the Flex SDK? Last time I embeded metadata, Flash CS5 automatically found it for me. This time its not working. I get this message in the output window:You have used a feature that requires the Flex SDK:"Embed" metadata Please set the Flex SDK path if necessary and add it to the library path for this file. The Flex SDK folder contains the bin, frameworks, lib and other folders.
View 3 Replies
Oct 9, 2010
I looked around, and the latest reference I saw was from 2008 stating that the standard FileReference browser does not support retrieving the user's file's absolute local path unless it's an AIR app, and indeed there's nothing in the docs suggesting otherwise. The reasoning behind this is apparently some misguided security concern... I get it's not a great idea to let any Flash app know your directory structure, but if the user actually grants your app a file, I think it doesn't invalidate the security model to know just that file's absolute path.
I'm wondering if the state of things has changed at all with Flex 4 and there's a method of getting the local filename of anything. I need it because I'm making an application that when distributed runs locally in 99% of cases, so doing a full file upload just to save it somewhere else on the local machine seems silly. (Plus the standard file uploading method doesn't support SOAP, which is what I'm using for all my other services...)
View 2 Replies