Communicating with embedded swfs

So if I have several external swfs embedded in one big one, in what way can I communicate between them?
Specifically,
-the main swf needs to know when buttons have been pressed in an embedded one, and it needs to tell all the other embedded ones about it.
-the embedded swfs need to intelligently resize and shuffle around each other, while keeping their coordinate origins in the top corner.
How do I go about this?

As long as by "embedded" you mean you load the swf files into thee main file dynamically, then there is hope for whatever you have planned.  If by embedded you mean you import them into the library and plant them in the main file's timeline, that won't work.
The event listener(s) and event handler function(s) are coded into the main swf.  The loaded swf's are coded to displatch the events that the main file has listeners for.  So the loaded swf's simply shout out when they will, not caring who hears it... which allows them to compile without dependence on the main file.
So in the loaded movie, whatever triggers the need to call the main file into action would dispatch an event as follows...
dispatchEvent(new Event("eventName")); // name the event as you like
To add the listener in your main swf, listen for the load complete event on the Loader.contentLoaderInfo that is used to load the file.  In the complete event handler, add the listener for the event on the loaded swf.
function loaderCompleteHandler(e:Event) {
   MovieClip(e.currentTarget.content).addEventListener("eventName", eventHandler);
function eventHandler(event:Event):void {
    trace("loaded swf event triggered");

Similar Messages

  • CR report with embedded SWF: Export to PDF displays nothing

    I'm creating CR 2008 reports with embedded SWFs as described in the whitepaper [EMBEDDING XCELSIUS 2008 VISUALIZATIONS IN CRYSTAL REPORTS 2008|http://www.businessobjects.com/pdf/product/catalog/crystalreports/cr_xc_integration.pdf].
    From CR, I can export the report to html and view the report fine. But when I export to pdf, ppt, etc. The SWFs are not viewable. Is this a bug or by design?
    This section of the white paper seems to imply that maybe you cannot export to pdf:
    >TECHNICAL DETAILS
    >
    >Viewing Flash objects embedded in a Crystal Report is supported in the:
    >
    >Crystal Reports 2008 Preview tab
    >Crystal Reports 2008 .NET Webform viewer
    >Crystal Reports 2008 Java DHTML viewer (used in BusinessObjects Enterprise XI 3.0 and other products)
    >
    >Exporting and printing of Flash objects with connections to Crystal Reports data is not supported.
    >
    >Embedded Flash objects that do not have connections to Crystal Reports data can be exported to PDF only.
    I'm using the latest version of Adobe products:
    - Adobe Flash Player ActiveX, Version 9.0.124.0
    - Adobe Flash Player Plugin, Version 9.0.115.0
    - Adobe Reader 9, Version 9.0.0
    Also, I downloaded [CR Viewer 2008|http://www.businessobjects.com/product/catalog/crystalreports_viewer/] and can see the CR reports I've created with embedded Xcelsius swfs.
    Any information is appreciated. Thanks.
    Tim

    > ... it states in your first post, the export is not supported,
    True. It says:
    > Exporting and printing of Flash objects with connections to Crystal Reports data is not supported.
    But I can export such reports to html and view and print the flash objects.
    It seems inconsistent to me. I can export static flash charts to pdf, yet I cannot export dynamic flash charts to pdf, which is from Adobe, as is Flash?
    I'm hoping this is a temporary bug either in Crystal or pdf reader and is to be fixed in a patch release. Or an explanation of why the limitations exist.
    Thanks for the response.
    Tim

  • Problems with embedding swfs into Director 11.5

    Hello everyone,
    I am hoping someone can help me and please bear with me - I don't know a lot about director - I can do some Lingo and get around in the program to make things work.
    Right now I am working on an interactive presentation where the user can click a button to view an animation. I am using Director 11.5 for my presentation and have made my animations in After Effects CS3 -- from there I converted my .mov files to .flv files using the Adobe Media Encoder CS4... then I took my .flv file into Flash and published it as a swf file.
    The problem that I am having is that when I play the presentation (within Director and after publishing the .app/projector file) the swf files are playing - but there is all this glitchy-artifact stuff all over them. Does anyone know why this would be happening? When I play the swf files in the flash player they look great. Before, when I was using Flash MX and Director MX, I never had any problems with embedding my swf animation files - and they played great - without any artifact. Any and all help would be much appreciated as this project is due in the next few days and I would prefer to figure out a solution rather than uninstalling Flash CS4 and Director 11.5 - and going back to MX.
    I toyed with the thought that my video card isn't good enough but I tested the .app file on another machine and the glitchy-artifacts were still there. I have attached a jpg showing the artifact that appears.
    I am running Mac OS X 10.5.7
    Dual 2 GHz G5 PowerPC
    ATI Radeon X800 XT
    Thank you!

    Sorry... here is the image again and I think the problem might be my machine -- it is very old (~4+ years) and when I tested my .app on a newer intel mac here it worked fine... but maybe I am missing something -- it seems odd that I can see the swf fine in flash player but it is glitchy when played through director or the .app projector file

  • WAD: Problems when exporting to PDF with embedded .swf

    I'm using Web Application Designer (WAD) 7 and have created a template with an "Export to PDF" button and an embedded .swf flash file which is an Xcelsius dashboard.
    What i'm trying to do is show the information I want on my dashboard and then export that to a PDF to email out to multiple users who would be interested in the data each month.  If exporting to PDF isn't the best route to get a snapshot of this dashboard out to other users and there's an easier way please let me know, but here are the issues i'm having:
    1) When I have the dashboard showing the information I want and click the "Export to PDF" button, the dashboard reloads as the PDF settings window pops up and gets reset back to it's initial state.
    2)  If I ignore problem #1 and click on 'OK' in the Export dialog anyway after selecting PDF settings, my Adobe Reader pops up but then shows a message saying "The file cannot be opened because it has no pages".  Basically it doesn't see the .swf as being a component to take a snapshot of and print on a PDF. I did try adding a text component just so there was something on the template and I then get a PDF with that text component showing and no .swf snapshot.
    Has anyone come up with a workaround for this?  I've tried using the BEx Broadcaster with the 'Send' option but get the same results in regards to the blank page.
    Thanks as always for the help!

    Thanks for the reply.
    The dashboard is connected to a query in NetWeaver BI to get its data.  So the request of the user is to be able to adjust the dashboard to show the information they need (well say of a certain region) and then take a snapshot of that and email it out to co-workers in Group A.  Then the user will adjust the dashboard to show other data (for a different region we'll say) and take a snapshot to email out to co-workers in Group B. etc and etc.
    I have looked into installing a PDFCreator print driver but that wouldn't be feasible to get it on all machines in the business.  I've also looked into getting it as a .jpeg which would suffice, but am unsure if there is a way to do it with script and connect that to the dashboard when a button is pushed (will look into this).  This seems like a topic for over in the Xcelsius forum now.
    I used the following code within the <body></body> tags of the WAD's xhtml to embed the .swf:
    <object id="dashboard" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" height="600" width="800" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" >
    <param name="Movie" value="bwmimerep:///sap/bw/mime/Customer/JavaScript/dashboard.swf" />
    <embed src="bwmimerep:///sap/bw/mime/Customer/JavaScript/dashboard.swf" name="dashboard" type="application/x-shockwave-flash" />
    </object>

  • Communication with external swf?

    hi
    im loading in intro2swf with the following
    btn_cont2_mc.visible = false;
    addChildAt(intro_container_mc, 0);
    intro_container_mc.x=-400;
    intro_container_mc.y=-300;
    stop();
    introvisit();
    function introvisit ():void{
    if (introlevel == 2){
    lvlLoader2 = new Loader();                     // create a new instance of the Loader class
    url2 = new URLRequest("intro2.swf");
    lvlLoader2.load(url2); // load the SWF file
    intro_container_mc.addChild(lvlLoader2); 
    now the swf loads correctly and in the correct place however i have a btn on the stage that i wish to hide and at a certain point in my loaded swf i want to unhide the button using an enter frame event
    intro_container_mc.addEventListener(Event.ENTER_FRAME, added0);
    function added0(event:Event):void {
    if (intro_container_mc.currentFrame == 1){
    btn_cont2_mc.visible = true;
    MovieClip(this.parent).e_mc.cap_talk_txt.text="Stormy";
    I need to do it this way so that I can change the text at various points in the story of the swf i can change the text
    but whenever i try it, the button will not show or the text change, having problems communicating with swf, i have tried
    intro_container_mc.addEventListener(Event.ENTER_FRAME, added0);
    intro_container_mc.lvlLoader2.addEventListener(Event.ENTER_FRAME, added0);
    intro_container_mc.lvlLoader2.storm_mc.addEventListener(Event.ENTER_FRAME, added0);
    all of which have no effect, the animation inside the swf is kept in a movieclip called storm_mc
    hope you guys can help me fix this
    thanks
    fonzio

    hi kglad and thanks for putting my mind at rest as well as keeping me sane
    currently trying to remove the children added at this point (or the loaded swf)
    but im running into problems, its giving me a lot of displayobject errors when i try to remove child
    after the animation has finished and the user clicks the button this should happen
    function removelistd():void{
    removeChild(loader)
    btn_cont2_mc.buttonMode=false;
    btn_cont2_mc.removeEventListener(MouseEvent.CLICK, continuey);
    btn_cont2_mc.removeEventListener(MouseEvent.MOUSE_OUT, conty2Out);
    btn_cont2_mc.removeEventListener(MouseEvent.MOUSE_OVER, conty2Over);
    swf2Main_mc.storm_mc.removeEventListener(Event.ENTER_FRAME, added0);
    loader.contentLoaderInfo.removeEventListener(Event.COMPLETE,completeF);
    wondering if it is the loader that i should be putting above
    have tried swf2Main_mc and loader in all sorts of ways however keep getting this
    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
    at flash.display::DisplayObjectContainer/removeChild()
    at MethodInfo-360()
    at MethodInfo-357()
    just need help cleaning up and then its done
    thanks in advance
    fonzio

  • Need help with embedded SWF Playing

    I have an embedded SWF file (A 4 photo slide show) created in Flash Professional CS5, Action script 3, flash player 10 selected.
    I have placed this into the flash catalyst CS5 file. The file previews in the browser perfectly.
    The problem is when published it will not start the slideshow until you refresh the browser (Safari and FireFox) the local version runs fine
    the published version does not even when uploaded to the web server. www.ngambaisland.com
    This site was woking properly before I made some changes to the slide show and rebuilt the file to optimize it for loading performance.
    Please help if you can,
    Many Thanks,
    Curtis

    Thanks for looking but I have tested the website on 5 different computers an the slide show only activates after you hit the screen refresh button.
    I am afraid I am a bit limited in flash. You mentioned to check access settings. I used the default action script 3 settings in the publish settings.
    Could you please be more descriptive as what to look for or what settings I would need to change?
    Thanks for your help.
    Curtis

  • Need help with embedded SWF in PDF as navigation

    Hi,
    I was wondering is there a way to have an embedded swf navigate to different pages of a pdf?
    Example:
    My swf is on page one. There are mulitple buttons in the swf, when clicked it will take you to page 3, or 5, or 7, etc.
    Currently, when I click on a button, it DOES take me to say page 4, but the content on page is the SWF file from page 1, and not the content that is suppose to be on page 4. Has anyone else experienced this problem?
    This is what I have in the flash action:
    btn_1994_1.addEventListener( MouseEvent.CLICK, p1994 );
    function p1994(e:MouseEvent):void{
         //addChild(pop_1994);
         doExternalInterfaceCall("gotoTarget", "pink");
    function doExternalInterfaceCall(myfncall, parm)
        flash.external.ExternalInterface.call(myfncall,parm);
    And this is what I have in the javascript of the pdf:
    function gotoTarget(name)
         this.gotoNamedDest(name);
    Please help me fix this problem.
    Thanks in advanced!
    ps. I am using Acrobat 9 Pro

    can anyone help?

  • Captivate 4 publishing issue?--very strange results with embedded swfs

    I have a captivate file with some swf's created in flash, and some simple swf's created in Captivate 4.  When I publish, the swf's created in Flash pause if you pause the player, but the captivate published swfs do not.  Also, I have a captivate published swf playing on my 3rd slide, and on the first slide in playback, you can hear a mouse click, like the flash has already started playing.  And sure enough when you get to the 3rd slide, the flash is in the middle of playing.  I have "sync to project" checked on all of them.  Is this a bug with captivate??   please help!

    Hi there,
    Just to add to Michael's excellent post. I would suggest that you check to see what the frame rate in Flash is set to. When inserting SWF animations into Captivate you need to make sure that your Flash projects (SWFs) have a frame rate of 30 fps.
    Another option would be to create test SWF in Flash using AS3 and insert this into a Captivate AS3 project. To set your Captivate project to AS 3 carry out the following steps:
    1. Choose Edit > Preferences
    2. Select the Publish Settings category of the Project preferences
    3. Choose AS3
    4. Click OK.
    Next, publish your CP file as a SWF (externalizing the animations as Michael suggested) and see if that makes any difference.
    Best - Mark
    Visit the macrofireball blog

  • Communication with embedded shockwave

    I have a sprite behavior attached to a sprite that is
    populated by shockwave .dcr files, based on user selection. The
    sprite behavior instances a popup up menu on rightMouseUp that
    allow selecting a different 2d shockwave .dcr. animation by
    changing the member of sprite property. Very simple, elegant and
    works quite well.
    Now I am trying something new. I'd like to mix in a 3D movie.
    Unlike the 2d animations, this 3d animation has embedded behaviors
    and triggers to allow control of the 3D-- specifically rotation on
    left mousedown.
    Problem: With the menu popup behavior attached to the sprite
    in the main movie, the mouse events do not seem to be passed to the
    embedded movie-- thus the rotation does not work on the 3D.
    If I remove the popup menu behavior in the main movie the
    rotation works fine, but then the other animations can't be
    selected....
    I know there must be a way, and it may even be pretty simple.
    However, I've never done any movie to movie communication, so I'm
    not sure how to go about this or even which method to attempt
    first. After searching the forum and googling, I'm wondering if
    this is a job for the connection object. Also I've been reading the
    docs on the "tell" commands, and wondering if that may work.
    Any help or guidance to steer me in the right direction would
    be greatly appreciated.
    Thanks in advance!

    You cannot access an OPC server from a non-Windows machine; this includes a FP-2000. The best suggestion I have is to create a VI for the host PC that reads the FP-1000 channels and writes them to the datasocket server. Then, the FP-2000 can read from and write to the datasocket server.
    Regards,
    Michael Shasteen
    Applications Engineering
    National Instruments
    www.ni.com/ask
    1-866-ASK-MY-NI

  • Interactive PDF (with embedded SWF) not displaying consistently

    Hi folks,
    We are seeing varying behaviour when we try to open a PDF document which we have created as part of publishing to PDF in Captivate 6. The original project is a recorded PPT file which we publish to HTML5, SWF, ZIP and PDF. In some instances the interactive PDF opens fine, but in some instances we get something like this:
    We have always made sure we have the latest version of reader up to date etc, but can't work out why some machines are giving the above and others done. Any help would be greatly appreciated

    Hey JT,
    Came across this: http://helpx.adobe.com/acrobat/kb/known-issues-acrobat-xi-reader.html
    I know you said you have reader 10, but I had 11, so I went and removed it and and installed a version of 10 again, and wht do you know, they work ok. However, this is not a workable solution for us as many students will automatically update to the latest PDF reader, which is currently 11. Adobe changing the rules around this has stuffed us up, and we have no option but to take offline all our interactive PDF versions produced with Captivate 6. Very disappointing, but will save our helpdesk a lifetime of support calls :-(
    Grant

  • Trace() not working with embedded SWFs created with Flash Builder

    I have just migrated to Flash Builder 4.5 with the 4.5.1 SDK.
    I have an application that loads a lot of child SWFs into it - some of which are created with Flash, some are created with Flash Builder.
    I am noticing now that my trace() statements that are called from within SWFs produced with Flash Builder that are loading as child SWFs into my main SWF are NOT appearing.  However, trace() statements called from within SWFs produced with Flash that are loading as child SWFs into my main SWF ARE appearing.
    This is an extremely major problem and has short-circuited my debugging/development.
    Any recommendations, workarounds, or suggestions?

    If the child SWFs were created by performing an "Export Release Build", then trace() statements would be omitted.
    You can control this by setting the -omit-trace-statements compiler argument (in Project properties -> Flex Compiler -> Additional Compiler Arguments).
    -Anirudh

  • Dreadful White Box with embedded swf

    Hi there,
    this is my first forum post on Adobe but I have been scouring the forums across the internet and I am aware this is a common error but so far it would appear everyone has a different reason for this error happening.
    Basically when I just run the swf file locally from my computer it works perfectly, I have succesfully managed to embed it into the home page of one of my sites... http://www.reelflies.ca - it is about 3/4 of the way down the home page. Now I have also managed to embed it on another one of my sites just as a test file and it works fine on its Html page... http://www.digitalbarn.ca/Reelflies-Slideshow/sitemap2.html.. So I feel rather confident that it is not a problem with my code.
    Now when one of our advertisers try to put it on their site it simply will not show - just a blank white box shows - now even if I send them the exact code that we use and even have tried linking it to one of the sites (digitalbarn.ca) that it was previously working on. Nothing seems to work, this is my first stint into flash so it is possible it is a coding error on my end but for me to be able to get it to work on two sites seems to baffle me.
    I have also read that it could be that the directory that the swf and related files are stored in may not allow this file type to play but even with a direct link to one of our sites that do have it working it suddenly stops working. The site does have other flash on their homepage as well so it is rather frustrating that ours will not work.
    Oh I also wanted to add that I am using the Adobe CS4 suite for this. and testing has been run in Mozilla Firefox 3.5, Internet Explorer, and Google Chrome. I have also been using firebug to try to figure out any issues myself on the advertisers website to no avail.
    I apologise in advance as I am trying to answer as many of the initial questions I often see when researching this problem things may not come out totaly how I wanted.
    Message was edited by: shaun_b-00

    Included below is my embed source. I used Dreamweaver CS4 to produce it, the Website that is having the grief is http://www.thenewflyfisher.com/ there is a black jpeg of our logo near that bottom of their page and below it a big white square, that big white gap directly below is where our flash should be playing. That piece of code currently is linking to their servers which obviously isnt working.
    I ran tests on my Reelflies.ca page with the below code to no avail unfortunately. That code works fine on my digitalbarn site but when located on a different site stops working which confuses me as I would have imagined the direct links would have resolved that issue?
    **edit: For whatever reason the quotation marks at the end of my link have been grabbed into the links so if testing the links just make sure you remove these from your browser address bar.
    This is included in the header tags
    <script src="http://www.digitalbarn.ca/Reelflies-Slideshow/Scripts/swfobject_modified.js" type="text/javascript"></script>
    This is the embed code contained where I want the swf to play on the site.
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="468" height="280" id="FlashID" title="Reelflies-Flash">
      <param name="movie" value="http://www.digitalbarn.ca/Reelflies-Slideshow/New-Fly-Fisher-Slideshow.swf" />
      <param name="quality" value="high" />
      <param name="wmode" value="opaque" />
      <param name="swfversion" value="6.0.65.0" />
      <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
      <param name="expressinstall" value=" http://www.digitalbarn.ca/Reelflies-Slideshow/Scripts/expressInstall.swf" />
      <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
      <!--[if !IE]>-->
      <object type="application/x-shockwave-flash" data="http://www.digitalbarn.ca/Reelflies-Slideshow/New-Fly-Fisher-Slideshow.swf" width="468" height="280">
        <!--<![endif]-->
        <param name="quality" value="high" />
        <param name="wmode" value="opaque" />
        <param name="swfversion" value="6.0.65.0" />
        <param name="expressinstall" value="http://www.digitalbarn.ca/Reelflies-Slideshow/Scripts/expressInstall.swf" />
        <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
        <div>
          <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
          <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
        </div>
        <!--[if !IE]>-->
      </object>
      <!--<![endif]-->
    </object>
    <script type="text/javascript">
    <!--
    swfobject.registerObject("FlashID");
    //-->
    </script>

  • How to reduce size of the a PowerPoint with embedded swf files (SAP Dashboard)

    I have just installed SAP Dashboard and converted all the previous graphs from Xcelsius 2008 to this new version (save new graphs). After exporting to PowerPoint all these new graphs, the PowerPoint file with all of these graphs has increased dramatically in a double size file. How can I do to reduce this size?

    Hi,
    List Box Builder may cause an issue .
    http://everythingxcelsius.com/xcelsius-2008/3-xcelsius-2008-components-to-avoid/27
    Also I did not try the linke below but check if it helps you .
    http://myxcelsius.com/2009/03/18/reduce-the-size-of-your-xlf-and-swf-files/

  • DataSocket communication with embedded FP2000 ?

    Is it possible for a vi embedded in a FP2000 to communicate with an OPC server through, for exemple, datasocket ?
    In fact, I want to read a channel of a FP1000 witch is connected to a computer with my embedded vi but it seems impossible to embed the DataSocket vi or the Tags with OPC ones...
    Thanks for help.

    You cannot access an OPC server from a non-Windows machine; this includes a FP-2000. The best suggestion I have is to create a VI for the host PC that reads the FP-1000 channels and writes them to the datasocket server. Then, the FP-2000 can read from and write to the datasocket server.
    Regards,
    Michael Shasteen
    Applications Engineering
    National Instruments
    www.ni.com/ask
    1-866-ASK-MY-NI

  • Embedded SWFs not working with Flash 9

    Hello,
    I am also plagued with the Flash Player 9 issue. None of my
    embedded SWF files work if I publish with this version of the
    player installed. I ran the uninstaller and I'm now using version
    8. However, each time I open a PPT file I get an error saying "some
    controls on this presentation can't be activated. they might not be
    registered on this computer". This is very irritating. So, my SWFs
    still don't work. I found that if I register the v9 ocx and
    re-insert the SWFs, they will publish properly (while the Player 8
    is installed). However, I have about 50 existing PPTs with anywhere
    from 10-30 SWFs per presentation. I'd like to avoid this method if
    possible. Does anyone know of an easier solution? Thank you.

    good morning DocDVM and Supermercado Gato,
    I have the same issue with embedding SWF files into Breeze. I
    have been doing some searching the last two weeks and i found an
    tech note that you might want to read. It seems that Breeze is not
    really set up for Flash player 9 so Adobe came up with a work
    around. Read the technote.
    http://www.adobe.com/go/f9204eb8
    I am having my IT Department update Breeze for me so i will
    let you know if it works or if you update your Breeze let me know
    if this fixes the issue.

Maybe you are looking for

  • Do I need to up my rig for DVC Pro or XDCam?

    Hi, all. I've been editing ACVHD shot with a Canon Vixia camcorder, which hasn't been much of a problem in terms of file sizes and processing.  We're looking to improve our video capabilities and I've started shopping for a decent pro-sumer video cam

  • Missing Zoom Control Box

    I just upgraded to CR2008 and there's no Zoom Control Box on the standard toolbar. Online Help indicates it should be there by default. How can I make that happen? Thanks.

  • Urgent: Function Group

    Hi Experts,   Basically here iam selecting  function modules  from function groups which can take more than one function module. When iam executing this, its showing only the first function module selected, and rest its not taking. Here iam using the

  • Installing Solaris 10 From HDD .iso

    How can I install Solaris 10 from the downloaded .iso file on my HDD. Is it possible at all? I currently don't have a DVD burner so it would be beneficial for me if I could skip the burning the .iso on a DVD step. Thanks in advance. Message was edite

  • Hi........What is business content..

    Hi all, what is business content ? when this comes into picture in real time.... Thanks & Regards, Bhaskar Rao Javvaji