Dynamically loaded swf to communicate with the MovieClip on the stage

I have a devil of a time here with a problem. I've got an xml document when it is clicked on a certain button on the stage, it loads its corresponding external swf into an empty movieclip on the stage. This empty clip is support for all external SWF.

So what I'm trying to do, is when an external swf is loaded that has buttons on it, I need these buttons to communicate with the main timeline and delete an mc who is on the stage. I need the swf (s) currently loaded to be able to do. So whatever the currently loaded external swf is loaded, I need to talk to the main timeline. (I have external SWF files a certain need to do this) So I guess I have to somehow target the external swf currently loaded so he could talk to the main timeline.

The code below in summary does not, but it gives no errors either. I don't pretend to know what I'm doing, and I did not find a solution to this particular problem. If someone could give me advice or direct me to a solution. I would be so happy.

scenario focus

var object: index = this;

function loadComplete (e: Event) {}

TweenMax.to (index.mcholder, 1, {alpha:. 5});

Add the current module to the mcholder movieclip according to addChild

index.mcholder.addChild (e.currentTarget.content);

(e.currentTarget.content as MovieClip) .addEventListener ("eventTriggered", startListener);

function startListener(e:Event):void {}

var ext_swf:MovieClip;

ext_swf = e.currentTarget.content as MovieClip;

trace ("external swf");

ext_swf. Button1.addEventListener (MouseEvent.CLICK, talktomainswf);

function talktomainswf (): void {}

TweenMax.to (index.mc_thatsonthestage, 1, {x: 1000});

}

}

Now we have the first load we set to false firstLoad

index.firstLoad = false;

}

function loadError (e: Event) {}

trace ("Error");

}

}

You can use the event to communicate with external SWF Dispatcher and a main timeline

as follows:

//in an external swf

//Once loaded
function onLoadComplete(event:Event):void
{
     //dispatch an event in the form of a string
     dispatchEvent(new Event("Talk to Main Timeline"));
}

//On the Main timeline

//listen for "Talk to Main Timeline"
stage.addEventListener("Talk to Main Timeline", listenForCallsFromExternalFiles, true); 

//if the event is heard, do this:
function listenForCallsFromExternalFiles(e:Event):void
{
     trace("I heard ya, now do stuff...");
}

That's the idea anyway, I use it all the time.

hope that helps,

~ chipleh

Tags: Adobe Animate

