How can I control a button from one swf file to another swf file?

Hi,
I have a main.swf file. From that file I am accessing the external.swf file which is an external file.
Now, how can I write code on my main.swf file for the button which is on my external.swf file?
Activities.MainPanel.close_btn.addEventListener(MouseEvent.CLICK, btnClickClose);
Activities.MainPanel.close_btn (This buttons is actually on external.swf file, but I want to write code on main.swf file to execute it on external.swf) how can I control one swf button on other swf file?
Thanks.

Here's some example code that you should be able to adapt to your needs.
// create a new loader object instance...
var loader:Loader = new Loader();
// make the download request...
var request:URLRequest = new URLRequest("external.swf");
// add a complete event listener to the loader
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
// start the actual loading process...
loader.load(request);
// create a new empty movieClip instance, you will put the loaded movie into this movieClip once its loaded
var externalMovie:MovieClip;
// this function is called when the download has finished and the file is ready to use...
function completeHandler(event:Event):void {
   // set the contents of the loaded movie to the new empty movieClip...
           externalMovie = MovieClip(event.target.content);
   // add this new movie to the display list...
   addChild(externalMovie);
Now you can refer to the loaded movie with the instance name "externalMovie". So if, for instance, you want to address a button in the loaded movie, you could write something like this on the main timeline:
externalMovie.addEventListener(MouseEvent.CLICK, btnClickClose);
function btnClickClose(event:MouseEvent):void {

Similar Messages

  • How can I move purchased apps from one itunes account to another account?

    How can I move purchased apps from one itunes account to another account?

    You can't. The apps must be purchased separately.

  • HT5538 how can I transfer several apps from one Apple ID to another?

    How can I transfer several apps from one Apple ID to another?

    Apps purchased by an Apple ID are forever associated with that ID.    Purchases can't be transfers to another Apple ID.

  • How can i change the data from one Time Capsule to another?

    How can i change the data from one Time Capsule to another?

    Do you mean copy it?  If so, see #18 in Time Machine - Frequently Asked Questions  You'll need section 2 there.
    If you mean something else, please clarify.

  • HT4527 how can i transfer my purchases from one windows pc to another without having access to the pc with the music on as it is broken

    how do i transfer my purchases from one windows pc to another without having access to the pc with the music on it , as it is broken ?

    on new pc - open itunes.  sign into your account.  go to settings.  authorise the pc you are now using.  go to account in itunes store.  download purchases.  simples.

  • How can I tansfer a playlist from one iTunes library to another one?

    I have several IPods with different libraries.  How can I transfer a single playlist from library to another without having to recopy the CD's?

    The only way to merge libraries is with the paid ($20) version of iPhoto Library Manager
    Regards
    TD

  • How can I moving Closed Captioning from one stage video to another?

    Someone mistakenly included an MP4 video in a Captivate project. The project won't publish a SWF file (Your computer does not have sufficient memory resources to publish your file), and there are too many Closed Caption items on the stage video to retype them all. I'm searching for options as this will only publish with an FLV version of the video.
    Doesn't the CC text reside some place beside the "Edit Video Timing" window? XML? SWF? Something? Somewhere?
    Thanks

    That's excellent. How can I access what's in the skin? ... I think I may have found the captioning in the Javascript, but the chances of copying it over are pretty slim, I'd say.
    Frankly the way Captivate handles closed captioning isn't good enough. This is mandatory for dealing with public universities, and we're having to program around it.

  • How can I transfer my purchases from one Apple ID to another?

    I would like to consolidate all my wife's and my purchases into one existing Apple ID on our computer so we can share apps, music, books, etc.
    I spoke with your Support Team who said this was possible if completing a particular form and requesting this formally with specific accounts and list of desired transfered purchases.
    Do anyone know where this form is and has anyone been successful in doing it?

    How about transferring total ownership of apple id?

  • HT1918 How can I move my downloads from one itune account to another?

    I have a new itunes account sand want to move my downloads to it. I have been using another family members account and they now have an ipad that they want to download their oown stuff to without mine appearing. Is there an easy way to do it?

    No. You can delete it from their iTunes library and make a new one, but it'll remain tied to that iTunes Store account.
    (78692)

  • How can I move my pix from one photoshop version to another?

    I have Photoshop Album Starter Ed 3 downloaded in Jan 2007 which currently has all my pix (only about 50).  Last Aug, a tech downloaded PhotoDeluxe 2 while doing some work on my computer.  I have been unable to transfer the pix from the Starter Ed to the PhotoDeluxe.  I just purchased Elements 7 and want to move the pix to that application and delete the 2 older Photoshops.  I keep running into file path problems.  I have tried to copy all the pix to a CD and then reload in the PhotoDeluxe catalog but it never works.  Before I load the Elements 7 I want to be sure of being able to transfer all my pix. This may be a simple problem to solve but I admit I am still uneducated in some aspects of computer use.  Please help if you can.

    No. You can delete it from their iTunes library and make a new one, but it'll remain tied to that iTunes Store account.
    (78692)

  • How can I change a contract from one family line to another?

    I have a 5 line family plan.  I lost my job months ago and have to cut expenses.  I want to keep a phone number that is no longer under contract and shut off one that is still under contract.  Can I switch the contract to the other phone number? 

    Sue, Verizon won't let you do what you want you, PERIOD. Verizon won't change contract dates.
    HOWEVER, there is an EASY way to accomplish what you want to do. Since the number you want to keep is free of contract, you can port-out the number temporarily without ETF, and a few days after the port-out, you can port-in the number to replace the number that has the contract. End result: Exactly what you want to do.
    Go to Sears/ Walmart / Best Buy and buy a cheap $5 / $10 Tracfone. Activate the Tracfone and port-in your number (one without contract) from Verizon on the Tracfone service. Once the  porting is done, your number will work on the Tracfone. Wait a few days. Then initiate a port-in YOUR number on one of the existing verizon lines. There are no charge to port in or out.

  • How can we crea mass customer from one company code to another company code

    Hi Expert,
    I have created  10 customer in co. code - ABCD using t.code FD01.  Now i want to to extend the same customer in other co. code for example XYZ co. code. onw way i go to FD01 and create with refrence to ABCD co. code. But here i have to do manually one by one customer. Is there any facility where we can extend mass customer from refrence to existing copmany code.Please  reply do standard SAP have the same functionality or not.
    Regards
    Gaurav Gupta

    FD15 is for Sending
    FD16 is for Receiving
    Edited by: Murali_Babu. N on May 12, 2011 12:11 PM

  • How can I copy a PSK from one WLAN Controller to another

    I'm trying to replace a WLAN controller with a new one.  One WLAN is configured with WPA-PSK.  Nobody seems to know the key that was used.
    Anyone know if there is a way to extract the encrypted key out of a controller and put it into the new WLAN Controller?
    Thanks in advance.

    No can do ...
    https://supportforums.cisco.com/discussion/11364566/view-psks-wlans-wlc 
    However, if any users are on a MAC Book and has iCloud enabled you can see the key under the "keys". If you have a windows 7 box and uses the native supplicant you can expose the key on the supplicant ..

  • How can I move selected photos from one iPhoto Library to another?

    When I set up a new iPhoto Library and copied photos into it, only the thumbnails transferred.  I want to combine the two libraries now and have the master photos in the combined library.  How do I do that in iPhoto 11 and how do I then remove duplicates?

    The only way to merge libraries is with the paid ($20) version of iPhoto Library Manager
    Regards
    TD

  • How can I transfer game data from one apple device to another?

    I have looked at multiple answers to try to find what I am looking for but I can't fine anything that can help me. I have a 4th gen iPod and I recently got an IPad Mini. I have already set up my iPad and have lots of games on it. Is there any way I can transfer my game data onto my iPad without going through iCloud?

    Click here and use the instructions to do it through iTunes.
    (108836)

Maybe you are looking for

  • Can you downcovert HDV footage to SD without camera?

    Hi, I am editing an HDV project that I need to downconvert to SD for a DVD. The project was shot and edited in HDV. What is the best, simplest way to downcovert my project to SD? Can I do it without the camera? Is it possible just to cut and paste th

  • Create view syntax

    create view [dbo].[Dim] AS SELECT case when [EnglishProductCategoryName] in ( 'Bikes','Components') then 1 --project when [EnglishProductCategoryName] not in ( 'Bikes','Components') then 2 ---Non project end as mike_key, SELECT CASE when [EnglishProd

  • Drive App on N9

    The N9 Navigation is very limited. I did find the following limitations; 1. There is no Favourite Tab/option 2. There is no Save location option. 3. There is no Fastest/Smallest Route option. 4. Once you select a destination, the Navigation Mode keep

  • How can ical items entered offline be updated on icloud when back online?

    My workplace blocks iCloud (and the app store). When I enter or modify ical events they do not update when I am back online at home. Refresh was of no help. I had to edit the items for them to appear on other devices. Is there a way around this?

  • How do I boot from a USB flash drive?

    I have two different Toshiba laptops. In the BIOS settings I only see the following options. Laptop 1: CD/DVD FDD LAN HDD1/SSD1 Laptop 2: HDD1/SSD1 HDD2/SSD2 eSATA HDD CD/DVD FDD LAN Is it possible to make either computer boot from a USB flash drive?