Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7407251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:41:05+00:00 2026-05-29T05:41:05+00:00

Hi, I have been working on a Flex Mobile application using Flash Builder 4.6.

  • 0

Hi, 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.

I appreciate any help given. Thank you!

[UPDATE #2]*

I thought I should share some more details about my issue.

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

RedditReaderHomeView.mxml

    <s:SplitViewNavigator width="100%" height="100%" id="splitViewNavigator" autoHideFirstViewNavigator="true">
        <s:ViewNavigator id="redditList" firstView="views.subredditList" width="300" height="100%"/>
        <s:ViewNavigator id="redditFeed" firstView="views.redditFeed" width="100%" height="100%">

            <s:actionContent.landscape>
                <s:Button id="refreshButtonlLandscape" icon="@Embed('assets/refresh160.png')" click="refreshRSS()" />
            </s:actionContent.landscape>

            <s:actionContent.portrait>
                <s:Button id="refreshButton" icon="@Embed('assets/refresh160.png')"  />
                <s:Button id="navigatorButton" label="Search" click="splitViewNavigator.showFirstViewNavigatorInPopUp(navigatorButton)" />
            </s:actionContent.portrait>
        </s:ViewNavigator>
    </s:SplitViewNavigator>
  1. As you can see in the code above, in my main view I have a button with the id “refreshButton.” When I click this button, I want the reddit data to refresh. In other words I want to call a function to refresh the data, that is housed in the view, ‘redditFeed’.
  2. This is the function which is in a separate view named ‘redditFeed.mxml’, that I want to call using the refresh button in the main view shown above.

redditFeed.mxml

    protected function myList_creationCompleteHandler(url:String):void
            {

                getRedditFeedResult.token = redditFeedGrabber.getRedditFeed(url);
                getRedditFeedResult.addEventListener(ResultEvent.RESULT,busyOff);

            }

I hope this helped clear out confusion as to what I was trying to do. Im assuming that the solution is quite simple, but alas, I am a novice programmer and new to Flex, so Im learning the ropes. Any help is appreciated. Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T05:41:06+00:00Added an answer on May 29, 2026 at 5:41 am

    IF you have an instance of the view, then just do:

    myViewInstance.myPublicFunction();  
    

    In MXML, the id element of the MXML tag is used to reference the view in ActionScript. Since you didnt’ describe your architecture; it is unclear how one view can call the other.

    If the view that needs to trigger the call is a parent of the view that has the function to make the call, then you could use the approach described above.

    If the view that need to trigger the call is a child of the view that has the function to make the call, then you should dispatch an event from the “child” which the parent can listen to. In the event handler you would trigger the call.

    If the view that needs to trigger and the view that has the function to make the call are both children of the same parent; then you should dispatch an event from the “Trigger” view, listen for it in the parent, and then use that event listener to make the call (Using similar code to what I explained above).

    If you have a more complicated architecture of these two views; then you should look into some method to encapsulate the “remote call” functionality, such as into a service class. Many frameworks offer approaches to share that service class and/or results across multiple classes. ( MXML Files are classes).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Flex application with three different views. Only one view is shown
Hi, i have been having some problems using JSON data in flash builder lately
I have been working with the slider and am using the following code: $(function(){
I have been working on Flex for last couple of months and as this
I am working on a Flex Front End at the moment, and have been
I have been working on a web services related project for about the last
I have been working with Visual Studio (WinForm and ASP.NET applications using mostly C#)
I have been working with Struts for some time, but for a project I
i've been working on texthandler in flex. the refernce site i m using is
I have been working on an iPhone project, where we created all the user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.