[F8} Control External SWF

Hey everyone, its been a while since I have done this. Can
someone plz help me control the timeline of an external swf loaded
into a holder from the main movie? I need a button in my main movie
to tell the external swf to gotoAndPlay a frame, and I can't
remember how this is done.

thanx for the help. this is just a shot in the dark but what
would my "mc " name be? Its an externally loaded swf. Is it the
holder instance name?

Similar Messages

  • 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 into the stage, but I wanted
    to control "play" "stop" and "goto" with buttons outside that
    SWF.

    I need to do the same thing, but i get an error.
    TypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    at page2sub1page1_fla::MainTimeline/frame1()
    TypeError: Error #1034: Type Coercion failed: cannot convert
    flash.display::AVM1Movie@3dcb7359 to flash.display.MovieClip.
    at page2sub1page1_fla::MainTimeline/finished_loading()
    here is my code:
    var external:MovieClip;
    //LOADER//
    var request:URLRequest = new URLRequest("slideshow.swf");
    var loader:Loader = new Loader();
    loader.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE,
    finished_loading);
    loader.load(request);
    function finished_loading(e:Event) {
    external = MovieClip(loader.content);
    LoadMov.addChild(external);
    external.my_ssp.xmlFilePath="images.xml";
    why do i get that error?

  • Control external swf file that is loaded into main movie

    I've loaded an external movie into Scene2 of the main movie,
    I want a button in the main movie, in scene two, which shows
    up right now under the external loaded movie, to be able to
    onRelease gotoAndStop at the first frame of the external movie
    which is loaded into that scene. Do I just write that as:
    AssociateSelected_btn.onRelease = function() {
    gotoAndStop("RGSassociate.swf","frame1")
    ? I thought I tried this, but since the ext.movie is loaded
    automatically on entering the scene it is not put into a level
    (which would be easier to navigate)....
    Any help/thoughts would be much appreciated, thanks!

    Just a thought- can i refer to the external movie through the
    loading component instance name?
    Still wondering if I can control the time line inside the
    external movie from the main movie...

  • Importing & controlling external .swf in Captivate 5

    Hi,
    I have a main file built in Captivate 5. This file  has static slides with text and graphics, in one slide, I have to insert a demo  which is smaller in dimension.
    So I have recorded this demo as a separate Captivate file  and published as .swf.
    I  have then imported this demo .swf in the main Captivate file as  Insert > Animation.
    But I am not able to control this demo(Play/Pause, Slider)  by the main Captivate control bar.
    Please help me regarding this.
    Regards,
    Sachin

    Hi,
    Please publish the demo as FLV/F4V instead of swf.
    Insert the FLV into the main Captivate movie as FLV object - Insert FLV or F4V file.
    In the Properties panel for the FLV, Select
    Skin - None
    Timing -> Rest of slide. Uncheck "Pause slide till end of video" option.
    Check "Synchronize with  Project option".
    Preview the movie.
    Now it is possible to control the Play/Pause of the embedded FLV from the main Captivate movie timeline.
    Do let me know if this helps.
    Thanks,
    Sushma

  • Controlling external .SWF...Possible??

    Hello,
    I have an .SWF file which I created using the Flash Slide
    Presentation document type. It consists of a number of screens. I
    need to load this .SWF file into another Flash movie and control it
    with actionscript, but I do not know the code. Could someone please
    give me a hint at the code needed for simply getting this movie to
    jump from one slide/screen to another? Or point me to a good
    tutorial?
    Thanks in advance.

    Yes, the loaded movie is accessible via the name of the
    movieclip it gets loaded into. E.g., if you have an MC called
    'ballMC', and load the second movie with
    ballMC.loadMovie("ball.swf");
    you can access it with
    ballMC.moveBall();
    But the movie has to be completely loaded, so you should make
    sure it finished loading before calling it's methods. Also, code in
    the frame of the loader movie will execute before the code in the
    loaded movie. E.g., if frame 1 of the ball movie says
    this.foo = "bar";
    the variable will only be set after all code in the frame of
    the loader movie is executed, so you can't use 'foo' in that frame.
    To make sure the movie is loaded, use preloading code or the
    MovieClipLoader class, which provides events that signal when the
    movie is loaded (onLoadInit).
    hth,
    blemmo

  • LOADING/CONTROLING external SWFs

    I'm sure this has been asked before but i cant find anything
    that works for me. i have one MovieClip (View14) and i need to load
    lots of different things into it. I know you're supposed to use
    something with variables and addChild but i cant get anything to
    work.
    How do you reference a file that's not on the internet? (in a
    flash document that's also not online)
    How do you load SWFs into a movieclip? (and unload/switch
    them)
    Thank you :]
    i'm sorry i couldnt find this anywhere else.
    I've looked at the flash docs for MovieClipLoader and
    Component and they arnt helping me.

    just using the Loader class does the trick
    var movie:MovieClip = new MovieClip();
    addChild(MovieClip);
    var loader:Loader = new Loader();
    loader.load(new URLRequest('path to the swf'));
    movie.addChild(loader);
    that will work. and you can do that as many times as you
    want

  • Controlling external SWF

    hello - i am running into a problem and was wondering if someone could point me in the right direction. I am using AS3 / CS3 - I have a FLEX component that is complied into a swf and i am loading it into my Flash file. This component has some properties that you can set, but I am not sure how to reference the newly loaded SWF file. I have my current code below - with one of the properties the FLEX programmer sent over:
    var request:URLRequest = new URLRequest("qagGauge.swf");
    var loader:Loader = new Loader();
    loader.load(request);
    addChild(loader);
    /* PROPERTIES
    [Bindable] public var fontColor:Number = 0xFFFFFF;
    Thanks in advance!

    solved:
    import flash.display.Loader;
    import flash.net.URLRequest;
    import flash.events.TimerEvent;
    import flash.display.MovieClip;
    var _swfTimer;
    var _loader:Loader = new Loader();
    _loader.load(new URLRequest("qagGauge.swf"));
    _loader.contentLoaderInfo.addEventListener(Event.COMPLETE,loadIt);
    addChild(_loader);
    function loadIt(e:Event):void
        _swfTimer = new Timer(10);
        _swfTimer.addEventListener(TimerEvent.TIMER,checkSwfLoader);
        _swfTimer.start();
    function checkSwfLoader(e:Event):void
        var myclip:MovieClip = _loader.content as MovieClip;
        if (myclip.application != null)
            _swfTimer.stop();
                                    myclip.application.maxVal = 1000;
                                    myclip.application.faceColor = 0x000000;

  • Controlling multiple external swfs from main timeline

    Hi, I've been trying to combine the features of two tutorials I found, one that deals with controlling external swf's from the main timeline and the other that explains how to load and unload multiple external swf's.  I'd like to be able to load and unload multiple external swf's, and control these swf's buttons from the main timeline. 
    I asked this same question on the forum of the site where I found these tutorials, and receive only one reply saying that "it should'nt be hard to do." but they did not elaborate any further.  This left me think that I was missing something very obvious and I've spent too much time now trying to work what it is now.  I understand pretty much how both pieces of code work, but just can't work out how to combine them.
    If someone could explain it to me, I'd much appreciate it.
    Tutorial One code - controlling an external swf from the main timeline.
    var ldr:Loader = new Loader();
    var urlReq:URLRequest = new URLRequest("swfs/balls.swf");
    ldr.load(urlReq);
    function loadHandler (event:Event) {
    var myClip:MovieClip = event.target.content;
    addChild(myClip);
    function myClipOver(event:MouseEvent):void {
    myClip.myBlueBalls.stop();
    function myClipOut(event:MouseEvent):void {
    myClip.myBlueBalls.play();
    // set listeners
    myClip.addEventListener(MouseEvent.ROLL_OVER, myClipOver);
    myClip.addEventListener(MouseEvent.ROLL_OUT, myClipOut);
    // listener
    ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, loadHandler);
    Tutorial Two code - loading and unloading multiple external swfs.
    var Xpos:Number = 110;
    var Ypos:Number = 180;
    var swf:MovieClip;
    var loader:Loader = new Loader();
    var defaultSWF:URLRequest = new URLRequest("swfs/eyesClosed.swf");
    loader.load(defaultSWF);
    loader.x = Xpos;
    loader.y = Ypos;
    addChild(loader);
    // Btns Universal function
    function btnClick(event:MouseEvent):void {
    removeChild(loader);
    var newSWFRequest:URLRequest = new URLRequest("swfs/" + event.target.name + ".swf");
    loader.load(newSWFRequest);
    loader.x = Xpos;
        loader.y = Ypos;
    addChild(loader);
    // Btn listeners
    eyesClosed.addEventListener(MouseEvent.CLICK, btnClick);
    stingray.addEventListener(MouseEvent.CLICK, btnClick);
    demon.addEventListener(MouseEvent.CLICK, btnClick);
    strongman.addEventListener(MouseEvent.CLICK, btnClick);

    I will not be able to help you with whatever relaxatraja provided though it is purported by relaxatraja to be clearly explaining what I was explaining (???).
    Your loadHandler function appears a bit confused.  For the code you show I don't see you assigning any event listeners for the events that will be dispatched in the loaded file.  As I showed earlier, your loadHandler function should be assigning a listener for the event that will be dispatched (modified slightly below). and if you have three different events being dispatched in the loaded file, then you'll do better to have three different listeners.  I show only one below for one of the events you dispatch...
    function loadHandler (event:Event) {
      // assign a listener for the loaded file's goExit function's event
       MovieClip(event.currentTarget.content).addEventListener("close", event1Handler);
    // I can't make sense of what you have here
        removeChild(myClip); // why ?? - it hasn't been added yet as far as I can see - error 2007?
        var newSWFRequest:URLRequest = new URLRequest("swfs/" + event.target.name + ".swf"); // the event.target is the Loader
        ldr.load(newSWFRequest); // this will load over the file you just finished loading??
        ldr.x = Xpos;
        ldr.y = Ypos;
        addChild(myClip);  // why?? it has nothing in it
    function event1Handler(e:Event):void {
        // do whatever is involved with what the "close" event is supposed to do
        trace("goExit function executed");
    As far as what you have in the loaded file, you appear to be trying to pass the files names as if they were parameters.  The file naming should be done at the receiving side for the event handler function for the event listener.  While you could create a custom event that include parameters that you can pass, that's another level of coding that is better left for a future experience.
    Study the following - understand it before you try to use it.
    Below is a link to some files I made for another posting that demonstrates what I have been explaining.  The neurope file is the main file.  Publish the netherlands file so that you have an swf to load for it, and then run the neurope file.  The file that gets loaded (netherlands) only has a button in it that when clicked dispatches an event for which the main file (neurope) has assigned a listener.  The main file displays a message when the button gets clicked in the loaded file.
    http://www.nedwebs.com/Flash/neurope.zip

  • How to control timeline sound of external SWF

    Hi All,
    Basic Intro:
    I am new in Action Script and trying to create a video tutorial framwork. In this I have lots of animated SWF files in all the files I have multiple scenes as those are 5min. to 10 min. each and all the files have the relevent background and nurration voice place directly on the TIMELINE frame by frame to match lip syncing animated chreactors.
    My file structure :
    Login.swf with login box is embedded into the Index.html
    After logged in it will load another SWF which is Control panel.swf
    3. Controlpanel.swf has the controls to control the loaded external swf files i.e.: Chapter menu, Play, pause, replay, volume-bar, next and previous buttons.
    By Default Controlpanel.swf will open chapter1.swf as soon as user logged in so no one need to open 1st file.
    Here user can navigate to other chapter swf file through Chapter menu or Next and Previous buttons.
    All files are loading and playing properly, here I am trying to control the animation and Sound both at a same time with Pause, Play and Replay through relevant buttons.
    Problem:
    By pressing “Pause button” animation stops but not the sound. Sound remains playing, and if I replay the swf by “Replay button” than animation restarts but sound also restarts that overlaps already playing audio.
    Question: So could anybody help me finding out how to:
    1. Pause the sound with animation by the same click of Pause button, and
    2. Stop the sound with animation by the same click of Stop button, and
    3. On replay it should stop playing the previously running audio and restart it with the animation like fresh loaded file, it should not sound overlapping.
    Constraints:
    Here I am using the sound file on the same time line of each individual swf file which I cannot add into any single movie clip because all the chapter swf file are having multiple scenes in it.
    For my problem I have already done a lot of browsing online in various forums and didn't find the solution. So here I am sharing the complete information regarding the project and wishing to get some good solution out here but if I missed any helpful information please ask me anytime and please help me to quickly find out the solution.
    Thanks a lot to all of you in advance to help me.

    create one global sound variable
    you can write when you are pressing pause button
    globalsoundvariable.setVolume(0)
    to play
    globalsoundvariable.setVolume(100)

  • AS3: How to access and control embedded sounds in an external swf?

    I rarely use sounds in AS3/Flash. I am using Flash Pro CS6, but I can't seem to figure out how to access, control (play, stop, etc) sounds embedded in an external SWF loaded into the main SWF.
    It's easy to control them when embedded on the main swf. However, on an externally loaded SWR, I get all kinds of errors. For this app, I really need to embed them in the external SWF.
    I read several solutions, but none seem to work.
    I embed the sound an mp3 file called soundSegment1.mp3 using Flash CS6 import tool and then open the actionscript properties panel on flash to select the class name: SoundSegment1. Then I edit the class code and create a file called SoundSegment1.as and it's saved right next to my document class main.as in the same directory. The code of the SoundSegment1 class looks like this:
    package  {
        import flash.media.*;
        public class SoundSegment1 extends Sound
            public function SoundSegment1 ()
                // no code in here
            public function playSound()
                var soundSegment1:Sound = new SoundSegment1();
                var channel:SoundChannel = soundSegment1.play();
    Then, in my main.as, I have done several attempts to play this sound such as:
    var fileLocation:URLRequest = new URLRequest(SWFToLoad); loader.load(fileLocation); loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressListener); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeListener); loader.contentLoaderInfo.addEventListener(Event.INIT, initListener); 
    function initListener(e:Event):void // I also placed this code on the completeListener and it didn't work {      loader.content.soundSegment1.playSound(); // doesn't work.  }
    I get:
    Line XXX 1061: Call to a possibly undefined method playSound through a reference with static type flash.display:DisplayObject.
    or, I also read that I should be able to do something like this anywhere in the Main.as file:
    var theClass:Class = Class(loader.content.getDefinitionByName("SoundSegment1")); var theSound:theClass = new theClass(); theSound.play()  //doesn't work either.
    I also tried on the completeListener:
    var TheClass:Class = e.target.applicationDomain.getDefinition("SoundSegment1") as Class; var theSound:TheClass = new TheClass();
    theSound.play()  //doesn't work either.
    I get:
    ReferenceError: Error #1065: Variable SoundSegment1 is not defined. at flash.system::ApplicationDomain/getDefinition()
    I am stuck and I really need to get this to work. I would be genuinely grateful for your help.
    Thank you in advance for any help provided. I really need to get it to work, because I can't simply embed them in the main SWF or load them individually externally one by one.
    Thanks again!

    THANK YOU!
    I think your code may be over my head though. I think you are using an anonymous function which is not something I am familiar with (but I want to learn about if it's useful).
    I also don't know where the classS came from. I see that it's a parameter sent along with the event, but I don't really see where that came from.
    Someone at: http://www.kirupa.com/forum/showthread.php?305098-Playing-a-embedded-sound-in-an-external- swf&p=2658098#post2658098
    Is showing what seems to be an easier solution, but my problem there is I can't access the source file of the "child" swf....  ayayay.....
    I am going to tinker with your solution and see if it gets me anywhere. Thanks so much for your help again.

  • Importing fl.controls causes external .swfs to crash

    Hello,
    I've discovered that if I use fl.controls.* classes in my AS3
    code, and then load an external .SWF that uses something like
    fl.controls.combobox, I will get a crash when clicking on the
    combobox.
    The crash is as follows:
    TypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    at fl.containers::BaseScrollPane/drawBackground()
    at fl.controls::List/draw()
    at
    fl.core::UIComponent/drawNow()[fl\core\UIComponent.as:1198]
    at fl.controls::List/scrollToIndex()
    at fl.controls::SelectableList/scrollToSelected()
    at fl.controls::ComboBox/open()
    at fl.controls::ComboBox/onToggleListVisibility()
    I am not creating new fl.controls.* objects in my AS3 code, I
    am merely trying to type them correctly so I can reference them in
    code. For example, with the following code, the app crashes:
    public function getButton(buttonNum:int):Button
    return mDialog["button" + buttonNum];
    If I change that code to return Object instead of Button, the
    code works fine.
    Any thoughts???

    thanks….maybe it isn't a actual kernel panic….I was not sure what to call it….the old kernel panic were in UNIX code…this is a SYSTEM NEEDS TO BE REBOOTED
    and it is only with LIGHTROOM
    no other app causes this.
    I can't find the copy paste of the actual SYSTEM REPORT
    I will try to repeat it…..and copy it for everyone to see today….
    thanks
    I greatly appreciate your help
    jsm

  • Control an external SWF

    Ok say I have a big comeplete Flash website.
    The website is composed of:
    -The main stage
    -Movie Clip that loads external swfs 1 (let's call this "A")
    -Movie Clip that loads external swfs 2 (let's call this "Z")
    So say A is a movie clip that loads a menu (external swf).
    Can I control Z (like changing frames and so on), by clicking
    buttons on A (since it's a menu)?
    I hope I was clear.
    So it is possible, how would the paths be written?

    button1.onRelease = function() {
    _root.Z.gotoAndStop ...
    heart ways wrote:
    > Ok say I have a big comeplete Flash website.
    >
    > The website is composed of:
    > -The main stage
    > -Movie Clip that loads external swfs 1 (let's call this
    "A")
    > -Movie Clip that loads external swfs 2 (let's call this
    "Z")
    >
    > So say A is a movie clip that loads a menu (external
    swf). Can I control Z
    > (like changing frames and so on), by clicking buttons on
    A (since it's a menu)?
    >
    > I hope I was clear.
    >
    > So it is possible, how would the paths be written?
    >

  • External SWF controlling main timeline

    Hi all --
    I have a main SWF file that I am loading a smaller, external
    SWF file into (with loadMovie, if you care to know). Within that
    smaller file, I have a button -- ideally, this button should
    trigger an action within the main SWF file.
    My problem is that I cannot get the external SWF file to
    control an action within the main SWF. I'm guessing there must be a
    way to do this, but I'm having some trouble here.
    Thanks in advance... please advise!

    Well.... there may be a reason if it is set up correctly and
    still doesn't work....
    Is this external SWF hosted on another server?
    If so, you might be running into crossdomain policy problems.
    I've had the issue that remotely-hosted SWFs will not OBEY commands
    from the root timeline while they are remote, but work just fine
    when they are copied onto the same server as the main SWF.
    Do a search on crossdomain policy XML in Flash help. It may
    help you get around this problem.

  • Control mc with external SWF?

    Hello everyone,
    Ok, lets say I have two SWF files.
    In “SWF 1,” I have a movie clip.
    The movie clip in “SWF 1” loads in an external “SWF 2” file.
    Is it possible for me to have something (like a button) inside the external “SWF 2” with the ability to control something (like a movie clip) in “SWF 1?”
    If so what would the path to that mc look like?
    Thanks

    if both are as2 swfs, then you can reference the load-target movieclip in swf1 (the loading swf) from the main timeline of swf2 (the loaded swf) by using:
    this.
    so, if that load-target is on swf1's main timeline, you can reference swf1's main timeline by using:
    this._parent.
    and if there's a movieclip mc on swf1's main timeline, you can reference it by using:
    this._parent.mc1.
    etc.

  • Loading external swfs and controlling their actionscript

    I'm in need of some tutorials/examples for loading external
    swfs placed in empty movie clips using loadmovie into the main
    movie.
    I have actionscript and alot of interactive features within
    these loaded swf files and I'm having a heck of a time figuring out
    how to code and path the AS from them to work in the main timeline.
    I'm also open to using loadMovieNum and working with levels
    if it might be easier, however I'd like to keep this as simple as
    possible.
    PLEASE ANY HELP!!!????

    I am by no means an expert however it is my understanding
    that if you have a loaded swf within your main application and you
    wish to control features on the main timeline you need to use the
    _root function.
    Without knowing exactly what type of controlling you need
    it's hard to explain in great detail.

Maybe you are looking for

  • OnClick JavaScript error

    I have made several changes to my nav bar through Fireworks and exported, which I have done a million times, but this time when I inser Fireworkd HTML image it gives me the following message: While executing onClick in Fireworks HTML.htm, the followi

  • HP 2000-2d19WM Notebook Windows 7 64-bit Drivers

    My friend recently gave me her laptop and told me it was very slow and was having several problems. I took a look at it and it's riddled with malware and adware. After discussing it with her, she said she'd like if I could install Windows 7 on it for

  • Premiere Pro CS6 - A low level exception has occurred in ImporterMPEG

    Hi Adobe Community, I'm having a bit of an issue with the ImporterMPEG.prm plugin for Premiere Pro CS6 that's causing playback and exporting issues. Computer Specs: Win7 PC, NVIDIA GeForce 6150SE nForce 430 graphics card Description: After playing ba

  • Nokia 3600 Screen went Black...!!! Please help...

    My Nokia 3600 Slide phone suddenly has a black, glowing screen. Whenever I switch it on, I hear all the sounds and the phone is also working fine with PC suite and OVI suite, but the display has turned Black...!!! Any ideas or Solutions???

  • Mac Mini constantly freezes, Wont boot from install disc.

    About 6 months ago my mac mini started freezing (getting that grey screen prompting you to hold the power button until it turns off) it did this every few hours or so. Eventually i got tired of this and have tried multiple times to wipe the HDD and r