Flex :: Reference A Control In An Application From A Static Function?

Feb 28, 2012

Is it possible to reference a control in an application from a static function?

What I have is a Viewstack containing VBoxes stored in separate controls. Ex:

<mx:ViewStack id="content" width="100%" height="100%" resizeToContent="true">
<controls:Login/>
<controls:Dash/>

[Code]....

Once I get logged in on my login control, I would like to change the selected index of my ViewStack. From my outside controls, I cannot reference my ViewStack by name. I can reference a public static function from an outside control however I cannot refer to the ViewStack from within that function.

View 3 Replies


Similar Posts:


ActionScript 3.0 :: Call To A Possibly Undefined Method Child Through A Reference With Static Type Function

Mar 29, 2011

public var blob:Blob = new Blob()
addChild.child(blob)

i get this error Call to a possibly undefined method child through a reference with static type Function.

View 4 Replies

Flash :: Control Flex Application From Embedded Control?

Mar 21, 2010

I have a flex application and have embedded a flash (SWF) file into it using <mx:SWFLoader>. There is an "Exit" button on the Flash file. I want to be able to handle the button click event on the flex application.

So when that button in the flash file is clicked, I want to perform an action in the parent flex application.

View 2 Replies

ActionScript 3.0 :: Altering A Reference To A Static Var Alters The Static Var Itself?

Aug 25, 2009

Let's say you have the following situation:

1. Static var(an Array) stored in a class.
2. You create a variable reference to the static class in a separate class.
3. Splice some items from the reference variable in the separate class.
4. Trace the static class and the items have been removed from that too.
5. Verify several times.
6. Get confused.
7. Post on Kirupa.

View 3 Replies

Flex :: Call To A Possibly Undefined Method Through A Reference With Static Type Class

Aug 1, 2011

I wrote a singleton class to keep track of some variables across my application.

I am getting a syntax error that I can't figure out, I am sure that I am missing something simple but it's been one of those days. Anyone see something wrong with my code?

The error is 1061: Call to a possibly undefined method setResult through a reference with static type Class.

My function in my singleton class

