Flex :: Flex - Function Call Inside Of Component?

Sep 1, 2010

I want to call an App function inside a (I know about the Component scope already).What I mean is this:

<mx:Script>
<![CDATA[
public someFunction():void {

[code]......

View 1 Replies


Similar Posts:


Flex :: Call An External Function From Inside A Class?

Aug 1, 2011

i want to call an external function inside a class. thats the code;

in checkConnectionStatus function,

this[_funcNameForSucceededCon].apply(); doesnt work because "this" is the class, not the Application. How can i reach Application at this time or what can i do?

package myLibrary
{
import air.net.URLMonitor;
import flash.events.Event;

[Code]....

View 1 Replies

Flex :: Call A Custom Component's Public Function In The Main App?

Oct 6, 2010

How do I call a custom component's public function from the main app. For example, I've got a timer component, MyTimer.In the main app, I want to call startTimer() or stopTimer().In the main app, I've got:

<visualcomponent:MyTimer />
In the component, I've got:
public function startTimer():void {

[code].....

View 1 Replies

Flex :: Call Script Function Embedded Inside An Html Page Using It?

Aug 15, 2011

I know there are ways to invoke javascript inside the html wrapper template for the flex application using ExternalInterface, but is it possible to reference an external html page?

View 3 Replies

Flex :: Call A Function Inside ItemRenderer In A Spark List, From The Main Application?

Sep 1, 2011

I have a main application that contains a list, using a custom itemRenderer to display data.

I would like to be able to call a function, inside the itemRenderer, from the main application.

When running the app, we have a list with three persons, and a button. I want to call the function myItemRendererFunction() inside the itemRenderer, of the selected item in the list, all this, from the main app.

[Code]...

View 1 Replies

Actionscript 3 :: Flex - Access Component Inside Another Component In MXML?

Sep 3, 2009

I have two components. One is called "InsideComp" and one is called "OutsideComp". OutsideComp has InsideComp as one piece of its component, and in my main MXML file, I have embedded an instance of OutsideComp. How do I access a public variable of InsideComp within my main MXML file?In Actionscript, I could just do something like:OutsideComp.InsideComp.valToChange = 5; But I dont know how to do it in MXML. I know this is probably an easy question.

View 4 Replies

Flex :: Call Function After Remote Call?

Jan 31, 2011

I have a function in Flex which has three function in it.

public function update():void
{
A(); \Dispatches a event with Remote Call

[code].......

View 1 Replies

ActionScript :: Flex - An Object Returned From A Function Call Changed The Next Time The Same Function Is Called?

Jan 10, 2012

I have an AS3 program that calls a function multiple times. The function must return multiple variables, so I created a class for the function to declare an object containing all of these variables. For example, here's my class:

package
{
public class PER
{
[Code].....

Let's say the calling program calls the function, which returns the variables into data_set1 (where data_set1 depends on input variables arg1, arg2, arg3) using:

var data_set1:PER = function_name(arg1, arg2, arg3);

The calling program does some stuff, then calls the function again, but returns the variables into a new variable name, data_set2:

var data_set2:PER = function_name(arg4, arg5, arg6);

My intention is that data_set1 and data_set2 are different (e.g. not linked together).

My question is, given that arrays are passed by reference, will data_set1 be modified to agree with data_set2 upon the 2nd function call? Why or why not?

View 1 Replies

ActionScript 3.0 :: Call A DispatchEvent Call From Inside Of A Static Function?

Feb 3, 2009

Does anyone know if there is a way to call a dispatchEvent call from inside of a static function?

View 2 Replies

Flex :: Can A Custom Component Call PopUpManager.addPopUp On Itself

Jun 29, 2010

I'm trying to organise my code better and figured it would be good to place the pop-up logic within the component that's being popped-up. However, I can't seem to do this without causing one error or another. I also need to make the pop-up modal.I'm doing something along these lines (psuedo code):

<mx:TitleWindow >
<mx:Label id="messageLabel" />
<mx:Script>
<![CDATA[

[code]....

View 1 Replies

Flash :: Flex Custom Component With More Inside?

Apr 14, 2012

I am creating a custom component in Flex with extends the BorderContainer class, and I would like to be able to place additional content within the tagset when I use it in my main application, like this:

<components:CustomComponent title="Hello">
<s:Label text="If you have one enter it below:"/>
<mx:Spacer height="15" />

[Code]....

This works just fine, except that my component definition had some additional things inside of it, such as a <s:Label/> and styling, which is replaced by the content within the tagset above when I go to use it.

If I do not put anything within the tagset, the content that was originally in the component is not replaced.

Is there a way that I can simply append additional content inside of the component when I go to use it, instead of it being replaced each time?

View 1 Replies

Flex :: Say An MXML Component Is Inside Some Package?

Dec 21, 2009

How do I say an MXML component is inside some package? Well, it's in a different folder... I know how to do it ActionScript... But when I do in MXML I don't declare the package explicitly because I don't know how, and when I call it to my application, it states that The prefix "package" for element "package:Component" is not bound.

View 2 Replies

Flex :: Data Binding With A Value Inside A Component ?

Mar 30, 2010

I'm using Flex with Cairngorm framework.I have a custom component which I create like this:

<components:FriendSearchPaginator id="searchResultsPaginator"
paginationElement="{_model.findFriendsPaginationElement}"
visible="{_model.friendsSearchResultsPaginatorVisible}" />

Where the findFriendsPaginationElement is inside the model locator:

public var
[Bindable]
findFriendsPaginationElement:PaginationElement = new PaginationElement();

Inside the custom component I have button that uses a property of findFriendsPaginationElement object:

<s:Button id="previousButton"
label=" prev "
click="paginateSearchResults(false)"
enabled="{_model.findFriendsPaginationElement.more_previous}"/>

But I get a warning from Flex that the binding wouldn't work that way and it doesn't. It works the first time I load up the component but every time I change findFriendsPaginationElement it doesn't reflect on the component. Do you know how I can go about doing this? (making changing a value in the binding variable changes the status of an element inside a component?)

View 1 Replies

Flex :: Bind To Global Variables Inside Component?

Aug 19, 2009

I've developed a component which is a combination of a few items (canvas, labels, etc...) but when I try to bind it to a variable such as: {stationXML.getItemAt(1).AAA.@value}, it doesnt work. Before I combined all the items in a component, they were all in the main MXML file at which time they worked. Not sure if it matters, but the "stationXML" arraycollection variable is declared inside the file "Station.as".

View 2 Replies

Flex :: Respond To Change Of Data Inside A Component?

Feb 17, 2011

I've created a custom component based on Image component. I want to teach it to respond to change of binded variable. E.g. if main class has a variable balance, I want the component to change image in case balance = 100 one image, in case balance = 50 to another.[code]...

View 1 Replies

Flex :: How To Get X / Y Coordinates Of Caret Inside TextArea Component

Mar 4, 2011

I googled for almost a day to find the answer to my question: [URL]. This almost works (and is a great solution), but the solution doesn't work when I do:
1). Copy and paste multiple-line texts.
2). Write long and scroll the texts.
I also found another working example at: [URL]. (The autocomplete prompt appears when you press ctrl+space right at the caret's position). But an email from its author says he uses monotype fonts to calculate individual character's location. Is there a way to get multi-line input from a textfield?

View 1 Replies

Javascript :: Run Inside HTML Component In Adobe AIR Flex 4?

Mar 26, 2011

I have the following component in an AIR application from Flex 4:

<mx:HTML id="viewObject"
x="10" y="42" width="634" height="313"
location="http;//localhost:8080/mypage.php" />

Now I want to run a javascript when the page loads but the javascript isn't inside the target page. I want to run the following javascript:

javascript:alert('Hello world.');

I tried approaching it by setting the location property again to the javascript after the page has loaded like below.

<s:Button x="10" y="10" label="Button">
<s:click>
<![CDATA[

[Code]....

Unfortunately for me, that doesn't seem to work.

View 1 Replies

ActionScript 3.0 :: Flex Getting Width Of Sprite With Component Inside It?

Jun 3, 2009

why I can't get the width of a Sprite when it has components in it.

For example

Code:

var foo:Sprite = new Sprite();
addChild(foo);
var comboBox:ComboBox = new ComboBox();

[Code]....

I'm assuming the component possibly isn't set before I'm trying to get the width?

View 5 Replies

Actionscript :: Call Functions Inside The Swf File Loaded In SwfLoader Of Flex App?

Nov 18, 2010

I have a swf file sample.swf which has its actionscript class in Main.as. This Main.as has various objects declared as public in it. For instance lets consider an object myData of class MyData (in MyData.as).

I am loading this swf file in my AIR app using swfLoader. I want to know how do I access myData.func() using swfLoader.loaderInfo.content.

View 2 Replies

Flex :: Call() Of Function With Arguments?

Sep 4, 2009

I have a component that I hand over a function

public var func : Function;

Now the function is a function that has parameters in its signature

public function myFunction(s : String) : void {
doSomething(s);
}

from my component I can call the function with

func.call();

how to invoke the function with its parameters?

View 1 Replies

Flex :: Call Function When Dataprovider Changes?

Feb 6, 2011

How can I set a function to be called when the length of a DataProvider changes?

View 2 Replies

Flex :: Dynamically Call A Function?

Jun 2, 2011

How can we dynamically call a fuction. I have tried below code:

public function checkFunc() : void
{
Alert.show("inside function");

[code]......

View 4 Replies

Flex :: Access Properties Of Component Inside Item Renderer

Jun 1, 2010

I have an Item Renderer having HBox. Now I want to add child in that HBox from my application file using addChild method. Any way around for the same. I am not able to access the properties of HBox inside the item renderer.

View 1 Replies

Flex :: Does Window.open Not Work Inside An AIR Html Component

Jun 15, 2010

I have a component in AIR like so:[code]The 2 alerts both work. however nothing happens when you click the new window link.all 3 links works when in a real browser so I know its ok.Is there just no support for window.open in the AIR HTML component? or is this a bug?Is there a work around?

View 2 Replies

ActionScript 3.0 :: Call Function Inside Another Function (error 1136)?

Feb 12, 2011

var speed:int = 4;
addEventListener(Event.ENTER_FRAME,MoveRight);
function MoveRight(event:Event):void{

[code]......

View 3 Replies

ActionScript 3.0 :: [flex As3]function Non Recursive Call. How?

Feb 3, 2009

So, I create standard AS3 flex project. In constructor goes only start();


rest of functions are basically this:

private start():void { f1();}

private function f1():void { f2();}

private function f2():void { f1();}


And it's standard recursion. SWF either breaks or loops as many times as I tell it. One f calls the other, which calls first... I do not want that.

I want f1 to do some stuff, calls f1 and closes itself. Than f2 works, calls f1 and closes. And so on.

Like having 2 sets of code that loops through.
What's the cleanest way to do that?

View 16 Replies

ActionScript 3.0 :: [flex As3] Function Non Recursive Call?

Sep 2, 2009

I create standard AS3 flex project. In constructor goes only start();

rest of functions are basically this:
private start():void { f1();}
private function f1():void { f2();}
private function f2():void { f1();}

And it's standard recursion. SWF either breaks or loops as many times as I tell it. One f calls the other, which calls first... I do not want that. I want f1 to do some stuff, calls f1 and closes itself. Than f2 works, calls f1 and closes. And so on. Like having 2 sets of code that loops through.

View 1 Replies

Actionscript 3 :: Flex: How To Call Function Of Embedded Swf

Jan 5, 2010

I have a Flex 3.4 app that embeds a swf with mx:SwfLoader...

That swf has a public function named "playIt". I've tried dispatching events to gettingHere.content, casting gettingHere.content as a MovieClip and other stuff...

var swfApp:MovieClip = MovieClip(gettingHere.content);
if (swfApp.hasOwnProperty("playIt")) {
var helloWorld:Function = (swfApp["playIt"] as Function);
helloWorld();
}

View 2 Replies

Flex :: Call Parent Function From ItemRenderer

Feb 6, 2010

I want to call the parent function called "edit_groups()" from the itemRenderer. The code for my itemRenderer is:

<mx:VBox id="vbx_container" paddingBottom="4" paddingLeft="4" paddingRight="4" paddingTop="4" borderStyle="solid"
dropShadowEnabled="true" width="100%" height="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off" >
<mx:Canvas width="100%" height="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off" >
<mx:Image id="image" width="100" height="100" source="{data.thumb}" scaleContent="true" maintainAspectRatio="true"
complete="{image_smoothing_handler(event);}" trustContent="true" doubleClick="{Call The Parent Function"edit_groups()"}"/>
</mx:Canvas></mx:VBox>

And I call my itemRenderer from an application like:
list_groups_modify.itemRenderer=new ClassFactory(groups.list_groups_modify_item_renderer);
<mx:Label text="{data.label}" textAlign="center" maxWidth="60" toolTip="{data.label}"/>

View 3 Replies

Flex :: Possible To Call Function By Using Datagrid Column?

May 17, 2010

Is it possible to call the function by using the datagrid column item?I want to call the function while the user click the particular column item in the datagrid?

View 1 Replies







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