Flex :: Expose Component's Existing Events With New Name?

Jan 21, 2010

I created a flex component that hosts several built in (mx) components such as a listbox and combo box. My component relies on external data, and I need to expose events such as ComboBox.enter and List.click to get certain pieces of data.I was wondering if there is any easy way to do this without having to create my own custom event handlers. I'm simply trying to expose these events with different names so that when my component is used, I can do things such as:

<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%" xmlns:com="com.*">

[code]........

View 4 Replies


Similar Posts:


Flex :: Write Events For A Custom Component In It?

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

Actionscript 3 :: Flex Component Lifecycle, Order Of Events?

Jul 19, 2010

As per the book, 'childAdd' event of parentcontainer should be triggered after triggering of 'PreInitialize' and 'Initialize' event of childcontianer while as per the program out put it seems otherwise.What I found in books is as below:

Container----------Component

Preinitialize

------------------Preinitialize[code].....

View 3 Replies

Flex :: Events - 4 States IncludeIn And Component CreationComplete?

Feb 2, 2011

I have a component that, once it's all ready, I need to set the state based on a variable I'm reading in from XML. I tried doing it with creationComplete, but it's apparently not ready, as the state isn't being set with elements rendering properly, but the states & rendering work fine if I do a subsequent state change with a click action on some element.

What should I do in this situation to make sure the state gets set at the right time & elements that should appear due to includeIn exist so they can be rendered? initialize instead of creationComplete doesn't seem to do the trick for the first time the component is created. Any successive calls to the component are fine.

View 3 Replies

Flash :: Events Not Firing In Custom Flex Component?

Jun 24, 2011

I'm taking my first stab at writing a custom flex 4 component by extending the UIComponent class. Unfortunately, I cannot get the component to respond to any sort of mouse events.I've tried setting mouseEnabled to true is the component, as well as setting mouseChildren to true in the parent (the stage object). It seems whatever I do, my click events can be detected from the stage, but not with the component.Here is my component class:

package components {
import mx.core.UIComponent;
public class DrawCanvas extends UIComponent {

[code]......

View 1 Replies

Actionscript 3 :: Flex HTMLLoader Component Not Raising MouseDown Events For All Mouse Clicks

Jun 16, 2010

I have built a Air 2/Flex 4 kiosk application with Flash Builder 4. Currently I am implementing a touch screen browser to enable users to navigate company training videos. In an attempt to improve the usability of the website on the touchscreen I have placed the HTML component in an adaption of Doug McCune's DragScrollingCanvas (updated to use the flex 4 'Scroller' component) to allow users to scroll the webpage by dragging their finger across the screen. The mouseDown event is used to start scrolling the viewport.
In addition the webpage was modified to disable text selection with the following css:

[Code]...

As an alternative I also tried adding a group container with the same dimensions as the HTMLLoader to detect the mouseDown events (so that the group container and HTMLLoader have the same Dragable parent container) and was able to capture mouseDown events and scroll the viewport as expected. However as the mouse event is handled by the group container, I am now unable to navigate the webpage.

View 2 Replies

Flash - Append Flow To Existing Textarea Component?

May 16, 2011

I'm looking to simply append the following text to an existing spark.components.TextArea's text flow:
<b>something</b>: hello world

I have attempted to do this using the following code, but nothing happens:
this.textarea.textFlow.addChild(TextConverter.importToFlow(
"<b>something</b>: hello world",
TextConverter.TEXT_FIELD_HTML_FORMAT));

How can I accomplish this? I know in the old mx.controls.TextArea component, I could simply do:
this.textarea.htmlText += "<b>something</b>: hello world";
How can I do this with the new TLF/FTE API expressed in the spark.components.TextArea component?

View 1 Replies

Professional :: Live Preview Not Displaying If Added To Existing Component?

Feb 22, 2010

I've created a swf for a component live preview. The live preview appears to work ok when creating a new component, and setting the live preview in the component definition panel.

When I update an existing component definition (in a separate component library FLA) the live preview does not work. The strange thing is if I copy the entire (component FLA) library and paste it into a new FLA it works fine (although in doing so I receive a whole bunch of errors in the output window saying - Plugin tool script error in method ik_isIKContainer).

View 1 Replies

ActionScript 3.0 :: How To Expose Property Of Loaded SWF

Sep 2, 2010

I'm extending / modifying this tutorial to create a runtime asset loader class. Kinda got it working, but in efforts to streamline it, ran into this issue:
- doc class for external library swf:
ActionScript Code:
package com.b99.runtimeLib {
import com.b99.utils.IRuntimeLibrary;
import flash.display.MovieClip;
[Code] .....
In this case, ASSET_DEF is returning undefined, and isn't showing up as a property during debug. How to expose this property to the loading class?

View 7 Replies

ActionScript 3 :: Flash - Expose A Vector As An Enumerable Type?

Mar 8, 2011

I have a class member in an ActionScript 3 class that looks something like this:

private var m_myvect :Vector.<MyType> = new <MyType>[];

I'm exposing it through a getter, like this:

public function get mydata() :Vector.<MyType>

Which doesn't help when I use it like this:

for (var o:Object in inst.mydata)
{
...
}

... because the type of o is not MyType, but Number instead, because it enumerates the vector indices instead of the data.How would I expose only the data within the vector in a way which:Does not expose the data in a way which allows it to be modified?

View 1 Replies

Flash :: Expose A Method In An Interface Without Making It Public To All Classes?

Nov 7, 2009

I have a issue where I'm working with a particular interface for quite a lot of things. However, I have a particular method that I want to be available only to a particular group of classes (basically, an internal method). [code]...

View 4 Replies

Flex :: 4 - Null-component - Checking If The Cancel Button Component In The Child Component?

Jun 23, 2011

I have a component "child" which has a cancel button. Now this component is placed in a state called "newChildComp" I also have another component called "parent". In the parent component, i have a button that dispatches an event. Here is the event code:

[Code].....

so, basically,i am checking to see if the cancel button component in the Child component, while i am still in the parent Compoent, was clicked, if it was clicked, call the cancelButtonHandler. The problem is by the time the addNewChild handles the event, that cancel button was still null. My question is how do i solve this without using the itemCreationPolicy on the cancel button?

View 1 Replies

ActionScript 2.0 :: Free Events Calendar Component?

Aug 23, 2004

I've developed a Version 2 Events Calendar component that will accept multiple, non-continuous days (which the DateChooser component does not do).

in particular I'd like to thank the following people, without whom this project would never have been completed. i'm indebted to you all

activity.xml is where you put the dates in. open up the file and you'll see how i did it. i marked the dates i wanted highlighted and then put in the url where you get taken when you click on that date.

View 10 Replies

ActionScript 2.0 :: Free Events Calendar Component

Aug 23, 2004

i've developed a Version 2 Events Calendar component that will accept multiple, non-continuous days (which the DateChooser component does not do). i'm indebted to you all: prophet, cycom, bodyvisual, thoriphes, claudio, scriptflipper, hga77, senocular, e.s.x.s., and mcgiver. i've learned so much from all of you. now to the component. please don't yell at me for not packaging this as an .mxp. i tried and well, failed... open up the attached zip file: EventsCalendar.swc and XMLMember.as go here: Program Files --> Macromedia --> Flash MX2004 --> en --> Configuration --> Components.

activity.xml needs to be on the same level and in the same folder as the .fla you're putting this in. activity.xml is where you put the dates in. open up the file and you'll see how i did it. i marked the dates i wanted highlighted and then put in the url where you get taken when you click on that date.

View 10 Replies

Flex :: Adding Flex Capabilities To An Existing J2EE Enterprise Application Project

Sep 17, 2010

I have an J2EE Enterprise Application Project in which I would like to add a few Flex screens. How do I go about adding Flex capabilities.

I have build Flex/J2EE applications from scratch but can't think of the best way to do this.

I am currently using Flex Builder Plugin for IBM Rational Application Developer 7.5.

View 1 Replies

Actionscript 3 :: Write An Adapter That Maps All The LinkedSetFx Events To The Expected Flex Collection Events(As3Common-collection)

Aug 25, 2010

LinkeSetFx has its own CollectionEvent, but I don't know how to map the LinkedSetFx event to mx.events.collectionEvent(I want use it in ComboBox). LinkedSetFx is in AS3Commons-collection framework.Here is the url, choose the as3commons-collections-1.0.0.zip, you'll find LinkedSetFx in srcorgas3commonscollectionsfx

View 1 Replies

Data Integration :: Building An Events Calendar With The DateChooser Component

Sep 12, 2007

The AS2 DateChooser has just the functionality I need to build the events calendar that I have to build .. however .. while I know what to do in theory, I'm stumbling on (a) whether it will work and (b) syntax.

I want to display an instance of the DateChooser (myDate) and access the selectedDate property when the user selects a date. Then I need to pass it to the main events page preferably on the same page with something like this:

SELECT EventTitle. EventDescription, EventLink FROM Events
WHERE EventDate = MMColParam

MMColParam 1 myDate.selectedDate

The page itself is ASP. I am thinking I would probably define a variable and perhaps use LoadVars to load the selected date from Flash .. not something I have done before.

Perhsps something like

dim eventDate
eventDate = myDate.selectedDate

I'm sure that's not the syntax .. but I think that is the theory. I should be able to access the selectedDate property of the Date Chooser instance and feed the date into the query to select the events on that date and list them.

View 2 Replies

AS3 :: Flash - Detect NetStream Events With Video Object (not Component)

Jan 11, 2010

I have created a FLV video player using the AS3 flash.media.Video object (not the FLV playback component) and I am trying to listen for meta events and Cue Points embedded in the FLV video but I am not receiving any when I trace the movie. The cue points are not being created dynamically, they are in the FLV video.

Video embed code:
// Initialize net stream
nc = new NetConnection();
nc.connect (null); // Not using a media server.

[Code]....

Is there anything I am missing have wrong to capture events from my net stream?

View 2 Replies

Actionscript 3.0 :: Disable Mouse Over Events For Combo Box Flash Component?

May 12, 2009

I need a way to disable the mouse over events for a combo box flash component as it is sitting inside a movieclip (A) on the stage, when I mouse over the movie clip I add a glow to a different mc (B) in the movie. Problem is is that the combo box is preventing the mouse over even in A to occur so B is not 'lighting up'.None of this works as it still appears to register a MouseOver event:

Code: Select allmyComboBox.focusEnabled = false;
myComboBox.textField.focusEnabled = false;
myComboBox.dropdown.focusEnabled = false;'s built in ones?

[code].....

View 2 Replies

Actionscript 3 :: Flash Cs4 Combobox Component Totally Ignore Styles And Events

Feb 10, 2010

I have simple combobox component in flash cs4, I try to add and event listener like this

mycombo.addEventListener(Event.ADDED_TO_STAGE, added);
function added(e:Event):void
{
trace("HI");
}

never get called even if I have the component in the stage manually or via AS, but if I add a listener to MouseOver it works, why the ADDED_TO_STAGE event don't work, also I have a problem with the textFormat style if I use

mycombo.setStyle("textFormat", tf);//suppose tf is a TextFormat object

doesn't work too, but if I put that line inside the MouseOver event it work's why??

View 1 Replies

Actionscript 3 :: Inside The Library Use Of A Bunch Of Classes/packages - Expose One Of These Classes?

Feb 3, 2012

I am creating a library in AS3. Inside the library I make use of a bunch of classes/packages that need not be exposed to the end user of my lib. I want to only expose one of these classes.

I guess my questions are:

1) How are libraries commonly distributed in AS3?

2) Is there a .jar equivalent in AS3 that developers can include, but will only have access/knowledge of the classes I've declared as public?

View 2 Replies

Flex :: AIR App That Loads And Runs Existing AIR Swf?

Feb 19, 2010

I have an existing AIR app whose main content is App.swf.I would like to have another AIR app that hosts and runs App.swf. When I say run it, I mean displays it's WindowedApplication.Here's the code for the 2 AIR projects (imports are omitted for brevity):

// App AIR Project -> App.mxml -> App.swf (it's just a window)
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml">[code]....

I get the following error while App.swf is being loaded:

TypeError: Error #1009: Cannot access a property or method of a null object reference.at mx.managers::SystemManager/initHandler()[C:autobuildgalagaframeworksprojectsframeworksrcmxmanagersSystemManager.as:3001]

I believe the issue has to do with AirAppHostApplication's SystemManager conflicting with App's SystemManager because they are both living in the same app domain. Can an AIR app be written where a WindowedApplication class isn't statically defined, but loaded at runtime by loading a swf and instantiating the WindowedApplication subclass that's contained in the swf.The reason I want to do this is for an automation scenario where I have to assume I don't have the source code for the app I'm automating, but I do have access to the names of the public classes and their public methods exposed for automation. I have complete control over the environment and don't have to deal with any constraints around that, so I can put 2 AIR apps in the same directory, etc.

View 2 Replies

Flex :: Unreachable, Existing Variable?

Jun 13, 2010

I'm new at as3, maybe thats the reason why i don't understand, why the setInterval causes an error.

<mx:Script>
<![CDATA[
import flash.utils.setInterval;

[code].....

View 1 Replies

Flex :: Compile An Existing Project With The SDK

Jun 20, 2010

I'm trying to compile an existing Flex3 project with the Flex4 SDK. I'm getting this error:

Warning: This compilation unit did not have a factoryClass specified in Frame metadata to load the configured runtime shared libraries. To compile without runtime shared libraries either set the -static-link-runtime-shared-libraries option to true or remove the -runtime-shared-libraries option.The resulting file is roughly the same as my old Flex3 compiled .swf file. Playing the resulting .swf file in the Flash Player also gives the following errors:

An Actionscript error ocurred: VerifyError: Error #1014: Class spark.core::SpriteVisualElement could not be found If I set the compiler attribute static-link-runtime-shared-libraries to true, then the error disappears and all is well. However, the size of the resulting .SWF is a couple of 100K's bigger. And that's not what I want.

I don't fully understand the concept of runtime shared libraries, but it seems that with the option to statically link them set to true, the libraries are included in the .swf. However, I like to exclude them from the .swf and only load the needed library at runtime, as my project seemed to do with Flex3 (I didn't know that by the way).

If I understand correctly, playerglobal.swc should hold all the necessary code for the external libraries that my .swf has to load. Do Flex4 compiled files need more libraries? Should I do something with the factoryClass in the Frame metadata tag?

I think my question boils down to this: How do I compile a Flex4 .swf that is the same size as my previous Flex3 compiled .swf?

View 3 Replies

Web Development :: How To Integrate Flex With Existing Web App

Sep 2, 2010

I'm having trouble conceptually understanding how to integrate flex components -- forms, charts, data grids, etc. -- with an existing web app. There are certain aspects of the web application where I believe it makes more sense to use flex -- however, I DO NOT want to replace the (html/js/java) web-app with a pure flex based app.For example, currently the web app displays user data using html tables and java based charts, I'd like to re-implement this "data display" using flex. Would I have to create a flex "application" for the "data display"?

View 1 Replies

Flex :: How To Add New Column Based On Existing One

Apr 6, 2011

I have a AdvancedDataGrid in flex3 (Flex 3) with 4 columns:
id : int
category : String
name : String
isPreferred : Boolean

And I would like to add a fifth column
favorite : Image
The value of favorite will be based on the value of is Preferred : if true, then favorite will be a read-heart-icon, if false, a grey-heart-icon.

Below is my code :
the mxml content
<xml version="1.0"?>
<mx:Application xmlns:mx="[URL]" applicationComplete="init()">
<mx:Script>
[Code] .....

View 1 Replies

Flex :: Reading In Existing File In 4.6?

Mar 8, 2012

I have a data file on my computer that I need my flex mobile app to read from. Is it possible to put this file in a certain location on my computer so that the app will see it when I'm testing(ex-can i put it in a folder that is linked to the applicationstoragedirectory directory)?

View 1 Replies

Flex :: Add Additional Name-value Pair In An Existing Object?

Apr 5, 2012

adding additional name-value pairs to my existing object in Flex;

I have an object1 of Object Type and I declare a new object2 = object1 plus some extra name-value pairs, is there a way to attach new name-value pairs to an existing object?

View 2 Replies

Flex :: Rebuilding Existing Flash Project

Nov 23, 2010

I'm not a flash developer.We paid a developer to build us an app. It is nearly perfect, but a few things in the actionscript need tweaking (purely the values of some URL's for action when buttons are clicked.)I believe I need to rebuild the project to pull this information through.I believe he has sent me the full source. Do I need to install all of the dependencies to get this to work? I'm tempted to just go in and make the changes in a hex editor..

View 1 Replies

Flex :: Replace An Existing XML File Using Webservice In It?

Jul 15, 2011

Is it possible to Replace an existing XML file using Webservice in Flex(browser-based application)?

I wanted to replace an existing xml file with new xml file of same name for example 'dashboard.xml'.

How can i replace this file from Flex browser-based application? can this is possible using webservice?

what things should be taken care to implement this?

View 1 Replies







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