Similar Questions

  • Windows cannot communicate with the device he resourse (primary DNS server).

    Original title: primary dns.

    Help, please

    Windows cannot communicate with the device he resourse (primary DNS server)

    Please help me solve this problem

    If you see a 'FON' signal wifi on your PC and you have signed up to "FON", you should be able to connect to it.

    If you look on your BT router (or router you pay BT for the primary connection) on its homepage it should show something like "State of the Wifi BT. If it is active, you should be a member "FON", if it is not active then you need to register and agree.

    BT has their own support forum if you have not already tried it - https://community.bt.com/

    See the FAQ here - http://www.btfon.com/support to ensure that you are connected properly.

    in particular:

    How can I connect once I connect to the correct Wi - Fi network?

    Once you are connected to the correct wireless network, launch your browser. This should load the Fon login page. Select Fon among the three options on the login page, enter your e-mail address and password and sign in. Launch another browser and you are ready to access the Internet

  • Communicate with the soft keyboard on iPad

    Hi guys, I use Air 2.7 CPU mode... I have a code that calls a contact form in a movieclip on the stage on my iPad app... works really well and I also have a button on the screen which then removes the contact form of the scene.

    Unforunately if you are in the middle of typing in a field and press the button to close the form, the soft keyboard ipad stays on the screen and the fact the text that is typed.

    I wonder if I can communicate with the ipad keyboard to move down. I hope that I can somehow communicate via actionscript with the small button in the right corner of the ipad keyboard which makes the keyboard out the screen.

    Thanks, Mike

    Please try stage.focus = null

    -Pahup

  • How do you communicate with the Apple Watch

    How do you communicate with the Apple Watch

    Hello!

    Welcome to the Apple community. I'm not quite sure what you mean when you say "communicate" with the Apple Watch, so I'll give you a few options that can respond to your request.

    (1) the Apple Watch supports Siri, just like the iPhone and the Mac. To apply, simply say "Hey Siri" while the wrist is triggered, and your watch will respond. Alternatively, you can hold the digital Crown and Siri will be activated. As soon as Siri is activated, you can ask him questions such as "what is the weather today" or "reminder", or "Let's start a workout."

    (2) you can manually send SMS via your Apple Watch by use of Siri, or opening the messaging app. That Siri send your messages, just say 'Hey Siri, send a text < name >' and Siri will open the Messages app and wait to talk to you about your message. If you want to move the Messages app manually, press the digital Crown and will take you to the home screen. In the home screen, select the Messages app (a green icon with a word inside bubble). Any existing message log must appear, and you can type on a given message log and choose to respond.

    (3) If you want to place a phone call using your Apple Watch, you can say "Hey Siri, call < contact name >". If you have several numbers for a particular contact, Siri will ask you what number you want to call. You can also you can present a more specific request like 'Hey Siri, call < contact name >, < number >' with the number favorite is 'work' or 'House' or 'mobile' etc. So the demand go something like "Hey Siri, call Barbra, House".

    If you are still at a loss, with regard to the types of orders that Siri will accept, you can always ask. Say 'Hey Siri, what can you do?' and she will give you a list of commands that she will answer to the.

    If all goes well, I addressed your question. If not, please provide a little more information and I'll do what I can to help you.

    Good luck!

  • SERIOUS HELP NEEDED: How to prevent an application to communicate with the internet?

    Hey guys, I use an application called VLCStreamer on my iPad and I just want to know how I can help but communicate with the internet. For example, I don't want VLCStreamer to be contacting the author of the application.

    Thanks for any help!

    Put your iPad in airplane mode.

  • Unable to communicate with the printer HP 4630

    Continue error message of "Unable to communicate with the printer." Even when connected by USB.

    Have reinstalled the software several times, checked the wireless (no problem), printed many pages of configuration directly from the printer.

    I keep trying to add the printer to my preferences. One thing is that it will only add like a scanner or fax, a PRINTER. It is also called Hello Scanner. Why can't I add as a printer?

    Now, it will not also let me COMPLETE reinstallation of the software, it freezes at the section add printer and I can't move forward. So frustrating...

    Help!

    Hi @PKahn

    It seems that the computer does not recognize the print driver.

    We will reset the printing system, repair disk permissions, add the printer using the driver and try to start a new search.

    Reset the printing system

    1. Click on the Apple icon ( ), then click on System Preferences.

  • I have a second hand iPhone and can't set up as the person he was find my iPhone on the phone and wont let me sign in with my Apple or the password and IE you have to communicate with the person he was and connect with Apple here

    I have a second hand iPhone and cannot configure as the person he was find my iPhone on the phone and wont let me sign in with my Apple or the password and IE to communicate with the person he was and connect you with there Apple ID and then cut to find my iphone. Unfortunately o cannot get in contact with that I had to and now can't activate my phone can anyone help? Is there another way I can get into my new phone

    There is no possible way to turn it off without having to contact the original owner. Nothing whatsoever.

    This is why you should always check if find my iPhone is not activated on a used phone.

  • HP Officejet Pro 6830: Unable to communicate with the Scanner

    Printing is fine and just impossible to scan.

    I tried to solve the problem of scanner/copy of the measures:

    1. run a 'HP Print and Scan Doctor' to check

    2. click on 'Scan of difficulty' to identify the error

    3A through the steps with all green ticks, with the exception of the driver with a «!»

    4. with the result, I went and download the latest driver to update the scanner and also did a update system for you ensure that the printer is so far

    5. after the update I still get this message from the scanner "Unable to communicate with the Scanner" and when I press the button of scan/copy the printer only a "ding" sound occurs but nothing is scanning / copy

    Note: I brought the printer 2 months ago and this is the first time that's happened

    Hi @Flash1688,

    Welcome to the HP Forums!

    I see that you are unable to communicate with the Scanner with your HP Officejet Pro 6830 on Windows 8.1. I'm happy to help you!

    If you just try to make a copy with the printer, it works? You see on the screen of the printer error messages? Copy of Documents. Also, if you lift the lid of the scanner during the copy process, you see a light come ON and the scanner bar moving?

    In the meantime, please, try the procedure described in this guide, a message 'no computer found' for HP Officejet 6810 and HP Officejet Pro 6830 e-all-in-one printerand let me know what happens!

    I hope hear from you soon!

    "Please click the Thumbs up icon below to thank me for having responded."

  • Unable to communicate with the printer hp deskjet 1000

    I have used this printer for almost 2 years and problem say never FAILED before... forst my text printing is distorted then he showed in offline mode and later its says printer is ready, but when I give the command of printing... it said 'cannot communicate with the printer.

    Pls help!

    My problem was solved by removing and reinstalling the drivers... .any way thanks for your help

    Spoiler (Highlight to read)
    Spoiler (Highlight to read)

  • VIX file in the user interface designer receives the data from the Web service application that communicates with the SQL server database

    I created the Web service VI ("Mt-insolacije.vi"), which has two terminals of the input string (FROM / TO) for the dates of arrival and exit of two data terminals (table 1 d) from database (MS SQL server). This VI communicates with the database with functions of the database with a DSN and SQL query appropriate palette. There are two tables with two data (time and Insolation) columns in the database.

    This VI works when you run in Labview 2010, but when I used it as VI in UI Builder it returns no data.

    Could you please help me find a solution. Is it possible to communicate with the SQL server database in this way or there is another way?

    There are two files attachmet: Image of .vix file in Interface builder and .vi file ("Mt-insolacije.vi")

    Please help me ASAP!

    Thank you

    Ivan

    I found the solution problem is in the DSN. I've been using the user instead of DSN system DSN.

    It's important to create the system DSN if you want your VI of web service to communicate with the database.

    PS Please put feature bundle format timestamp and XY graph in the web user interface designer. It's complicated to trace data with datetime on X axis without them.

  • What are the causes of error - OR-XNET: the NOR-XNET driver is no longer can communicate with the device.

    Hello

    I use X-NET-PCI8512, OS: Windows 7, C++ (middle of the QT interval).

    I'm pooling of card data (StreamIn member function) to ~ 100 Hz. card reading time (ReadStatus) to ~ 100 Hz.

    After about 40 min (depends on the amount of data in) I get this error:

    (Hex 0xBFF630B2) The NOR-XNET driver cannot communicate with the device. Solution: Make sure that the device was not removed from the computer.

    What are the causes of this error?

    Thanks in advance,

    Aviad

    Hello aviadCielo,

    When you get this error, what does do to make it work again? If you restart your program, start all this work?

    Secondly, what version of NOR-XNET do you use? It's maybe a software problem that could be resolved by upgrading to NOR-XNET 1.6.

    Finally, can you reproduce this problem with a simple program? If so, you can join the program you use?

  • How to communicate with the gsm using lab view

    Please, someone tell me about the following uncertainties:

    1 can anyone tell me about the GSM part in lab mode?

    2. how to communicate with the GSM using lab view?

    3. how to publish my data through GSM using lab view?

    4. how to use ipod to send data to laboratory?

    5. what a DAC suitable for ipod?

    6. how to install the lab for ipod DAC mode?

    without worrying

    FR. mohammad rehan

    rehan_the_great wrote:

    Can u please tell me the minimum requirement of computer (labtop) for the use of labview, like ram size, HARD drive, map chart etc...

    A simple search for "labview requirements" on this site would have given you the information you want.

    http://www.NI.com/LabVIEW/requirements/

  • Fail to communicate with the controller of pump ISCO D series

    Hey everybody,

    I have an ISCO D pumps controller (which is connected to a syringe model 100DX ISCO pump) series I want to control using RS232 on Labview. I don't have their LabView Toolkit that Teledyne has mentioned in their technical Bulletin (TB06). In addition, I would like to automate my test, so using the Labview Toolkit will be not too useful.

    The problem I face is not being able to communicate with the controller via hyperterminal or LabVIEW.

    I ran their (mentioned in TB06) integrated series test and communicate as expected. I also tried to run their program remote pump (mentioned in technical Bulletin 19 of Teledyne - TB19) which seems to do what is expected as well.

    I tried to talk about using LabVIEW first using the vi that I joined, and I saw nothing on the buffer. So, I moved to hyperterminal.

    But when I try to send the command 'remote' listed in TB19, it doesn't seem to do anything. There is no answer on the hyperterminal.

    There is mention of a DASNET Protocol, and I found the .dll file that I also moved in my Windows System 32 folder. It did not work even after that too.

    I have attached TB06 and TB19. Let me know if you have other ideas how to do to test it.

    Please let me know if you need further information.

    Thank you

    Sandeep

    Hey everybody,

    After going through their best manual, I found the way to correctly send a frame. The manual at, www.isco.com/pcfiles/PartPDF/SL000004/UP00194U.pdf, section 7 specifically, it is intended.

    For the purposes of anyone who stumbles across this thread, here's an example.

    If you have your.

    Destination (the pump regulator) ID = 1

    the source of the (computer) message = 00

    and you try to send the message to DISTANCE that would turn the controller in "REMOTE" mode

    Then you would send '1R006REMOTE1B', where 1 is the ID of destination
    R is right to recognize the previous received message

    00 is the ID of the computer

    6 length of command

    "REMOTE" the command itself, must be uppercase

    Checksum 1 b (which changes with the command of course)

    And you can do the same thing in LabVIEW, you can enter '1R006REMOTE1B' in the VISA write while keeping everything else the same as the snapshot of the vi I sent previously.

    Dennis, actually do not have the CD itself, but I assumed, would nothing more than an executable since I downloaded the demo driver for LabVIEW (http://www.isco.com/products/appnotes.asp?PL=105 under utilities) pump. I am currently trying to locate the CD here at the lab, and I will update this thread if I find something useful.

    I guess that my problem has been resolved.

    Thanks for your input in this Dennis.

    Kind regards

    Sandeep

  • Information required to communicate with the instrument of the IEEE-488 Interface.

    Dear all,

    I have an instrument that has interface CEI-488. I would like to connect to my laptop using the GPIB-USB connector of NOR.

    In order to communicate with the data of this device and the manual, I have a licensed version of LABVIEW. But when I made contact with seller OR I learned the connector would cost me Rs. 40000 /-including software as described in the web.

    Is question 1 - necessary to buy the software with connector? or can I manage to read through LABVIEW?

    Question 2 - I read the manual of the instrument and it can be programmed using the interface IEEE 488.2 measure of LABVIEW and automation Explorer can do this by using the existing LABVIEW.

    Looking forward for a response.

    Kind regards

    Srini

    Hello

    If you have any material of LabVIEW and NI GPIB software VISA is free.

    What instrument (model and seller) you are trying to contact?

  • Aspire laptop will not connect to the wireless printer, he said: he can't communicate with the printer

    I have a laptop sucks and when we first put in place it would print to the printer wireless, but now he says that he cannot communicate with the printer. I know just enough to get me in trouble with computers. Any suggestions?

    Hello

    I imagine the inconvenience that you are experiencing. I'll certainly try and help you in the matter of fixing.

    To help you to propose measures to solve the problem, I would appreciate if you could answer the following questions:

    1. which version of the Windows operating system is installed in the computer?

    2. you have any security program installed on the computer?

    3 are you aware of any changes made to the computer before the show?

    If you use Windows 7, then I suggest you to go through the steps in the link and check.

    Hope this information was helpful and let us know if you need more assistance. We will be happy to help you.

Maybe you are looking for

  • Quarter revenue

    I was told yesterday that I should be able to see my latest transactions on my watch in the Apple Watch application on the phone. I was not aware of this and still cannot find them. Adjustable anyone the question directly to me.

  • Failed to format create recovery media

    I am trying to create a recovery media for new R30 - 1GZ and opted for USB Flash memory. Inserted a 16 GB Sandisk Cruzer module and said OK for reformatting. Message appears: "Unable to format the drive Windows" (or words to that effect). The module

  • NI 9215 input range

    Small question.  When I select the range from 0 to 10 VDC on vi Daqmx "Create Virtual Channel" while using a NI 9215 have I actually did my entry of voltage of 16 bits in a voltage of 8-bit entry or front-end NI 9215 adjusts itself to take advantage

  • HP LaserJet Pro M1536dnf: Re: help cold reset for M1536dnf]

    Hello Please send me the instructions to reset cold this printer. I can't access the web interface or the menu of the printer. Thank you.

  • HP Deskjet F2280 all-in-one [manufactured Nov. 2008] compatibility with Windows 8

    Good afternoon I'm about to buy a Dell Inspiron with Windows 8. There is that a single above label printer that has the following numbers: CN8BA4ROW S/N CN CB683-64001 on a bar code Regulatory model: VCVRA-0706 The word 'model' before a 'number' does