2 swfs "talking"

hello.
i searched around for an answer on the forum but i saw no
answer quite as a i need... :(
here's the idea:
i have a normal html file with 2 swfs.
one is the menu the other one is there to load other movies.
all in one movie is easy... but here, since there r 2 swfs i'm
lost. i need to click on the flash menu and tell the other movie to
load a chosen swf into itself...
i'm guessing i'll need java or something.
by the way, i'm using flash mx 2004.
thanks!

Number 1 is correct.
Not sure what number 2 means as I've never used that
code.

Similar Messages

  • How does a loaded swf talk back to the main movie?

    Hi,
    I'm new to as3 and have troubles finding the right path for
    swfs to "talk" to one another.
    In my movie, I load an swf "news.swf" into a mc called
    container_mc.
    At one point I want to swap the "news.swf" to "ueberuns.swf"
    via button click in my main movie, but not directly: "news.swf" has
    a frame labeled "out", which builds down some elements over appr.
    20 frames. In the last frame of "news.swf", I want "news.swf" to
    either load the next "ueberuns.swf" into that same container_mc of
    my main movie or have my main movie find out that "news.swf" is
    through with it's last frame and then throw out "news.swf" and put
    "ueberuns.swf" in that container_mc.
    I already found out that I address "news.swf" by the
    following code:
    if (newsLaden.content != null) {
    newsLaden.content.gotoAndPlay("out");
    where newsLaden is the Loaders name. But how do I get
    "news.swf" to reply?
    Anyone can help? Thanks a lot!
    Cheers, Karl

    This is one of the biggest problems of AS3 as communication
    between swfs, levels, and nested MCs has taken a completely
    different path than the previous 9 versions of Flash. Both Erick's
    and TheWabbit's suggestions will work but I sort of follow Erick's
    approach as LocalConnection is the perfect fit for .swfs
    communicating in the same HTML page not for nested. The key is
    defining the timelines of MovieClips in each class when you want to
    tell them to do something.
    Try tera's example and see if that helps but if you
    understand Erick's approach keep going. I just wanted to add that
    you have to start thinking about defining the MCs you want to
    communicate with in each Object Class file such as:
    var _root:MovieClip = new MovieClip(parent);
    and then you can always sort of define who you want to talk
    to a bit easier.
    THIS REALLY REALLY SUCKS for those of us who have been with
    Flash since version 2 because they took away one of the best and
    easiest things to do (but I'm glad telltarget is gone!! lol). Now I
    fear people are going to start throwing everything back into one
    LARGE SWF again thereby undoing all the work we in the Flash
    community did in the first ten years to define 'best practices'
    and_levels definitely was one of them along with an 'actions'
    layer. I think Adobe's programmers who joined the Macromedia guys
    led the product somewhere it didn't necessarily need to go. The
    problem is many didn't know how to use the Flash Community's Best
    practices. They were new to Flash.

  • SWF Talking to Adobe AIR

    I have an Adobe Air App, inside the app is a SWF embedded
    with the Object Tag, the SWF calls StopPlay and then calls
    GetURL(Javascript Command) to call a Function Interfaced with a
    Function inside the Application Sandbox and it works but it only
    works while the MOUSE IS MOVING!! I cant find any documentation on
    it saying the GetURL requires Mouse Interaction at all! So for now
    I had to make a Autoit script to keep the mouse moving 100% of the
    time until it finnaly calls GetURL then it works, if the mouse
    stops moving GetURL fails Silently, Im sure this is due to SWF
    secuirty so that Flash cant just Spam out URL's but any way to make
    all SWF's on this machine SAFE even though it may be a vaulnerable
    to Exploit, I would be perfectly fine with that!
    HELP! =D
    Thanks

    I seem to have a similar problem. Last night I attempted to download Elements 13, I use 11. On the Adobe site I attempted to buy an upgrade, but when I went to pay it wanted me to sign in. I had forgotten my password ( never used it in several years) reset it, went back to buy Elements 13 to find I had now bought 2 versions for double the price. No edit cart option that I could find. Went back to try again only to find I had bought three versions now ! On every other site I have used I have the option of editing the contents of my cart.
    I attempted to phone Adobe with the 0800 number only to be told I was calling out of hours etc. I have just this morning attempted to phone about this issue only for the phone to go dead twice as I was waiting for a human.
    I conclude Adobe does not want me to upgrade to Elements 13. I do not want to upgrade to Elements 13. I have better things to do with my life

  • SWFLoader Bugs?!!!!!!!!!!!!!

    I am trying to do the communication betwen Flex with Flash (SWF) loaded by SWFLoader. However, I always encounter the problem that sometimes the program do run properly, but sometime it doesn't even start up.
    Here is my Flex code:
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                                xmlns:s="library://ns.adobe.com/flex/spark"
                                xmlns:mx="library://ns.adobe.com/flex/mx">
         <s:layout>
              <s:VerticalLayout/>
         </s:layout>
         <fx:Script>
              <![CDATA[
                   [Bindable]
                   protected var flashSaid:String = "";
                   protected var mySwfMc:MovieClip;
                   protected function setSwfMc():void{
                        mySWFLoader.content['myFlexParent'] = this;
                        mySwfMc = mySWFLoader.content as MovieClip;
                   public function listenToFlash(stringToShow:String):void{
                        flashSaid = stringToShow;
                   protected function talkToFlash(stringToPass:String):void{
                        mySwfMc.listenToFlex(stringToPass);
              ]]>
         </fx:Script>
         <fx:Declarations>
              <!-- Place non-visual elements (e.g., services, value objects) here -->
         </fx:Declarations>
         <mx:SWFLoader id="mySWFLoader" source="talk.swf" complete="setSwfMc()"/>
         <s:Button label="sendtoFlash" click="talkToFlash('hehehhhe')"/>
         <s:Label id="distxt" text="{flashSaid}"/>
    </s:WindowedApplication>
    Here if my Flash Code (created using Flash CS3, setting: AS3, Flash Player 9):
    var myFlexParent:Object;
    var i:Number;
    function talkToFlex(me:MouseEvent):void{
         myFlexParent.listenToFlash("heheheheheeh");
    function listenToFlex(stringToShow:String):void{
         flexSaidTxt.text = stringToShow;
    talkToFlexBtn.addEventListener(MouseEvent.CLICK,talkToFlex);
    I have tried to fixing and make the thing works for almost 2 days, but it didn't. The weird thing is that, I have tried to remove the script code, everything except the swfloader to load the swf file, the application window appears when I try to run the application, but the component inside it jumping up and down crazily.
    The console window shows me:
    [SWF] talk.swf - 2,684,356 bytes after decompression
    [SWF] talk.swf - 2,684,356 bytes after decompression
    [SWF] talk.swf - 2,684,356 bytes after decompression
    [SWF] talk.swf - 2,684,356 bytes after decompression
    [SWF] talk.swf - 2,684,356 bytes after decompression
    [SWF] talk.swf - 2,684,356 bytes after decompression
    [SWF] talk.swf - 2,684,356 bytes after decompression
    [SWF] talk.swf - 2,684,356 bytes after decompression
    [SWF] talk.swf - 2,684,356 bytes after decompression
    [SWF] talk.swf - 2,684,356 bytes after decompression
    [SWF] talk.swf - 2,684,356 bytes after decompression
    [SWF] talk.swf - 2,684,356 bytes after decompression
    [SWF] talk.swf - 2,684,356 bytes after decompression
    [SWF] talk.swf - 2,684,356 bytes after decompression
    [SWF] talk.swf - 2,684,356 bytes after decompression
    [SWF] talk.swf - 2,684,356 bytes after decompression
    [SWF] talk.swf - 2,684,356 bytes after decompression
    [SWF] talk.swf - 2,684,356 bytes after decompression
    [SWF] talk.swf - 2,684,356 bytes after decompression
    [SWF] talk.swf - 2,684,356 bytes after decompression
    [SWF] talk.swf - 2,684,356 bytes after decompression
    [SWF] talk.swf - 2,684,356 bytes after decompression
    Do you know why is this happens? How can I solve it? Thanks.

    Thanks for your reply. Curiously, I have checked the talk.swf file. The file size is only 20KB and Flex is loading the correct file. Don't know why Flex sees it as 2MB?
    Basically, do you see any error in the code?

  • NavigateToURL to change a div content

    I have a page with 2 div, simply like this
    <div id="menu">
         //here the code for a flash menu
    </div>
    <div id="content">
         //here I want to show a flash movie accordingly to the button clicked on the menu
    </div>
    I want to show the pages inside the div "content" without reload the whole page, can I do this with navigateToURL()? Can it interact with a js function or an Ajax call? How?

    If the second div could contain a Flash movie that you use to load the desired swf into, then you could look into using LocalConnection to have the menu talk to the other swf and trigger a function to load the file.
    Another option would be to se the ExternalInterface class and have the menu swf talk to dsome javascript in the web page and have that javascript manage the content of the div.  Some info on that can be found at... http://kb2.adobe.com/cps/156/tn_15683.html  I haven't dealt much with dynamically changing the content of divs, so I can't offer much help there.

  • Previewing SWFs in Bridge

    No matter what access I give the Flash security settings, I get the warning window whenever I preview SWFs in Bridge. Is there a way around that?
    Thanks!
    ~TPS

    Hi Dana,
    Which settings are you considering and what are the performance issues?
    You can optimize for certain workflows that will adjust processor intensive work, such as only generating large previews when displayed. If you're strictly talking about video card accelerated features, I think it's more a matter of On or Off as opposed to performance tuning. I just did a quick look and with video card acceleration enabled, in Full Screen Preview you can pan the image at magnifications much smoother.
    regards,
    steve
    Message was edited by: steve guilhamet

  • Problem with unstable and slow SWFs

    Good evening,
    Some of my users are reporting problems with the SWF output of my intensive Captive file which includes significant software simulation. I knew that these files were going to be resource intensive due to the nature of the project, but I felt comfortable with system requirements of at least 2 gb RAM and a mid-range processor.
    Unfortunately, some of my users who meet this criteria are reporting problems including text animations not playing in full and slow slide transitions. I cannot replicate this problem on any of my machines.
    I have been playing around trying to compress images as much as possible and otherwise reduce file size. What else can be done? What are the top five things I can do to remedy this problem?
    My presentation is about 50 slides and the SWF output is about 4.5 mb.
    Thanks

    I've seen this type of thing many times, especially in corporate environments.
    My top suggestions:
    If you've taken all reasonable steps to make your project as web-friendly as possible by this time, don't make any more changes to your project until you've exhausted the possibilities below.  It is most likely NOT your project that is at fault.
    Find out more details from the users that are complaining.  If at all possible, actually go and sit with them to watch the behaviour they're talking about.  Don't believe everything you hear.
    Check that users are on the correct version of Flash Player. For example, Flash Player 10 can play significantly better than Flash 9.
    Ask the user to check defragmentation on their PC.  Most users DON'T know how to do this and never defragment. As a result, I have seen PCs in corporate IT environments that had not been defragmented in years.  Their hard drive showed up mostly red when the fragmentation analysis was done.  This lack of PC housekeeping can contribute to many issues, especially with Flash or multimedia playback.  Ask the user to defragment 2 or 3 times to be on the safe side.
    Watch the CPU on Task Manager while the PC is playing the Captivate presentation.  The performance monitor should tell you if the CPU is struggling and unable to decode the content fast enough.
    Try to have another user log onto the same machine using a different profile and see if they experience the same issues.  This can tell you whether the issue is due to a corrupted user profile.  Conversely, have the same user log onto a different machine, creating a new profile for themselves on that PC to see if they experience the same issue.  If it seems to be their profile at fault, they may need to get some IT dude to blow away their profile and set it up afresh.
    Check whether or not the issue could be due to server latency.  This is especially the case where LMSs are involved.  Users will often experience latency issues such as slow transitions from one quiz slide to the next because the course module has to wait for the LMS to respond before it can move forward.  If this is occurring for a significant number of users, you can try using the optional SCORM template that only sends tracking data at the end of the module instead of all the way through.
    In my experience, if 95% of your user base is playing the content without issue, you don't need to change anything.  Chances are that whatever is going wrong for the few that are complaining about poor playback wouldn't necessarily improve no matter what you did to your project.  In the vast majority of cases, you need to isolate what exactly is causing the issue for these users and correct it ON THEIR END.
    Rod Ward
    www.infosemantics.com.au
    UPDATE: I just realised that a lot of this information would probably help others, so I created a blog post documenting these steps: http://www.infosemantics.com.au/debug_slow_playback

  • Parent talking to child fails some of the time?

    Hi All,
    Have others found that sending a value (stored in a variable) from a parent (main timeline) to a child (movie clip) fails some of the time but only when the movie is running as a .swf (it never fails when testing in authoring)?
    My main timeline's actionscript has:
    XYZ_ChildMC.variableA = false; //parent talks to child movie clip
    In the child MC script:
    import fl.video.*;
    var variableA;
    function completeHandler(e: fl.video.VideoEvent): void
         if (variableA == false)
                 myFLV.seek(0);
                 myFLV..play();
    This seems to fail about 5% of the time when running/rerunning the .swf in a browser.
    Anyone have a similar experience?
    Thanks

    never had that problem.  most likely you have a timing issue.
    use the trace function or textfield to determine if completeHandler is executing before variableA is assigned.

  • Text elements being cropped in my swf

    Problem with my text
    I have a swf
    http://www.ltcproduction.com/flash_test/ltcproditems.html
    where I keyframed the text elements to make them pop, but
    they are being cropped :(
    they play fine in the .fla file
    what should I do?

    Here is a screenshot of what I am exactly talking about:

  • After adding a flashfile .swf into a dreamweaver page and trying to run it, I get an error message related to Javascript

    after adding a flashfile .swf into a dreamweaver page and trying to run it, I get an error message related to Javascript
    I have no trouble viewing other websites with (most likely), flashfiles.
    Here is the the PopUp message:
    "Adobe-warning Adobe Flash PLayer has stopped a potentrially unsafe operation......"

    In newer versions of Flash Pro, you can export to HTML5 Canvas, that's probably what they're talking about: Flash Professional Help | Creating and publishing an HTML5 Canvas document
    .FLV and .SWF are Flash formats that won't show up on iOS (or an ever increasing number of other mobile devices). Mobile Flash was killed by Adobe a couple years ago, so the number of mobile devices that can see it is dwindling rapidly, don't use those formats if you want your viewers on mobile devices to see your content.

  • Component in SWF won't display in Sprite

    Hi
    I have a Flash sprite that contains a List component. In
    Flash the list populates fine (using ActionScript) and works as
    desired, complete with scrollbar. In Director, a plain box appears
    where the list box should be.
    (To be clear, the component is in the Flash movie. I'm not
    talking about Flash components in Director as I'm only using MX,
    not 2004
    Any thoughts on what I might be doing wrong?
    Thanks.

    I'm sorry, but I don't remember whether the Flash Asset xtra
    that
    shipped with Director MX was for Flash 6 or 7 published swf
    files. Are
    you sure the Player version is correct?

  • Opening an .swf file with flash player

    Is there any way to open a .swf in flash player ? When I
    click on a .swf it will open in flash player on my system (I have
    Fash CS3 installed) but when I am on another system without Flash
    CS3 installed, I have to right click and use open with, but I need
    it to open in flash player on its own, like an .exe. (I have flash
    player and shockwave player installed on the other system)
    I need to be able to open a .swf in flash player, like an
    .exe. How i can do this ?

    > I am new to the Captivate world as well as the new
    window options within
    > html
    > code.
    >
    > Currently I am using Captivate to re-create and update a
    DemoShield CBT
    > and
    > woudl like to call the .swf file the same way the
    DemoShiled file is
    > called
    > within the HTML. The DemoSheild file is called using a
    javascript
    > function
    > within a href tag.
    >
    > Is it possible to do the same with Captivate files?
    Create a link that
    > will
    > open a new browser window with the .swf being played by
    flash player?
    > (similar
    > to simply double clicking the file within the folder).
    >
    You should be able to use very similar code - buy instead of
    pointing to the
    swf directly, it's likely you need to point, instead, to the
    html file that
    is usually published with the swf.
    Without seeing the exact code you are talking about with
    DemoShield, I'm
    reluctant to offer you any alternative. Simply put, a
    standard link pointing
    to the correct html file should work. You can get clever and
    use JavaScript
    if you have specific needs, but the standard HTML link should
    be fine for
    your needs.
    Oh - maybe you should look at Captivate's Manu builder, as
    perhaps this will
    offer what you are looking for.
    Steve
    Adobe Community Expert: eLearning, Mobile and Devices
    European eLearning Summit - EeLS
    Adobe-sponsored eLearning conference.
    http://www.elearningsummit.eu

  • After I create a flash swf file how do I edit the video and audio?

    I created a nice flash animation, but it appears there are no video editing program which edit swf files.
    Why would flash create a file that cannot be edited in video editing programs including their own premiere pro?
    I have to get a program to convert the swf to an flv file and then I can use a video editing program?
    I tried exporting it to an avi, but much of the functionality was lost. I am looking at a man standing there instead of
    moving his lips while talking, for example. Am I missing something? Please advise. Thanks!

    If you have an swf file then you don't have a video to edit. You can export to a limited number of video formats from Flash. In order to do that successfully, you need to prepare your file so that it will export as you want. This means that you will have to produce the entire file as a linear sequence using the timeline and with no interactivitiy. You can use a limited amount of Actionscript, but it is a very small subset of the available language. Your audio must be in the timeline.
    Here is an Adobe help file for exporting to video: Flash Professional Help | Exporting Graphics and Videos

  • Flash newb can't get a SWF to work in a DW MX 2004 html

    I'm trying out Flash CS3 with my trusty ol' Dreamweaver
    MX2004, on Mac OS 10.4.9. I've had another DW site active for four
    years; this is the first time I've tried Flash.
    The swf plays as expected (I've posted it for reference at
    www.somethinghappeninghere.com/happeningintro.swf), but I cannot
    get DW to recognize it within my index.html
    (www.somethinghappeninghere.com). I've tried inserting my .swf
    according to instructions in ch. 17 in Todd Perkins' H.O.T. CS3
    book, and by using Dreamweaver's Insert > Flash menu command. I
    found another tutorial that talked about "skins" (huh?) in DW CS3,
    but I don't find them used in my MX2004.
    I do also have the corresponding "happeningintro.html" file
    from when I published the swf -- but I can't find anything that
    refers to how to USE it.
    Please send any suggestions and clarification to
    [email protected] I'm fully prepared to give myself a dope-slap
    when Iearn whatever details I've overlooked. Thank you.

    Urgh. Found my goof. Duh -- I forgot to upload the swf
    folder.
    Four years using DW and Transmit, and still this. Sheesh, I
    hope I can remember the difference between red lights and green
    lights when I drive to work this morning.

  • How to publish a SWF with local access permissions

    Hi all,
    We have been purchased a training course made with Flash. When we received the course (a SWF file with external files inside a "data" directory, images, videos, etc), we realized that it was necessary to explicity give permissions to Flash Player to access the content in the CD drive. We think that is not a good idea to distribute a CD where the user have to do "extrange things" to make it work.
    So, we talked with the developer and he sent us an .EXE file with the course, that obiously works fine (al the content in the CD is readed without user interaction), but it only works in Windows machines.
    The question is: is it possible to publish an SWF that can access to the CD content without user interaction? We are almost sure that the answer is "yes" because we have a lot of "magazines" cds with SWF files that load the contents from CD (text and images) and they work perfectly "as is".
    Thank you very much!

    Look into creating your own projector file from the .fla:
    http://www.ehow.com/how_5942407_create-projector-files-adobe-flash.html
    or Google "Flash projector files"
    You can create both the .exe version for Windows as well as a Mac version
    But to burn both versions (so will work on either) on a CD at the same time, you'll need to create a Hybrid CD:
    http://76design.ca/shiftcontrol/2005/10/19/how-to-make-a-pcmac-hybrid-cd-if-you-dont-know- jack-about-macs/
    or Google "create hybrid CD"
    Once you get the cd burned, then you can use an autorun.inf file to get the auto start... works well with Windows... Mac... not so much. But perhaps this will get you started:
    http://www.phdcc.com/shellrun/autorun.htm
    Best wishes,
    Adninjastrator

Maybe you are looking for