Flex :: Access A Public Function Outside Of The View It Is In?

Feb 6, 2012

I have been working on a Flex Mobile application using Flash Builder 4.6. I have 2 mxml 'views' in my project. In one mxml file, i have a function that grabs xml data. In my other mxml file, I have a refresh button that when depressed is suppsosed to call the function in the first mxml file in order to once again grab the xml data. I dont know how to call that function from outside the mxml file it is housed in. [UPDATE #2]* I thought I should share some more details about my issue.

It is a reddit client mobile app. It fetches the feeds, etc. In my main view called RedditReaderHomeView.mxml, I am using a splitViewNavigator spark component to house two other views like so:

[Code]...

View 2 Replies


Similar Posts:


Flex :: Security - Limiting Web Service Access To Public

Oct 6, 2009

I have a flex application which collects data entered by the user and posts it off to a web service I have running on a back end server. The flex application does not authenticate users (it's available for anyone to use without setting up an account) and communicates to the web service using HTTPS. There is an XML firewall in place for preventing certain malformed requests, DoS attacks etc and the web service validates all data received from the client.

If I was to sign the content then I could use the XML firewall to verify the signature but I assume that any certificate type data I embed in the client could be extracted out of the flex app through some means of de-compilation. My question is, is there any way of limiting calls to the web service to only those from my flex client? I understand that a user could input bad information but I'm really trying to prevent another client or 'bot'.

View 2 Replies

Flex :: Access The Public Properties And Methods Of A Loaded SWF

Mar 18, 2011

How would you go about calling the public properties and methods of a SWF you load in actionscript?

I have been using stackoverflow for years to answer my programming questions so I wanted to give back by writing a guide to an issue I had a lot of trouble figuring out. This is my first user guide so tell me if there is anything I can do to improve it.

View 3 Replies

ActionScript 3.0 :: Access A Public Function (main.as) From Main.fla?

Oct 8, 2010

If I have a main.fla and main.as (where I written a Main class).

How can I access a public function (main.as) from main.fla?

View 4 Replies

Actionscript 3 :: Flex Override Public Function Set Data

May 11, 2010

I have a datagrid with itemRenderer in datagridcolumn as my custom component(c1). I am getting the dataprovider data in custom component by overriding the set data function, it is fine. But now my custom component(c1) is also having another custom component(c2).

Now the doubt is - how to get the dataprovider data in c2 component?

View 1 Replies

Flex :: Override Public Function Initialize() Error?

May 6, 2011

i want to know what i should put befor .mx_internal

override public function initialize() : void
{
var target:DialogButtons;
var watcherSetupUtilClass:Object;

[Code]....

View 2 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 :: Access A View Inside A Tab Navigator When A Tab Is Clicked?

May 19, 2010

I I have a view in Flex 3 where I use a tab navigator and a number of views inside the tab navigator. I need to be know which view was clicked because of it's one specific view then I need to take action, i.e. if view with id "secondTab" is clicked then do something.

I have set it up to be notified, my problem is that I need to be able to know what view it is. Calling tab.GetChildByName or a similar method seems to only get me back a TabSkin object.

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

[Code].....

View 2 Replies

Flex :: Components - Executing A Function On Another View?

Jun 5, 2011

I have a headerbar.mxml that is displayed when user swipes_down in my app. The headerbar.mxml contains a button component I want to run an erase() in the main application window. The main application is a drawing app that contains an erase(). I just don't know how to call a function from another mxml view file. I thought it would be something like

click="{mainwindow.drawPanel.erase()}";
EDIT:
protected function onColorChange(event:List):void{

[code]......

View 1 Replies

Actionscript :: Flex - Run A Function When View State Is Change

Apr 12, 2012

I am learning Flex and trying to make a simple RPG to practice. I am using view states to change between screens. right now I have a HomeView.mxml which displays my character information, InventoryView.mxml which shows my inventory items, and EquipmentView.mxml which shows the equipped items. They each have their respective view states.

in my main mxml file, i create a global variable for the character and an ArrayCollection of items in the game. it creates 2 labels in mxml for Inventory and Equipment and when i click on the label it calls a click handler which sets currentState="EquipmentView" or "InventoryView" This works and the state changes and the respective views are shown properly. My problem is in my EquipmentView state. When i enter the state the first time, it has a creationComplete function which displays images for my equipment and sets a click handler. when i click the item, it "unequips" it and removes it from the equipment list and removes the image. this also works fine, but when I go to my inventory view and "equip" an item and return to the EquipmentView, the image does not show. I have a label which counts the length of my equipmentList variable and that is accurate when i switch views, but i cant get the image to display again. Is there a way to call my displayEquippedItems() function (which is originally called on creationComplete) when the view is changed?

[Code]....

View 2 Replies

ActionScript 3.0 :: Access Public Static Var?

Jun 16, 2011

So my question is how i can access public static var from an external loaded swf?

View 9 Replies

ActionScript 3.0 :: Cannot Access Public Variable

Nov 28, 2009

I think I've made some fundamental error here... I have a public variable a in class A, and I want to access it in class B, but I cant (access of possibly undefined property...) now every time I want to refer to a variable in class A I need to pass the variable reference to class B's constructor

View 4 Replies

Flex :: Presentation Model Pattern Can View Specific Logic Reside In View?

Aug 15, 2011

I'm currently using RobotLegs with the Presentation Model pattern to develop a Flex 4 project. I understand that all business logic related to a View resides in the Presentation Model associated with that view, however, I am confused when it comes to View specific logic.For example, I have an indicator that needs to be positioned relatively to list items depending on which list item is selected. Is it acceptable in the Presentation pattern to put the logic that will position the indicator in the View and simply have that logic run in reaction to a selectedIndex property changing in the presentation model?The reason I am considering this is that since the Presentation Model does not have a reference to the view it is difficult to come up with an ideal solution for manipulating view components.

View 1 Replies

ActionScript 3.0 :: Access Of External SWF's Public Methods

Apr 23, 2009

How would I access a loaded in swf files public methods in my main swf. 
 
var temp:ExternalSWFLoader = new ExternalSWFLoader("FX_Ticker.swf");
temp.x=temp.y=0;
Ticker =(Sprite)(temp);

[Code]......

View 18 Replies

ActionScript 3.0 :: Access A Public Method In (swf) New ApplicationDomain?

Jul 29, 2009

How to access a public method in the swf loaded in a new ApplicationDomain?

ActionScript Code:
var appDomainA:ApplicationDomain = new ApplicationDomain();
*
var contextA:LoaderContext = new LoaderContext(false, appDomainA);
var loaderA:Loader = new Loader();
loaderA.load(new URLRequest("application2.swf"), contextA)

I want to access a public method in application2.swf from the main swf that loaded it.

View 8 Replies

Flash :: AS3 - Access Class Public Var From Inside Fla File

Oct 24, 2011

I have searched for this everywhere but it seems like every answer is either overcomplicated or simply does not work, and I know for sure there should be a more simple way of achieving what I need. So, until today, I have always coded from within the timeline. But now I realise why I should code in separate class files. However, I still want to include snippets of code in the timeline for simplicity's sake.

[Code]....

View 2 Replies

ActionScript 3.0 :: Access Public Var/functions In The Document Class?

Mar 27, 2011

How do I acsess public var/functions in the document class?

View 7 Replies

Actionscript 3.0 :: Access Public Static Variables In A Loaded Swf?

Feb 27, 2009

I'm literally new in AS3 and slowly trying to migrate in thats why im here seeking for help. Can someone help me how to access/control a certain public variable in a loaded swf from the main swf? this problem has been paralyzing me for days. (sigh...) [code]...

View 1 Replies

ActionScript 3.0 :: Error 1180 Can't Access Public Functions?

Sep 17, 2011

No idea what I'm doing wrong here, it just won't let me access any of my public methods on my class. I just keep getting "Error 1180: call to a possibly undefined method"!

If I run the same function in the constructor of the class everything is fine.

[Code]...

View 13 Replies

ActionScript 3.0 :: Unable To Access The Public Properties Of Custom Class

Nov 28, 2008

i wonder why i am unable to access the public properties of this custom class the public var w:Number; and the Public var h:Number; i am tracing them and on an instance of the PreLoader() Class.. and ia m getting NAN;

View 12 Replies

Flex :: Change A View From Inside A View?

Jun 13, 2010

I have one .mxml file (the Application) with a ViewStack (with 4 views) and a ControlBard, obviously I can change the views with it, but what I want to do is: in view #1 I have an image which I want to convert to a "hyperlink", so when I click it I go to View #2, is this doable? Also I would like to pass somehow some data (like a String) to that View #2 (lets say the it's a user avatar I click so I want to go to the second view which will show me his profile, that's why I need his name/id).

View 1 Replies

Flex :: Taken Push View Object Into Next View?

Sep 28, 2011

My problem is that when I try to pass an object from the navigator.pushView(view, dataobject), I can't figure out how to access the dataobject from actionscript. I can access {dataobject.property} from MXML easily, but I want to set a variable in the new view to the passed dataobjects property.

View 1 Replies

ActionScript 3.0 :: How To Run A Public Function

Sep 26, 2010

How can I run a public function in the DocumentClass?

View 4 Replies

ActionScript 3.0 :: Access Of Undef Prop Error - Making Private Variable Public

Apr 27, 2010

I have the below script as part of a small application I'm building. The script just creates cue-points along a movies timeline so we can add events etc to those cue-points.

[Code]....

It's creating the cue-points well, although I'd like to use the below variable outside of this function.

Code: var stampName When I try and use it I get an access of undefined property error, which I believe relates to the variables being private and within the function - but I can't seem to find a method to get this varibale public.

View 2 Replies

ActionScript 3.0 :: Return A Value From A Function To Public?

Sep 26, 2008

there is an interesting problem here:

How to return a value from a function to public?

Here is the code:
var df:String; //i declared it here
function onResult(e :OperationEvent):void
{
df = e.data.toString(); // i set it here

[Code]...

View 5 Replies

ActionScript 3.0 :: Have A Class With Public Function?

Jan 14, 2009

Is it possible to have a class with a public function [code]...

View 8 Replies

Actionscript 3 :: Override Public Function Both Are Called?

Jun 16, 2011

If I override a public function in a base class, I would have thought that this override function is called and the original is ignored? though this doesn't seem to be the case...

public class AbstractScreen extends Sprite
{
public function AbstractScreen()
{

[Code]....

If my model dispatches a CHANGED_LANGUAGE event, the text in the views gets updated, But I also get a trace of "WARNING: need to override public function updateLanguage()"

View 1 Replies

ActionScript 3.0 :: Load 2 Xml File Into One Public Function?

Aug 12, 2010

If i want to load 2 xml file into one public function, do i need to have seperate private functions for both. do in need to declare 2 variables.

View 9 Replies

ActionScript 3.0 :: Override A Protected Function To A Public?

Sep 1, 2010

Is it possible to override a protected function to a public.

View 5 Replies

ActionScript 3.0 :: Call Public Static Function From JS?

Jan 6, 2011

Is it possible to call/envoke a public static function from JS? I can't seem to get it working and Im almost certain it cannot but I thought I would ask the community.

View 2 Replies







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