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 9003111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:40:18+00:00 2026-06-16T00:40:18+00:00

this is the main application <?xml version=1.0 encoding=utf-8?> <mx:Application xmlns:mx=http://www.adobe.com/2006/mxml verticalAlign=middle backgroundColor=white layout=absolute initialize=init();

  • 0

this is the main application

<?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
            verticalAlign="middle"
            backgroundColor="white" layout="absolute" initialize="init();"  xmlns:MyComp="screens.*" >
            <mx:Script>
                <![CDATA[
                import screens.MyEvent;

                    private function init():void
                    {
                         systemManager.addEventListener("data_transfer",handleDataTransfer);

                    }
                    private function handleDataTransfer(evt:MyEvent):void{

               this.myViewStack.selectedIndex=1;

                 }


                ]]>
            </mx:Script>


    <mx:ViewStack id="myViewStack" selectedIndex="0" width="1110" height="636">
    <MyComp:Welcome />
        <MyComp:Screen id="fillPage" />
        </mx:ViewStack>
    </mx:Application>

this is my Welcome component

<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="930" height="300" >
<mx:Script>
    <![CDATA[
       private function changeHandler():void{
        var myEVT:MyEvent = new MyEvent("data_transfer",false, true);
        this.dispatchEvent(myEVT);
       }

    ]]>
</mx:Script>
 <mx:Button label="Fill The Form" id="fillForm" click="changeHandler()"/>           
</mx:Canvas>

this is my screen.mxml

<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300">
<mx:Label text="hai">
</mx:Label> 
</mx:Canvas>

this is MYEvent.as

package screens
{
    import flash.events.Event;

    public class MyEvent extends Event
    {

    public static const DATA_TRANSFER:String = "data_transfer";

        public function MyEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
        {
            super(type, bubbles, cancelable);
        }

    }
}

I want to get the Screen mxml by clicking the button at welcome mxml…i am initial learner..
but it is not working..Please help me..

  • 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-06-16T00:40:18+00:00Added an answer on June 16, 2026 at 12:40 am

    As your custom event has bubbling=false, it wont bubble upto the systemManager. try:

    var myEVT:MyEvent = new MyEvent("data_transfer", true, true);
    

    Alternatively, add the listener to the object that is dispatching the event:

    welcomePage.addEventListener("data_transfer",handleDataTransfer);
    ....
    <MyComp:Welcome id="welcomePage" />
    

    Second solution is generally better/preferred – less event bubbling is a good thing

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

Sidebar

Related Questions

I have a GridView like this( main.xml ): <?xml version=1.0 encoding=utf-8?> <GridView xmlns:android=http://schemas.android.com/apk/res/android android:id=@+id/gridView1
I am trying to implement this example http://www.javacodegeeks.com/2011/02/android-google-maps-tutorial.html and i have followed exactly all
So I have a UIViewController (main application controller is a TabBarController). On this there
I have this web application using Spring Web Flow framework. In my main page
I'm trying to do blog application and I want main page to have this
I have an existing C++ win32 console app. This application contains a main program
I have in my application 2 views: a. res/layout/main.xml - a standard view with
I've created a WebView-based application according to http://developer.android.com/resources/tutorials/views/hello-webview.html Although I did exactly what was
I want to implement Prime Faces example I created this JSF page: <?xml version='1.0'
My program is like this ( main.c ): #include <stdlib.h> #include <stdio.h> void main(){

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.