Communicating between swf files

movie1.swf has a loader component named myLoader.
can movie2.swf contain a button instance that will tell
movie1.swf.myLoader what to load?

It shouldn't. If sub.swf is truly loaded into _level1 then it
has no _level0, really this is correct!
Are you sure you are loading into a _level and not onto a
depth? Many folks mix the two up.
If you are having a lot of trouble with this it is generally
a good idea to set your current project aside for the moment and
start with a fresh slate. I created two swf files.
test1.swf has a blue square and code to load an external clip
into _level1 the code is:
loadMovieNum("test2.swf",1);
test2.swf has a movieclip instance of a red circle and the
following actionscript:
myClip.onRelease=function(){
_level0._alpha=50;
When test1.swf is run I see both my blue square and my red
circle. When I click on the red circle only the blue square (the
art work on _level0 from the original swf) is made 50 percent
opaque. The red circle remains as it was.
You might want to try a similar test, starting with something
like I have and moving it toward what you are trying to achieve.
I'm not sure I understand your
_level0.myVariable.goDoThis()
syntax. myVariable seems like a property and properties don't
usually have methods so I don't quite get it. If myVariable is a
variable defined in the sub.swf then maybe you need this:
_level0[myVariable].goDoThis();
???

Similar Messages

  • Passing data parameter between SWF files

    Hello Xcelsius Gurus,
    Is it possible to pass data parameter between SWF files?
    If possible, how to achieve it?
    Thank you.
    Justine

    Hi,
    Thank you for the reference.  Little bit confused, please let me clarify. 
    I do not understand how the receiver SWF receieved the data parameter and process.
    For example, I have a parent dashboard and a child dashboard.  In the parent dashboard, I have set up combo box to filter the data.  And I want the data that I have selected in combo box to the child dashboard.
    To do this, first I need to setup the flash variable at the parent dashboard to fetch the data I selected.
    After this, how to link this data to the child dashboard?
    Furthermore, after the child dashboard received the data parameter, I need this data to insert into the spreadsheet so I can filter the data.  Is this possible?
    Thanks.
    Edited by: Justine Liu on Jan 19, 2010 3:11 PM

  • Linking between SWF files

    I need to general advice while protyping my website. I'm
    creating separate somewhat large swf files for each page of my
    website. Therefore, each will need its own html file if I don't
    want it take 3 years to go between pages. I'm confused how to link
    between the each page using a button in flash. Is this an action
    script thing? My links will be static text buttons. Thanks.

    Thanks. I think I get it, but I want to be sure. I think I
    need to be a little clearer:
    One SWF file inserted as my entire index.html page. Right now
    I have a static text button in the SWF file home page that says
    "About Us". I'm designing a new page that will also be its own SWF
    file for "About Us". I have a new www.xxxxx.com/aboutus.html page
    that I plan to put the file in when finished. In the text button on
    the homepage, do I use AS3 URLRequest("
    http://www.xxxxxxx.com/aboutus.html")
    to navigate. Thanks.

  • Link between swf files.

    Hello. I need to find a way to link multiple .swf files, so I may have a menu and after clicking a button go from there  to any swf file and back. But i need something that works in AS 2 and 3 because my files are in both ActionScripts. It shouldn't be a problem, right? Ive been looking for and trying different things but i can't do it.
    Hope someone can help
    Thanks.

    Also I have this code that works in AS3 but only for one button, when I try to make another one flash marks error. I cant link another button with another file.
    var loadedSWF:Loader = null;
    * Loads an SWF and adds it to container once complete
    * @param file The URL to the SWF to load
    * @param container The container to add the SWF to
    function loadSWF(file:String, container:MovieClip=null):void
        if(container == null) container = MovieClip(root);
        // removes the previously loaded SWF
        if(loadedSWF != null)
            if(loadedSWF.parent) loadedSWF.parent.removeChild(loadedSWF);
        var req:URLRequest = new URLRequest(file);
        loadedSWF = new Loader();
        loadedSWF.load(req);
        addChild(loadedSWF);
    mybutton.addEventListener(MouseEvent.CLICK, _click);
    function _click(e:MouseEvent):void
        loadSWF("myfile1.swf");

  • Overlaping sounds between SWF files

    Hi there!
    I'm making a serie of animations at my work. Each animation is a different SWF file (with a different background music) and they are all linked by a "Menu".
    The music was placed in a single layer of the first scene of each animation by using "Sync: Start > Loop". Although it is only in the first scene, the music keeps playing during the other scenes. That's no problem at all for me!
    But when I navigate through the files, each file's background music keeps playing, even though it's not running any more. So, in a certain moment, there are 3 or 4 sounds playing at the same time.
    Can anyone help me? Please! =P

    Actually, solved this adding "SoundMixer.stopAll()" inside AS code of the button that I've created to change from scene to scene.
    But thanks anyways, Ned Murphy!

  • Sharing data between swf files

    Hello,
         I have a login.swf file which authenticates the user. Once login is successful I want redirect to loggedin.swf file and pass some user information to the loggedin.swf?. How do i do it? I dont want to use shared objects as users may prevent saving  on to local machine. I dont want to send it in URL either. I want something like hidden variables in html. Is it possible.
    Thanks,
    Bharani

    Hi
    I have mutiple swf files in single page each having its sound attached to it.
    Now I want one sound to play at a time while all rest swf's sound to be mute.
    When user clicks second swf then first swf sound to be mute and second's swf sound to play and all rest swf to mute.
    Similarly when he clicks third then third's sound to play while rest all swf to be mute.
    I have already implemented swf with sound attached.
    But they all are playing at a time.
    How this control can be implemented ?? Number of swf files can vary.
    Any help??

  • Communication between swf

    HI,
    I have a communication problem between to SWF. Here is my code, SwfA is the caller :
    Shared interface between the 2 Swf :
    public interface ItfA {
      // some code
    In the second Swf, SwfB, the document class :
    public class MainB extends MovieClip {
      private var a:Itfa;
      public function start(_a:ItfA) {
        a = _a;
        // etc
    In the first Swf, SwfA:
    public A implements ItfA {
      var mLoader:Loader;
       public function startLoad()
        mLoader = new Loader();
        var mRequest:URLRequest = new URLRequest(“B.swf”);
        mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,  onCompleteHandler);
        mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onprogressHandler);
        mLoader.load(mRequest);
      public function onCompleteHandler(loadEvent:Event)
           var mainB = mLoader.content;
           mainClip.addChild(mainB);
           mainB.start(this);
      public function onprogressHandler(mProgress:ProgressEvent)
        var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal;
        trace(percent);
    My problem :
    When I test in the fash environment (ctrl + enter), there is no problem, but in my browser it failes and says that A is not an ItfA (TypeError: Error #1034)
    Any idea ?
    Thanks

    Note :
    After some more tests, i've got an error in this case too : if i'am waiting an A object in the second Swf and if the main Swf sends an A object !
    The error :
    TypeError: Error #1034: Type Coercion failed: cannot convert com.test::TyrusGame@6c81f71 to com.test.TyrusGame.
    It's strange because the message seems to mean that the classes are not the same, and they are, because they are from a common file. A and B uses as3 files in a common folder and this folder is added to the classpath of the two projects.

  • Communication between war files

    Hi Team,
    I have a requirement. I had set a data in servletContext using getServletContext.setAttribute() in a servlet, which is in one war file. Now i want that data which has been set, in another jsp or servlet which is in another war file .How can i achieve this? Please help

    Both on the same server?
    You can potentially use the method of ServletContext: servletContext.getServletContext("/pathToOtherContext");
    In a secure environment that should always return null. Enabling it is a server specific ability.
    On Tomcat you can do that through the [context configuration|http://tomcat.apache.org/tomcat-6.0-doc/config/context.html], specifying crossContext=true for the application you want to be able to make such a call.
    cheers,
    evnafets

  • Communication between swf's

    Hi,
    If a button on an swf is clicked, then a corresponding image
    has to be loaded in another swf. Both swf's are located in same web
    page. is this possible. Pls help me.
    thank u
    Manu

    "Manu Palasery" <[email protected]> wrote in
    message news:e6qngg$ppp$[email protected]..
    > Hi,
    >
    > If a button on an swf is clicked, then a corresponding
    image has to be loaded in another swf. Both swf's are located in
    same web
    > page. is this possible. Pls help me.
    >
    > thank u
    >
    > Manu
    localConnection can be used for that. Here is a version 6
    example with sourcecode...
    http://members.cox.net/kompanionkare/multiconnect/
    If you're using Internet Explorer, each swf has to be clicked
    on once to activate it due to the new restrictions on Microsoft's
    browser.
    tralfaz

  • Communications between 2 separated .swf files AS 3

    Hello,
    I have spend hours searching it over internet but i have found only codes which solves this problem in Action Script 2.0 like this http://blog.circlecube.com/2008/03/tutorial/local-connection-actionscript-communicate-betw een-seperate-flash-files-tutorial/
    and i want to solve it out with action script 3.0
    My problem is that i simply want to communicate between two separated .swf files in one HTML page.
    So if you have any ideas i would appreciate any help.
    thx

    You can talk between movies using javascript as the middleman. Here's a link that provides some information on that for both AS2 and AS3...
    http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_15683
    It can be a little confusing to make it work, so take your time with it.

  • Comparision between Modules and SWF files

    I've used modules and SWF files in my flex apps but don't
    seem to see or figure out what the basic difference between the two
    is.
    I'm interested in comparisions *excluding* file size. For
    instance:
    When would one use SWF files instead of Modules?
    Are there things possible/not possible when using one or the
    other?
    Any other pros/cons?

    Obviously you can use Application SWFs to break a large
    application into dynamically loaded parts. Modules were created to
    address the ease-of-use issue. Module SWFs provide an easier
    mechanism for communication between the Modules and main (shell)
    application SWF. Modules also give us a way to enhance that
    mechanism in the future which would be limiting if working solely
    with Applications.
    Further, Modules can be reduced in SWF-size compiling them
    against the symbols loaded in the shell application. This makes
    them much smaller and faster to download. That was possible with
    Application SWFs by using Runtime Shared Libraries. However, using
    RSLs is tedious compared to using Modules.
    I have an example of using Modules on my blog. The example
    covers the size optimization of Modules as well as communication
    with Modules.

  • Communication between thread in the same process using file interface.

    Hi,
    I am developing  driver and i need to communicate between two thread.
    >can anyone guide me on implementing communication between two thread in the same process using File Interface. First thread will be driver and second will be application.I need to send IOCTL like commands using File interface ie is WriteFile(),ReadFile()
    from Host process to driver through file-interface(which run's in driver context).Host process should not be blocked for the duration of the driver to process the command.
    >File-interface will run in driver context and it will be responsible to receive command from application and pass it to the driver.
    what are the complexity introduced?
    >Can anyone also give me the link/reference to get more information on this topic?
    >How to replace IOCTL command's for instance baud _rate change command with a file interface for example with IRP.

    Here  is the detailed query:
    Hardware Abstraction Layer will interact with Driver(Both will be running in complete different process) .there is a IOCTL for command and  File interface for read and write.
    My requirement is:
    Both should run in the same process so HAL will run as one thread and driver as another thread in the same process .I don't want HAL to wait for completion of request and also i don't want driver to be blocked .
    We are planning to use a File Interface for communication between Hardware abstraction layer and Driver
    HAL will send the command or read/write operation to a file interface and driver will get the command or read/write request from the File interface
    There is a flexibility to change Hardware Abstraction layer and also the Driver
    Is it possible to use IOCTL between two thread under same process? if not what other options do we have.
    Can we use File interface to  send command (like IOCTL) between two thread?

  • Encrypted packets between server - client (swf file)

    hello guys,
    can some1 know how can i decrypt some packets which are sended between server - client (swf file) ?
    ty

    You shouldn't need to sync u/gid's. 
    The first thing that comes to my mind here is simple filesystem perms.  To test I would make the shared dir world/group readable/writeable - IE chmod 777 /my/shared/folder. then try connecting from the remote client.  Remember, there are two sets of access permissions...Share level and filesystem level.
    You can do user/group mapping if you're in a Windows AD or domain environment, but with stand-alone Samba servers this is not necessary.
    I would also check the samba check list at the following link for a decent, simple set of items to look at for basic troubleshooting...
    http://us3.samba.org/samba/docs/man/Sam … nosis.html

  • Trying to properly code a menu with buttons that can go back and forth between external swf files

    I have a project I've been working on that, when properly coded, has a "main menu" with 4 "doors" (buttons). When the corresponding buttons to these "doors" are clicked, it should go to and play an external .swf file. If that doesn't make sense, think of a DVD menu. You click play movie, it plays the movie. When the movie is over, there's two buttons on that swf file to either play the movie over or go back the main menu, which is an external .swf file (Remember, we go to the movie from the menu, which is a seperate file). So far, the buttons work. The menu works. However, from the movie, at the conclusion, when I click the button to go back to the main menu, it displays the movie clip and the buttons, but none of the buttons work. I'm starting to think it has to do with the fact the main menu was written in AS3 and the movie was made in AS2. If anyone can assist me in being to able to keep both files and still navigate between the two, being able to bring up the menu from the movie and be able to play the movie again, and so on and so on, that'd be GREAT. I'm somewhat of a noob to Flash, but I learn quickly and I'm open to any suggestions. Here's the code for main menu, which I guess acts as the parent file, and the movie. If I get this to work, I essentially would duplicate the same actions for the other 4 doors, once I complete the environments for them. Thanks
    Main.Fla/Swf (written in AS3)
    (This is the action on the first frame, that has all the buttons. For this question, I'm just trying to properly code for 'Door4', which is the "door" to the movie.)
    import flash.display.Loader;
    stop();
    var myLoader1:Loader=new Loader ();
    Door4.addEventListener(MouseEvent.CLICK, jayzSwf);
    function jayzSwf(myevent1:MouseEvent):void
              var myURL1:URLRequest = new URLRequest("jayzspeaks.swf");
              myLoader1.load(myURL1);
              addChild(myLoader1);
              myLoader1.x = 0;
              myLoader1.y = 0;
    Movie.Fla/Swf (written in AS2)
    (This is action on the button that returns to the menu)
    on (release) {
              this.createEmptyMovieClip("container",this.getNextHighestDepth());
              container.loadMovie("main.swf");

    At least you're going in the correct (mis)direction. You have AS3 loading AS2. So that's not a huge hurdle.
    I believe all you really need to do is send your Main.swf a signal that the content it loaded (e.g. jayzspeaks.swf) is done and you want to get rid of it.
    The code I pointed you to asks you to (upon download and import then) instantiate it in both AS2 and AS3. They give a very simple easy to understand line of code.
    // as2, load this in jayzspeaks.swf
    var myBridge:SWFBridgeAS2 = new SWFBridgeAS2("connectionID", clientObj);
    // as3, load this in main.swf
    var myBridge:SWFBridgeAS3 = new SWFBridgeAS3("connectionID", clientObj);
    Make sure the connectionID matches between them. Set it to whatever you want.
    When you're done with your as2 loaded content you'd send a signal (over localconnection) back to the AS3 Main like they say:
    myBridge.send("someFunctionToUnloadContent");
    myBridge.close();
    You'd need to make the as3 function "someFunctionToUnloadContent()" (example purposes only name) and it should unload the jayzspeaks.swf that was loaded in the loader.
    Make sure you get that close in there so you don't drill up a bunch of localconnection objects just like the simple source code says.

  • Communicating between two javafx files

    hi,
    i have two javafx files and i want the two to communicate
    that is on pressing a button in one i want the control to be transffered to the other...
    Hw can i do this,
    can any one help

    Hi,
    If you mean communicating between two database, you can create DATABASE LINK.
    http://download.oracle.com/docs/cd/B14117_01/server.101/b10759/statements_5005.htm
    Thanks

Maybe you are looking for

  • Can't open Mail, Index is broken!

    Hi, I need some help. I don't use Mail on my iMac or Macbook Pro Retina but need it to run some AppleScripts, so I tried to open it on my Macbook Pro Retina and iMac but can't open it on either, it just comes up with the below: First: To use the new

  • Browser plug-in & Java components

    I post my topic here as I realized the JavaBean forum wasn't the right place. Sorry for the double post. As part of an application, I have developped a specific component/javabean that displays some data that may be stored in a file (*.ppp). I would

  • Body Problem!!

    I have a macbook 13' white late 2010 model, the rubber body of the base has come out what should i do? Should i get a new body for my macbook? If yes where can i buy one??

  • OBIEE 11g  Pie Chart Settings /Axis titles

    Hi, In OBIEE 11g, it is not possible to change the Axis titles in a pie chart. Does anyone know how to change it in the xml file? Any feedback is highly appreciated. //Katherine Edited by: 1002173 on 2013-apr-24 03:56

  • How to create Manifest file !

    Hi, I had to create a bean . For that i created a sourse file xyz.java and put it in the package. Then i comipled it. But an not able to create the manifest file... Plz tell me how to create it ??? Thanks