public function setResult(resultNumber:int, value:int): void
{
switch(resultNumber)
{

[Code].....

View 2 Replies

Flex :: Require A Function Parameter To Be A Static Constant Of The Function's Class?

May 22, 2009

Let's say I have a Custom Event Class, and it has several Event types stored in static Constant:

[Code]...

Is there an easy way to validate that the type passed to the Constructor is one of the Static Constants of the Class, without having to check it against each value?

View 5 Replies

Flex :: Error - Access Of Possibly Undefined Property Selected Through A Reference With Static Type TrashContainer_inlineComponent1

Jan 6, 2010

I want my checkbox -- which is in a datagrid, to be selected when the row of the datagrid is selected. And for this I wrote the following code:

<mx:DataGrid id="dg_trashContent" allowMultipleSelection="true"
verticalGridLines="true"
dataProvider="{trashDataProvider}"

[code]....

But I get an error for "selected" property that i used in my checkBox. the error says :
Access of possibly undefined property selected through a reference with static type TrashContainer_inlineComponent1.

View 1 Replies

Actionscript 3 :: Store Reused Static String Constants In Flex Application?

Jun 10, 2009

I have two Cairngorm MVC Flex applications (a full version and lite version of the same app) that share many Classes. I have put these Classes into a Flex Library Project that compiles as an SWC. Both applications use some static String constants. Right now, I am storing these in the ModelLocator:

package model
{
[Bindable]
public class ModelLocator

[Code]....

View 1 Replies

ActionScript 3.0 :: Static Methods - Error "1119: Access Of Possibly Undefined Property Instance Through A Reference With Static Type Class"

May 4, 2009

I'm kind off oblivious as to what I'm doing wrong here... I have two classes: - Alley - AlleyCat

[Code]...

View 8 Replies

Flex :: Testing - Null Object Reference With Automation Enabled Flex-application At Preloader?

Jun 10, 2010

We are trying to automate our flex application. After adding automation libraries to our project we get the following exception:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at mx.automation::AutomationManager$/addDelegates()
at mx.automation::AutomationManager$/addDelegates()
at mx.automation::AutomationManager$/addDelegates()

[code].....

We are using Flex 3.4 and maven2 to build the application.

View 2 Replies

Flex :: Error 1061 Call To Possibly Undefined Method Save Through A Reference With Static Type Flash.net:FileReference

Jun 2, 2011

I want to save XML File using Flex 4 SDK

var fr:FileReference=new FileReference();
fr.save( newXmlRow, 'D:/Sample.xml' );

Error Shows :

1061 "Call to possibly Undefined method save through a reference with static type flash.net:FileReference"

View 2 Replies

Flex :: Static Var In Member Function?

Jun 20, 2011

I would like to know, in Flex 4.5.1, if there is a way to create a static variable in a member function, something like bellow:

public function myFunction():void {
static test:Object = null;
}

View 2 Replies

Flex :: Create The CORE Application To Reference Sub-applications?

Jun 3, 2009

I am trying to create a large flex project. This Project consists of a CORE application, and other sub-applications.The CORE application should contain information that will be shared by all other projects (e.g., link to database, data manager which loads data from the database, application information like height width colors fonts... etc.).

The sub-applications each has a certain task. Each sub-application is a large project by itself so I don't think its a good idea to put all code inside one HUGE project.The CORE project should run the main application, and through a navigation menu, I should be able to click and run other sub-applications.Is there a way to created the CORE application to reference those sub-applications so that I can run them inside of the CORE. At the same time, those sub-applications should reference the CORE applications to get the NetConnection to the database and other important information that they might share?

View 3 Replies

ActionScript 3.0 :: Static Function Calling A None-static Function?

May 18, 2011

Basically, what I mean is I i have few layers of classes, that calls and change something on the 1st(root) class. In between the process I have to use static var and static function.But when I want to run a function which does not change any variables, for example:otoAndStop(someFrames), I need to make the function a static function too or else there would be error

Code:
1061: Call to a possibly undefined method checkStatus through a reference with static type Class.

[code]....

View 4 Replies

Flex :: Set An Application Control Bar's Color In It?

Mar 16, 2011

I can't seem to figure out how to set the application control bar's background color in flex 4? It doesn't have the backgroundColor property, and I'm a little stuck.

View 2 Replies

ActionScript 3.0 :: Static Function Can't Find Non-static Functions

Jan 6, 2010

Ok, so I have a bit of a mess here (Which I'm probably not doing right anyway, which could be my problem...). I have a document class, I'll call it as Body.as, that creates an object from another class known as Headgear.as. There are also other objects created from other classes, or will be in the future. Now, amoung all this, Headgear.as and all of the other classes Body.as will use to make objects require the use of dragging functions (starting and stopping dragging). On stopping drags, position checks are then made to compare a particular hidden movieclip with the dragged MC.

To try and save myself some hassle (from making the same functions over and over to ensuring that when the objects are created I don't need to send a complete crapload of variables just to ensure the position checking function would work), I had the functions for the event listeners (Which are set-up on the draggable MCs in Headgear.as) just direct to functions in Body.as

[Code]...

View 6 Replies

Flex :: Flash - External Swf Control Application?

Dec 21, 2009

I have a flex application that loads an external swf file. I created the external swf file using flash cs4 so I can add code to it if that is what it takes.

Here is the code I use to load my external swf:

//add button swf
var request:URLRequest = new URLRequest("http://www.yadayada.com/media/but_button.swf");

[Code].....

Can I have my external swf send click events to my flex application? How?

View 1 Replies

Flex :: Remotely Control 100's PC From A Master Application?

Nov 13, 2010

For classroom, how do I actually able to remotely control 100's PC from a master application? Like control the student who also using Flex application is possble with XMLsocket?

View 3 Replies

Flex :: Swfloader: Can Control The Volume Of The Application Loading

Dec 17, 2009

i have a flex application that loads flash files using SWFLoader. is there a way to control the audio volume in that swf from my flex application ?

View 1 Replies

ActionScript 3.0 :: Accessing Control Of .swf File Into Flex Application?

Sep 6, 2010

i have uploaded in flex, swf file which is created in flash actionscript. This swf file is having the textArea controls.content of textarea changes as i perform some clicks, keyboard input.Now i want to access the content of textarea in my flex application's variable.I have seen some example where a movieclip object is created to get the content and load the method of flash project.

View 0 Replies

Flex :: Bindable - Error "1195: Attempted Access Of Inaccessible Method IsShowingPower Through A Reference With Static Type Components"

Jul 8, 2010

I have a class called which is called ChartInfo,and it has a getter and setter methods as:

[Code]....

It will always give error like: 1195: Attempted access of inaccessible method isShowingPower through a reference with static type components.charting:ChartInfo.

View 2 Replies

ActionScript 3.0 :: Static Class Needs A Non-static Function

Nov 22, 2009

Alright, so I have a class that is linked (via the linkage panel) to a scrollbox class. I'll paste the class here:[code]Ignoring the formatting, the commented out functions are the ones causing the issue. Adobe says that it's a static class and I can't use non-static functions. The way I wanted to use it was:

1. Call the page button generating function above.

2. In the main code in my program is this line:scrollbox.setClickFunction(historyContent.generate Page);So when the buttons that are supposed to be generated are clicked, the scrollbox class can call the History pages generatePage function and pass it which page to show. (I did this because there was a lot of text and a limit on how much would display, so small chunks sounded logical).

3. In the onClick function (which I haven't finished yet because the rest wont work), when you click one of the buttons it calls the set function. Its that simple.

View 4 Replies

Actionscript 3 :: Can't Use Static Const As Parameter In Function Call Within Binding Tags In Flex 3

Apr 23, 2010

I'm having a problem in flex 3 where if a static const I have defined is used as the parameter to a function call within binding tags I get a "1120: Access of undefined property NodePropertyMatrix". _propMtx is a ArrayCollection.

[Code]...

View 1 Replies

Flex :: Programmatically Enter Edit Mode In Tree Control Inside Application

Jan 17, 2010

I have a Tree Control inside my Flex Application which I want to edit on a doubleclick on a tree item. I found the properties doubleClickEnabled= "true", doubleClick="startEditMode()", and editable="true". With these functions I can detect a double click and I can change the editable property to true based on a double click. The problem is that after I double clicked on a Item i have to click once more to really enter the edit mode. That doesn't seem to be intuitive at all..

View 3 Replies

ActionScript 3.0 :: Reference Static Constant Name In XML?

Mar 16, 2010

maybe this is something small I'm overlooking, but I can't figure out how to pull this offI have an XML file that keeps data on my tilesheets. Currently it keeps info on the width and height of the tiles (works fine), but I also want to tell my program what part of ananimation it belongs to. I have a class set up that keeps some constants on the state of the object, that will decide it's animation. For example, if the state equals"PlatformState.WALKING", I alternate between tiles 1, 2 and 3, if the state is"PlatformState.FALLING", It alternates between 4 and 5.The static constant PlatformState.WALKING is a uint with value 0, FALLING has value 1, etc. But I don't want to put the rough values in the XML, but the constant names.

View 2 Replies

ActionScript 3.0 :: Stage Reference In Static Class?

Feb 17, 2009

I have a static utility class that must have a reference to the stage, and I'm not sure what is the best option for me to get the stage inside my class...

I've thought of these options:Pass in as a parameter of the function Have a static variable I can set to the stage I don't like either of these because they are ugly.

What methods can you suggest for me to get a reference to the stage in my static class?

View 8 Replies

Flex :: Run A Function On First Run Of A Air Application?

Apr 16, 2011

I want to call a function only when the air application is run on a system for the first time after installation. Is there something I can check to determine this?

View 1 Replies

ActionScript 1/2 :: Reference Static Class Vars Via A String?

Feb 5, 2010

I am trying to set the value of some static vars but I need to reference the class with a string rather than a proper constructor. In AS3 I can do this with:

var ref:Class = getDefinitionByName(classDefinitionAsString) as Class;
ref[varNameAsString] = newValue;
 
I can't find an equivelant approach that will work in AS2 though. I have tried:

var ref:Object = new [classDefinitionAsString];
ref[varNameAsString] = newValue;

This seems to just create an Object and as the vars that I am trying to access are static I don't really want to be using 'new' I just want to reference the vars.

View 1 Replies

Actionscript 3 :: Reference To Public Static Var In Array Not Working?

Feb 25, 2010

I'm setting up a class of public static vars that are to be BitmapData.

The problem I'm having is I can't seem to reference the vars dynamically in an array, making it impossible to give them values without some serious procdedural style coding.

This is what it looks like

package com.myPackage{
import flash.display.*;
import flash.events.*;

[Code]....

Should I assume it's because my array is a private var and placing references to public static vars is illegal? Is somebody gonna call the flash police on me?

View 3 Replies

Actionscript 3 :: Undefined Method Through A Reference With A Static Type

Mar 10, 2012

I have been away from actionscript for a long time and not 100% why this is happening, I will simplify the class below[code]...

call to a possibly undefined method through a refernce with a static type?

View 1 Replies







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