Control a .swf with a different .swf file file

Hello-

Can one.swf file control the actions of another on the same HTML page .swf file?

Example:

FloatingMenu.swf would control the timeline in MainStage.swf

Thank you-Ben L

Yes.

You can always use localconnection to communicate between the two.

Tags: Adobe Animate

Similar Questions

  • Control external SWF file?

    Is it possible to control an external SWF file with buttons on the main clip?

    I have an external SWF loading in the scene, but I wanted to order 'play', 'stop' and 'goto' with buttons outside of the SWF.

    BUD Hey!

    This can not solve your problem, but I thought I'd give it a try. [Excuse me if you knew:]

    I load content in my projects using the attached code. He downloads the content from the link provided, attaches to the "external" variable and place it in the clip 'LoadMov '.

    After that, I can handle the content by referring to the "external" variable

    for example:
    LoadMov.external.gotoAndStop (10)

    Tell me if it helps!
    John

  • HP 4515: Printing on both sides of a sheet with 2 different print files

    I would like to print a message on the back of our statement of mailing direct advice given our associates to each pay period.  The statement is generated in our payroll system .xps format.  The message is in Word.  Is it possible to store two files in Quebec and then have the statement printed on one side and the message printed on the reverse in the same impression.  I have a HP4515 with a double-sided accessory.  Don't know if this is possible, but I thought I could think I hope someone in HP had already made and allowed.

    As long as the printer is concerned, 'jobs' are exclusive entities, which means that they cannot share the same sheet of paper.

    that is when a task is completed, all media (paper) used by labour emptied unit before the start of any other position.

    What print products third many do (and have done for years) is to use PCL macros. sometimes referred to as overlays.

    These are normally stored in RAM of the printer (and therefore have to be downloaded on the device whenever it is turned on), although on some more expensive printers, these macros can be loaded more permanently on a hard drive in the unit.

    But the print job you send to the device must be able to select the macros, which prohibits indeed (AFAIK) standard Windows printer drivers.

    either you write your own flow of printing (without the benefit of a driver), or to make use of a third-party product that could do it for you. most of these products are designed for specific types of production and are not suitable for general - purpose printing.

    ... or just change your app "direct deposit advice" out of the back and the front statement.

  • Control a SWF from Flex file?

    I have a flex application with a stack of view which has some of his children SWFLoaders.

    For example, "page 2" the view stack is an interactive SWF of flash cs3. It loads and works perfectly, but how to stop and reset it to Flex, as when the user changes discovered battery views?

    Fortunately, the SWF file is playing, but the user goes back to 'page 1' from VS, the SWF on the page 2 always plays its audio.

    How can I control the SWF file?

    I found an old post which enabled, with a simple change. In the interest of helping others who find this thread, here's what worked for me:

    In my element 'page 2 ':

    Import mx.controls.SWFLoader;

    private var movie_clip:MovieClip;
    private var myLoader:SWFLoader = new SWFLoader();

    private function init (): void {}
    myLoader.addEventListener (Event.INIT, loadHandler);
    myLoader.load ("equipment.swf");
    this.addChildAt(myLoader,0);
    }

    private void loadHandler(e:Event):void {}
    movie_clip = e.target.content;
    }

    public function pp (): void {}
    movie_clip.remotePause ();
    }

    ]]>

    And then, in the main application:





  • Control loaded swf on the main timeline

    Hello

    I'm working on loading external swf files for ios. I am able to load swf files and assembled visible or invisible in different settings. I have trouble controlling the swf files loaded on the main timeline. Specifically, I would like to have a button on the main timeline, that when you click on will move a swf loaded to frame 1.

    Here is a code that loads a swf file:

    var myLoader1:Loader;

    var loaderContext1:LoaderContext = new LoaderContext (false null, ApplicationDomain.currentDomain),

    if(myLoader1 == null)

    {

    myLoader1 = new Loader();

    addChild (myLoader1);

    }

    myLoader1.load (new URLRequest("folder/file1.swf"), loaderContext1);

    myLoader1.visible = true;

    backbutton.addEventListener (MouseEvent.MOUSE_DOWN, backbutton1);

    function backbutton1(myEvent:MouseEvent):void {? myLoader1.gotoAndStop (1) ;}}  (this line does not work)

    (Once I load file1.swf, in the file1.swf I click a next button to move on to different periods.) My question is: hHow do I code the "backbutton" on the main timeline so that it causes the file1.swf to go to frame 1?)

    Thank you for your help.

    After loading is complete (and assuming that you load an as3 swf), you can use:

    MovieClip (myLoader1.content) .gotoAndStop (1);

  • Different versions of an image animated in the single swf file

    I make a game that has several objects (crates, beds, tables) that can be placed on a grid.

    Objects are created in flash and exported as individual .swf files. Each object can be rotated. To do this, I create 4 frames in each .swf and draw a different version of the image in each frame. It allows me to 'spin' an object in actionscript by simply going to the next section of the swf movieClip.

    This simplifies things a lot for me, because it logically follows that an object will be an image (swf) file for all orientations. However, I encountered a problem in what I would like that the object has an animation. Does anyone know if there is a way to do this? or maybe another technique I could use.

    You still haven't explained what problem you are having with the implementation of such an animation.  You can create an animation as a separate movieclip and place it in all or part of the 4 frames or objects within these four images.

  • I can produce a SWF file or an interactive projector with Flash CS5 that can play on a mobile device

    I'm trying to publish a SWF file or a file of projection with Flash CS5 that can play on any mobile device with the appropriate scaling and the intact interactivility?  Is it possible now?  If not, what other software or program needs.  The SWF file is approximately 26MB in size.

    Thank you!

    Karen

    Here are a few articles, one older but useful and one more up to date:

    Older:

    http://www.Adobe.com/devnet/air/articles/multiple-screen-sizes.html

    Update:

    http://www.Adobe.com/devnet/flash/articles/designing-MULTIDEVICE-MULTIRESOLUTION.html

    They will start you on the pursuit of a fluid mobile interface. The general idea is that mentioned kglad, you have code depending on your application to intelligently move things on your environment.

    You never want to code "for a specific device. Rather just learn the rules to be really smooth and independent of resolution. This may mean parts of your interface are shown or hidden based on circumstances. It is not easy.

    Android is very fragmented experience. The different resolutions, IPR, and capacity means there is no miracle cure for you to develop something once and deploy everywhere without calculating anything. The market is developing so great for Android it's too big to ignore (meaning US, Android is already widely dominant on iOS where unit prices are not subsidized by carriers, which is mainly outside the United States). Learn to think on some construction projects with fluidity is an evil necessary.

  • control the loaded swf file

    Hi all

    I am loading a swf into another SWF, I want to controll loaded swf such as play and pause the swf. The loaded swf file is an animation file, all animations are kept in a movieclip, then please tell me how I can control the animation.

    In your first assignment, you tell the animation is present in a movieclip.  If this movieclip is in the loaded swf file you will probably need to target this movieclip to tell him to play rather than the SWF itself, as in...

    currentSWF.movieclipName.play ();

    where movieclipName is replaced with the name of the instance of movieclip in the loaded swf file.

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

    Hello

    I have a file main.swf . From this file I can access the file external.swf which is an external file.

    Now, how can I write code on my file main.swf to the button that is on my external.swf file?

    Activities.MainPanel.close_btn.addEventListener (MouseEvent.CLICK, btnClickClose);

    Activities.MainPanel.close_btn (This button is actually the external.swf file, but I want to write code on main.swf file to run it on external.swf) How can I control a single swf in another swf file button?

    Thank you.

    Some examples of code that you should be able to adapt to your needs.

    create a new instance of the loader object.

    var loader: Loader = new Loader();

    make the download request...

    var request: URLRequest = new URLRequest ("external.swf");

    Add a full event for the loader listener

    loader.contentLoaderInfo.addEventListener (Event.COMPLETE, completeHandler);

    start the actual loading process...

    Loader.Load (request);

    Create a new empty movieClip instance, you place the movie loaded into this movieClip after loading

    var externalMovie:MovieClip;

    This function is called when the download is complete and the file is ready for use.

    function completeHandler(event:Event):void {}

    set the contents of the film to the new empty movieClip...

    externalMovie = MovieClip (event.target.content);

    Add this new film to the display list.

    addChild (externalMovie);

    }

    Now you can reference the film loaded with the name of the instance 'externalMovie '. So if, for example, you want to address a button in the film loaded, you can write something like that on the main timeline:

    externalMovie.addEventListener (MouseEvent.CLICK, btnClickClose);

    function btnClickClose(event:MouseEvent):void {}

    }

  • Need to connect different swf files in a single site

    I need to make this site as presentation for my next review. I found a good model for a slide show. The presentation will be structured as follows:

    HOME PAGE with sidebar linking to:

                  • slide 1 with slide show 1
                  • slide 2 with slide show 2
                  • Drag three with slideshow 3
                  • Slide four with slideshow 4

    due to the nature of the code you can't put different slideshows in the same .swf file in different scenes (I copied and pasted in every scene and changed actionscript code so they would apply to the different images) because they will create conflicts between them. now, they call into question is can I use the sidebar for the link to the different swf files but still give the impression that it was just a big swf?

    Thank you!

    Here's what you need to do

    Create a document named main.swf in this document, put the 4 buttons and instance (button2, button3_btn, button1_btn, button4_btn).

    Change the name of your slideshows to slide1.swf, slide2.swf, slide3.swf and slide4.swf.

    Now go in your main.swf actionScript Panel and paste the following code:

    loading external content
    var loader = new Loader
    addChild (loader)
    Loader.x = 0;
    Loader.y = 0;

    button1_btn.addEventListener (MouseEvent.CLICK, function() {}
    Loader.Load (new URLRequest ("slide1.swf"));
    });

    button2_btn.addEventListener (MouseEvent.CLICK, function() {}
    Loader.Load (new URLRequest ("slide2.swf"));
    });

    button3_btn.addEventListener (MouseEvent.CLICK, function() {}
    Loader.Load (new URLRequest ("slide3.swf"));
    });

    button4_btn.addEventListener (MouseEvent.CLICK, function() {}
    Loader.Load (new URLRequest ("slide4.swf"));
    });

    any problems let me know!

  • 3 with the old SWF files

    My site has multiple SWF files running with AS2. Now, I plan to spend my new AS3 files. My main as2 swf file load other SWFs as2 using load() and places them at different levels.

    This master file can load as3 swf files?

    If I change my main as3 file, it would then be able to load as2 swf files?

    Files must communicate for example disable buttons on the lower level swf files.

    as3 and AS2 files can communicate using the localconnection class.  so, Yes, it's the answer to your question.

  • Having problem controling resizing a swf in another swf file

    I am trying to build a site where all pages are complete browser and maintain proportions. I want to control the resizing of the menu page to.  Resizing works fine on the page that is resized, but when I try to leave the swf file parent that it has problems.

    Here's what the homepage looks like with the created controls http://www.mespinach/example1/

    This example is the site, it has a menu page that I opened the others after I have remove the resizing of the code of the home page and try to resize menu.swf.

    Here's the code for menu.swf

    internship. Align = StageAlign.TOP_LEFT;
    stage.scaleMode = StageScaleMode.NO_SCALE;

    var holder: btnHolder = new btnHolder();
    addChild (holder);
    /*
    stage.addEventListener (Event.RESIZE, moveHolder);
    moveHolder();
    function moveHolder(e:Event_=_null):void {}
    Holder.x = stage.stageWidth - (holder.width + 25);
    Holder.y = 50;
    }
    */

    holder.mcHome.buttonMode = true;
    holder.mcAbout.buttonMode = true;
    holder.mcMovies.buttonMode = true;
    holder.mcLocation.buttonMode = true;
    holder.mcStore.buttonMode = true;

    var objFileToLoad: URLRequest = new URLRequest();
    var swfLoader:Loader;
    addListeners();

    function addListeners (): void {}
    holder.mcHome.addEventListener (MouseEvent.CLICK, homepage);
    holder.mcAbout.addEventListener (MouseEvent.CLICK, aboutPage);
    holder.mcMovies.addEventListener (MouseEvent.CLICK, moviesPage);
    holder.mcLocation.addEventListener (MouseEvent.CLICK, locationPage);
    holder.mcStore.addEventListener (MouseEvent.CLICK, storePage);
    }
    var currentPage: *;
    var xImage:Sprite = new Sprite();

    homePage();

    function homePage(event:MouseEvent_=_null):void {}
    SoundMixer.stopAll ();
    addListeners();
    If (swfLoader) {This.removeChildAt (0) ;}}
    holder.mcHome.removeEventListener (MouseEvent.CLICK, homepage);
    var loadRequest:URLRequest = new URLRequest ("home.swf");
    swfLoader = new Loader();
    swfLoader.contentLoaderInfo.addEventListener (Event.INIT, positionContent);
    swfLoader.load (loadRequest);
    this.addChildAt (swfLoader, 0);


    function positionContent(e:Event):void {}
    currentPage = swfLoader.content;
    var loadedImage = currentPage.onStage;
    xImage = loadedImage;
    loadedImage.x = 0;
    loadedImage.y = 0;
    fillBG();
    }
    }

    function aboutPage(event:MouseEvent):void {}
    /*
    SoundMixer.stopAll ();
    var objFileToLoad: URLRequest = new URLRequest ("about.swf");
    loader.contentLoaderInfo.addEventListener (Event.INIT, positionContent);
    Loader.Load (objFileToLoad);
    this.addChildAt (loader, 0);

    function positionContent(e:Event):void {}
    Loader.x = 0;
    Loader.y = 0;

    }
    */
    }

    function moviesPage(event:MouseEvent):void {}
    addListeners();
    holder.mcMovies.removeEventListener (MouseEvent.CLICK, moviesPage);
    SoundMixer.stopAll ();
    If (swfLoader) {This.removeChildAt (0) ;}}
    var objFileToLoad: URLRequest = new URLRequest ("Movies.swf");
    swfLoader.contentLoaderInfo.addEventListener (Event.INIT, loadedHandler);
    swfLoader.load (objFileToLoad);

    this.addChildAt (swfLoader, 0);
    function loadedHandler(e:Event):void {}
    currentPage = swfLoader.content;
    xImage = currentPage;
    }
    }

    function locationPage(event:MouseEvent):void {}
    /*
    SoundMixer.stopAll ();
    var objFileToLoad: URLRequest = new URLRequest ("location.swf");
    Loader.Load (objFileToLoad);
    this.addChildAt (loader, 0);
    */
    }

    function storePage(event:MouseEvent):void {}
    /*
    SoundMixer.stopAll ();
    var objFileToLoad: URLRequest = new URLRequest ("store.swf");
    Loader.Load (objFileToLoad);
    this.addChildAt (loader, 0);
    */
    }
    //////////////////////////////////////////////////////////
    ///////////////////////////////////////////////////////////
    holder.addEventListener (MouseEvent.MOUSE_OVER, over);
    holder.addEventListener (MouseEvent.MOUSE_OUT, out);
    holder.addEventListener (MouseEvent.MOUSE_DOWN, down);
    holder.addEventListener (MouseEvent.MOUSE_UP, up);
    holder.mcAbout.buttonMode = true;
    holder.mcHome.buttonMode = true;
    holder.mcMovies.buttonMode = true;
    holder.mcStore.buttonMode = true;
    holder.mcLocation.buttonMode = true;

    var myColor:ColorTransform = transform.colorTransform;


    function over(e:MouseEvent):void {}
    myColor.alphaMultiplier = 3;
    e.target.transform.colorTransform = myColor;
    }

    function out(e:MouseEvent):void {}
    myColor.alphaMultiplier = 1;
    e.target.transform.colorTransform = myColor;
    }

    function down(e:MouseEvent):void {}
    myColor.alphaMultiplier = 5;
    e.target.transform.colorTransform = myColor;
    }

    function up(e:MouseEvent):void {}
    myColor.alphaMultiplier = 1;
    e.target.transform.colorTransform = myColor;
    }
    CPC var = this.child.child.getChildByName ("onStage");
    trace (CPC);
    report / var: number;
    var rRatio:Number;

    ratio = xImage.height/xImage.width;
    rRatio = xImage.width/xImage.height;
    var newRatio:Number;

    function fillBG(evt:Event_=_null):void {}
    trace ("width:" + xImage.width);
    trace ("size:" + xImage.height);
    trace ("ratio:" + ratio.toString ());
    trace ("rRatio:" + rRatio.toString ());
    trace ("newRatio:" + newRatio.toString ());

    newRatio = stage.stageHeight/stage.stageWidth;
    Holder.x = stage.stageWidth - (holder.width + 25);
    Holder.y = 50;

    If (newRatio > ratio) {}
    trace ("newRatio > ratio :"); ")
    xImage.height = stage.stageHeight;
    xImage.width = stage.stageHeight * rRatio;
    } else {}
    trace ("Else");
    xImage.width = stage.stageWidth;
    xImage.height = stage.stageWidth * ratio;
    }

    stage.addEventListener (Event.RESIZE, fillBG);
    }

    messages of the plotting here instructions:

    Width: 939
    height: 704
    ratio: NaN
    rRatio: NaN
    newRatio: NaN
    on the other
    Width: 561
    height: 704
    ratio: NaN
    rRatio: NaN
    newRatio: 0.49376114081996436
    on the other

    Height never changes

    Retiro and rRatio are NaN values even if they are the Quotient of numbers.

    First of all, it's too much code to pass so I don't think I'm going to give you a complete answer. I guess that's a script code.

    Here is what I noticed:

    1. you declare variables outside the scopes of functions:

    report / var: number;
    var rRatio:Number;

    ratio = xImage.height/xImage.width;
    rRatio = xImage.width/xImage.height;
    var newRatio:Number;

    Naturally, they are NaN values because neither xImage.height nor xImage.width are available at this stage.

    I suspect that you expect that when code hits these lines - swf is already loaded but IT IS NOT. Flash runs THE CODE through, DO NOT WAIT to load SWF files-it's one of the premises of the asynchronous event model.

    To remedy this, place value assignments in the event handler:

    Version 1:

    Declare the variable at the top of the code before you start loading:

    var ratio:Number;
    var rRatio:Number;
    var newRatio:Number;
    

    Calculate values in the event handler:

     function positionContent(e:Event):void {        ccurrentPage = swfLoader.content;        var loadedImage = currentPage.onStage;        xImage = loadedImage;
            ratio = xImage.height/xImage.width;        rRatio = xImage.width/xImage.height;        fillBG();}
    

    Or do it inside the fillBG(); method (version 2)

    2. nested functions are bad and I would suggest to reconsider their use and bring them out of reach of the other methods. I'm talking about managers positionContent that you are using.

           

  • get a dotted line around .swf files in my flash site now. This is new from Firefox 3. With the help of 4 on a MacBookPro. tried the fix "style no outline. does not work. any help?

    Question
    get a dotted line around .swf files in my flash site now. This is new from Firefox 3. With the help of 4 on a MacBookPro. tried the fix "style no outline. does not work. any help?

    Ah, quite understand now that I added to my doc html

    < style type = "text/css" >
    {body
    background-color: #FFF;
    }
    "'object {outline: none ;}"} '

    < / style >

  • Red screen on the page with the embedded swf file

    My application refused:

    I am testing your app on the BlackBerry Dev Alpha Device (OS version 10.0.9.1675). When I try to open the sub category of your app, it's only showing a red blank screen appears and does not respond.
    

    It works very well in ripple, but I can't get the Simulator working and I don't have an alpha of dev, so I can't test it myself. The subcategory is just a HTML with a built-in .swf file.

    Download the full source code

    Any suggestions?

    Hello

    You have this function in your config.xml file?

  • How can I tell where a .swf file is linking in with the submit button?

    Recently, I was hired as a graphic designer and administrator of the site to a local company. Now, everything was working fine until my employer has changed some settings with our FTP. All our "Customizer" on our Web site - which are .swf files - is more work.


    What I discovered is this: when a customer clicks on the button 'submit', the 'page' are they sent to? The information they type in what are to be sent to an e-mail address, but I can't find any of these settings in the .fla files on our server of the company.

    Once I know where they establish between, I can change this path or make sure that the path exists as it appears in the settings of these customizer .swf files.

    Any help that anyone can provide would be much appreciated! I don't have much experience with this program, or flash in general, but I understand the basics. I've spent most of my work day (8 hours) full trying to understand this point, and the end of my Friday draws to a close, I hope I don't spend another week to try to resolve this - a week where customers can customize their products on our website!

    Open the problem page in your web browser and press F12 to bring up the developer tools. Select the network tab (this is for Firefox or IE; in IE you need to click the green arrow to enable logging). When you click on send, it should display the address that the SWF file attempts to access.

Maybe you are looking for

  • Why is the box allow cutting down

    Very annoying to allow guard falling on almost all the sites I. I then click on it and it keeps constantly falling back down.I can click it a dozen times and it just re appears. Ready to drop Firefox, even if I go to options and uncheck the pop ups,

  • HP 15 Omen: backlight of the omen 15 hp

    Hello I just got a hp omen 15-5110nr serial code [personal information deleted]. I'm under 10 64-bit windows. My problem has to do with the customization of the keyboard backlight. I tried to change the color using the control of harbinger of hp, but

  • Satellite 5100-201-size Limitation of HARD drive

    Hello I have a Satellite 5100-201 P4 - M 1.6 Ghz with 30 GB IDE HDD and 1024 MB of RAM. I use my 'old' Satellite only for music (the largest sound found on laptops!) but my HARD drive got a little weak. So my question is if there is no limit on the s

  • How can ThinkCentre M55, I change the BIOS language to English?

    Hello I just received two used M55 thincentres. the language of the page loading thinkcenter and the BIOS is in Italian. can I change to English somehow? do I need a disc maybe hardware maintenance? Thanks for the tips

  • .Sha MD5 and the shared key

    Hello world. A quick question for you guys: Make a secret key shared md5/Sha use when calculating hash? Thank you