load swf AS2 AS3 swf problem

I have a flash with AS3 and inside the swf I load in an AS2 swf file.

to load a swf works fine, but the problem is when I load it in that I want to go

a specific part of it, for example, I want to go to frame 3 in the loaded swf file.

I need to check this in the AS3 swf, does anyone know if this is possible?

Thanks in advance

Yes, it is possible.  Use the localconnection class to communicate between the two rulers.

Tags: Adobe Animate

Similar Questions

  • External loading swf problem

    Hello

    I think it's my last stop to find the answer to my problem

    I made a simple project with flash CS5 that contain

    main SWF that load an external swf into movie empty

    I was able to load external swf everything smoothly but

    Problem

    the external swf file has drag-and - déposer only work perfect, but when it is called stops working

    external text in swf input do not work as when he called

    I scoured the net for a week and that you can't find the answer

    Pllllllllllllllllllllllease help

    Thanks in advance

    The loaded file using _root references?  If so, you must set the _lockroot true inside this file property so that it does not seek beyond itself to the _root of the file that it loads.  If you are not familiar with it, it is documented in the help files for Flash with examples.

  • Loading an AS2 Swf in AS3 project

    So, I have a need to load some AS2 SWF inherited in my new AS3 interface. To avoid communication problems, I created a proxy AS2 SWF that loads the existing sovereign funds and takes their calls of communication to convey to the interface via the class LocalConnection - the only method (as I understand it) that you can use to communicate between AS2 and AS3.

    I detected AS version when loading a SWF file in the interface and pass the load to the proxy if the version is not 3. The proxy load properly, but I start getting errors immediately. Let me paste code to show the following steps:

    First of all. Immediately, I get a StatusEvent error, even if the path is sent to the proxy and load properly.

    Then, when the complete event is triggered in the AS2 SWF - it sends a completion back to let the AS3 SWF know that she finished (and any manipulation to get at that time.) I have the following error:
    Error #2044: Unmanaged by the AsyncErrorEvent:. Text = Error #2095: flash.net.LocalConnection could not invoke the callback loadSwf. error = ReferenceError: Error #1069: loadSwf property not found on com.applied.flash.events.AS2Connect and there is no default value.

    Join the Code

    This is the code of AS2Proxy.swf.

    connection: LocalConnection var = new LocalConnection();

    Connection.Connect ("AS3Connect");

    {if (Path)}
    proxyLoader.contentPath = path;
    }

    connection.loadSwf = function (path: String) {}
    proxyLoader.contentPath = path;
    }

    proxyLoader.complete = function() {}
    Connection.Send ("AS3Connect", "swfLoaded", true);
    }

    function completion (): Void {}
    Connection.Send ("AS3Connect", "swfLoaded", true);
    }


    It's the AS2Connect class for the hearing which is sent by the AS2 SWF

    package com.applied.flash.events {}

    SerializableAttribute public class AS2Connect extends Object {}

    public function swfLoaded (value: Boolean): void {}
    trace (value);
    }
    }
    }

    Finally, it's all the code in the AS3 swf file

    connection: LocalConnection var = new LocalConnection();
    var myIP:String = connection.domain;
    Connection.client = new AS2Connect();
    try {}
    Connection.Connect ("AS3Connect");
    } catch (e) {}

    simulation.source = ModulePath + curPageXML.attribute ("Path") m:System.NET.SocketAddress.ToString ();
    contentPlayers.addChild (simulation);
    simulation.addEventListener (Event.INIT, doInitSim);

    function doInitSim(evt:Event):void {}
    If {(simulation.content.loaderInfo.actionScriptVersion > 2)
    simulation.addEventListener (Event.COMPLETE, doVideoReady);
    } else if (simulation.source! = InterfacePath + "AS2Proxy.swf") {}
    simulation.source = InterfacePath + "AS2Proxy.swf";
    simulation.addEventListener (Event.COMPLETE, doProxyReady);
    }
    }

    function doProxyReady(evt:Event):void {}
    Connection.Send ("AS3Connect", "loadSwf", ModulePath + loadedXML.Pages.Page [tree.selectedIndex].attribute("Path").toString ());
    connection.addEventListener (StatusEvent.STATUS, doStatus);
    }

    function doStatus (evt :*){
    trace (e);
    }

    Well, the component has worked well for me.

    Here's how I bypassed not being not able to change the former rulers.

    I created a new AS2 project that consists of a loading component and ASBTerminal component.

    I then added the code to operate the ASBTerminal. Knowing all the function calls _root or _level0 coming out the loaded SWF, I created a function for each and said the SBA to perform a function in the new interface, passing along and reformatting of arguments as needed.

    Then, I created for the interface AS3 call functions.

    loadSwf()
    sendStop()
    sendPlay()
    sendGotoAndStop()
    sendGotoAndPlay()

    Each of these passes call a function in the loading component. loadSwf sets the contentPath. sendStop... sends the appropriate call (play(), stop(), gotoAndPlay()), gotoAndStop().

    Then I add my custom, things functions that I could appeal to some of the former sovereign wealth funds, and whatever.

    So, there are 3 files of the chain when I load a legacy SWF file.

    1. the main interface of AS3
    2. the "proxy" AS2 swf loaded into the interface.
    3. the legacy AS2 swf that loads the proxy.

    The proxy acting as an intermediary between existing content and new content.

  • AS2 loading swf that loads additional s AS2 swf into Flex

    My loaded AS2 swf can not seem to load the AS2 swf using loadMovie() and loadMovieNum().

    I have a file .mxml with a tag with an attribute of the source of mx:Image bound to a string variable. I can set this variable to a valid way to AS2 swf and swf file load as expected.

    However, the AS2 swf contains one or more statements loadMovie() to load additional SWFs 'child' in empty movieClips that fails silently.

    (I have to load several legacy/AS2 projects, I try to avoid the migration of these projects to AS3, also try to avoid incrustation of the SWF to the 'child' in a single AS2 swf).

    I tried both loadMovie and loadMovieNum, I change the publication for local file access and network access settings, I tried to replace the mx:Image bound by a mx:SWFLoader tag, tag none of these work. I even tried to switch the compiler Flex setting - use network.

    All the other features seem to work in the loaded AS2 swf.

    I found many posts/articles as intercommunication between an AS3 Flex swf and loading AS2 swf, but it's not my problem. I need not communication, a few features.

    Thanks in advance for any idea!

    OK, once more, during 5 minutes walk away a problem proved to be invaluable. I started to think that maybe there is a known issue with loadMovie(). Even if I was trying to avoid to touch the source code of these sovereign wealth funds AS2, I decided that it would be useful to test replacing loadMovie() by MovieClipLoader.loadClip () statements.

    It works! Even if it means that all the old AS2 files that I need to load will have to be revised, it is much less of a task of migrating to AS3 or incorporation of the swf file of the child in the movie alone. I hope at least that this will save someone else the frustration of trying to do the same thing.

  • problems loading swf to a remote server

    Hi all

    I have problems loading SWF to my remote server of Mr. There is no problem loading all my other SWF files just straight up. I get a message telling me that Dreamweaver is having a problem connecting to the remote server and it times out. I can load up the swf using cpanel. Does anyone have advice helping, what happens if something can be done to address the problem

    Concerning

    Paul

    Hi Paul,.

    Use to troubleshoot Adobe: http://helpx.adobe.com/dreamweaver/kb/troubleshoot-ftp-issues-dreamweaver-cs5.html. (cs5 is similar I think).

    BUT in any case I'm not a friend of a detailed diagnosis. This is one of the reasons why I prefer an external FTP program. The difficulties with which we must fight encourage me in this opinion, especially because we are always looking for experts, we charge a 'jack of all trades '.

    For this reason, for example, manage multiple Web sites or download my files and sometimes the reverse, for a necessary download from my server or use a "sync a whole site", I use FileZilla (cpanel I don't even know). It just seems easy for me to keep track of all transactions accurately and generate or easily reflect the desired tree structure.
    First and foremost, FileZilla has a function (translation of my German FileZilla), called 'compare the list of files. Here it is possible to use the time of size or change file as a criterion. There is also the possibility of 'hide identical files', while only those files that you want to redact remain visible.

    And even if it means that you need to install a new program, I am convinced that there is an advantage. Here is the link to get it and where you can read information on how it works:

    http://FileZilla-project.org/ and http://wiki.filezilla-project.org/Tutorial#Using_the_site_manager

    Mac: Mac OS X
    http://FileZilla-project.org/download.php

    Of course, you should also access data to reach your server.

    Good luck
    Hans-Günter

  • Problem external loading SWF in Flash Movie

    I am trying to load an external swf (which is a slide show) in a flash animation. The swf file in the film show and apparently plays ok but there is something wrong. On the last image(3rd) in the slide show keys stop responding and when I click on the "back" button on the second slide is going to the third slide, and not the first. When I check the SWF itself it works fine, it is only in the flash movie, where everything is blurred.

    Link to the Flash animation:

    http://www.dagif.com/habanaHarlem.swf

    This is the code that I put in the flash animation:

    holder_mc.loadMovie ("http://www.dagif.com/slideplayerHabana.swf" "");

    Link to external swf: http://www.dagif.com/slideplayerHabana.swf

    This is the code for the external swf file:

    Stop();
    next_btn.onRelease = function() {}
    If (_root._currentframe == 3) {}
    gotoAndStop (1);
    }
    else {}
    nextFrame();
    }
    }
    Stop();

    previous_btn.onRelease = function() {}
    If (_root._currentframe == 1) {}
    gotoAndStop (3);
    }
    else {}
    prevFrame();
    }

    }


    num1_btn.onRelease = function() {}
    gotoAndPlay (1);
    Stop();

    }
    num2_btn.onRelease = function() {}
    gotoAndPlay (2);
    Stop();

    }
    num3_btn.onRelease = function() {}
    gotoAndPlay (3);
    Stop();

    }

    The problem is most likely the use of _root in code that show you.  Like any swf, the _root will demonstrate to the _root of the main sequence and not the loaded swf file.  Try to use this ._lockroot = true; at the beginning of the code of the imported file, replace GOLD is _root references with _parent references.

  • Problem loading SWF in MSIE

    I am an experienced Flash developer, but I have never seen it before.

    Here's what happens:
    My page calls a JavaScript (from an included JS) function will Flash version detection, and then writes the < object > in the page if the major version is 7 or newer. It seems to work very well in all the browsers that I have tried, but I just encountered a very strange problem with it in Internet EXPLORER 6 on Windows XP...

    The SWF file loads and displays correctly posted at this URL: www.silverdock.com

    The SWF file does not load, but IE renders a box with a scroll bar in its place at this address: www.silverdock.com/index.html

    These two URLS are the same exact HTML file (I double and triple checked this).

    Content of the < object > tag looks like this:

    < object width = "400" height = "300" >
    "" < param name = "movie" value = " http://v2.silverdock.com/fl/sdp_v2.1.11.swf?c=101 & v = 1 ' / >
    < param name = "quality" value = "high" / >
    < param name = 'wmode' value = 'transparent' / >
    "" < embed src = " http://v2.silverdock.com/fl/sdp_v2.1.11.swf?c=101 & f = & v = 1" quality = "high" wmode = "transparent" type = "application/x-shockwave-flash" width = "400" height = "300" > < / embed >
    < / object >

    Does anyone know what is the problem?

    Any suggestions would be greatly appreciated.

    A big thanks to TimSymons for providing insight that helped solve this.

    It turns out that the problem was caused by the variables of execution being passed to the SWF as arguments GET. The line of code in the embed which caused the failure of the loading SWF file was this:

    http://v2.silverdock.com/FL/sdp_v2.1.11.swf?c=101&f=&v=1&i=http%3A%2f%2Fwww.silverdock.com % 2Findex.html"/ >

    Reorganization just the runtime in the embed variables solved the problem:

    http://v2.silverdock.com/FL/sdp_v2.1.11.swf?c=101&v=1&i=http%3A%2f%2Fwww.silverdock.com%2f index.html & f ="/ >

    As I said, I don't really know WHY it worked, but it worked, so for now, the problem is solved and I can try to isolate the behavior more at my ease.

  • FLASH AS2 main swf loaded swf playback controls

    Hello

    I have two swf files. The main (main.swf) swf that loads another swf (external.swf).

    The current code in my main swf that loads external swf file is:

    Stop();

    this.createEmptyMovieClip ("holder", 1);

    holder.loadMovie ("content/swf/M01/disclaimer.swf");

    The loaded swf file must unload on a click event, then the main swf movie should resume playing.

    The code in the swf file is:

    on (release) {}

    _level0.gotoAndPlay ("hideMSG");

    _parent.unloadMovie("content/SWF/M01/disclaimer.swf",1);

    }

    The external swf file loads and unloads perfectly, but the film does not seem to take over.

    When I try to use _level0.play, it seems to reload and restart the file main.swf.

    Any help would be greatly appreciated.

    Laura

    No, there is no downtime in this context, there is indeed a play(); which is exactly what I want.

    I managed to get it using variables instead of work.

    Thank you

    Laura

  • access loading swf movieclip classiquee on as3

    Hi, I use external swf files add skins to an application. Currenlty, I'm loading elements isolated successfully by using the Loader class. However, now I want to load a more complex structure of skin that will have some movieclips already placed on the stage of the loaded swf. The question is: when I insert a swf athe edit that day, I placed a few elements on stage and that he gave them instance names, how can I access this external swf movieclip structure? It is something like this:

    1. first of all, I create the external file by placing some items on its stage, naming instances of these elements, such as 'console_bar' and 'console_button '.
    2. then I load this swf using the Loader class (in a magazine called "playerConsole", for example) and, when he finished loading I try to access the items placed on stage:

    this.addChild (playerConsole);
    playerConsole.console_bar.x = 0; won't work no-how can I access this instance?

    mount the content as a movieclip.

  • Problem with playing a loaded "SWF" file in the chronology of the pain

    Hey there. I created a presentation that loads the SWF interactive movies in a clip of 'target' on the main timeline.
    As you progress through the different presentation SWF movies are loaded into the presentation. And this in turn allows me to change the content of the presentations quickly and easily for different customers.
    These sovereign funds use part of the preloaded flash content like the other and drop-down list box objects.
    However, when these sovereign funds are called in the main charge they stop working properly.
    They work fine when tested independently of the main charge.

    Does anyone know how I can be able to get these sovereign funds work properly?

    At soon fofana

    The first thing to do is to check the range of your loaded SWF file. All references to _root, for example, means something different when the SWF is loaded in your film of wrapper.

    In addition, some of the V2 components do not work correctly when the SWF is loaded into another SWF. There is a technical Note and simple workaround here:

    http://www.Adobe.com/go/tn_19278

    Good luck!

  • . Loaded SWF comunication with charger .swf

    Hello world!
    I have a big problem...
    I loaded a .swf file using a "flash.display.Loader. The .swf contains a button. When the user clicks the button, I want the .swf loader to execute a certain function I defined.
    In AS2, I would have accomplished this through "_level0.functionName ();". In AS3, however, I can't fiind a way to communicate with the parent .swf...
    Please help me!
    Thank you!

    You are welcome.

    your code in the external swf file must be on the chronology of some movieclip. and this movieclip must be in the display list (IE, on stage) for the code to run.

    so, all your external swf timeline, you can use this.root to get to the main timeline of the external swf file. the parent of this scenario main external swf will be your charger (in the loading swf file). and the property of the root of this charger will be the main timeline of the swf file loading. so, you can always use:

  • Unable to access MovieClips and functions in a loaded SWF

    Hello world

    I'm just trying access anything whatsoever within the loaded SWF and all I get is 'null '.

    I have the code in the SWF parent who must tell the SWF movieclip child what to do, but nothing works. It's a piee of cake into AS2, and I can't seem to get anything of crossover in AS3.

    Here is my code:

    import com.greensock.TweenMax;
    import flash.display.MovieClip;
    
    var myLoader:Loader = new Loader();
    var url:URLRequest = new URLRequest("SWCS_S3_500x250_exp_panel_2.swf"); // in this case both SWFs are in the same folder 
    myLoader.load(url);  // load the SWF file
    panel2.addChild(myLoader);   // add that instance to the display list, adding it to the Stage at 0,0
      
    panel2 = myLoader.content as MovieClip;
    
    photo_about.alpha = 0;
    photo_downloads.alpha = 0;
    
    //panel2.content_about.alpha = 0;
    //panel2.content_downloads.alpha = 0;
    
    function closeSection():void
    {
              panel2.controlsMC.forcePause();
    
              TweenMax.to(photo_about, .5, {alpha:0});
              TweenMax.to(photo_downloads, .5, {alpha:0});
              TweenMax.to(photo_home, .5, {alpha:0});
      
              TweenMax.to(panel2.content_about, .5, {alpha:0});
              TweenMax.to(panel2.content_downloads, .5, {alpha:0});
      
              TweenMax.to(panel2.controlsMC, .5, {autoAlpha:0});
              TweenMax.to(panel2.content_home, .5, {alpha:0});
    }
    
    

    Panel2 traces null and all clips loaded in draw property undefined errors.

    Can someone please tell me what I'm doing wrong? I would be happy to see what Miss me and feel like this should be a piece of cake.

    Thanks for any help!

    You do not add the content of the scene to 0.0, you add it to panel2 to 0,0.  Then you take panel2 and assign to something that probably does not exist at the time wherever you set it.  You must wait until the loader load before trying to do something with its content, otherwise it has no content (null).  Similarly, you can not control anything in the loaded swf file, until it is fully charged.  So to assign an event listener for the property contentLoaderInfo the loader to determine when loading is complete, and have the event handler works deal from interacting with it.

    var myLoader:Loader = new Loader();

    var url: URLRequest = new URLRequest ("SWCS_S3_500x250_exp_panel_2.swf");

    myLoader.contentLoaderInfo.addEventListener (Event.COMPLETE, processLoadedSWF);

    myLoader.load (url);

    function processLoadedSWF(evt:Event):void {}

    deal with the swf loaded here

    but you do not want to be assigned to the panel2 object that contains the charger

    }

    With regard to the control of anything anyone inside of the swf you are loading, is an AS1/2 or an AS3 swf?

  • How to call the function lavel root &amp; variable external loaded swf file

    I have little problem in as3.  I load 'mainmenu.swf' file "main.swf". through class loader. so now "main.swf" is children of parents 'mainmenu.swf' file how can call "main.swf" variable and function of "mainmenu.swf".

    The parent of the loaded swf file is the charger.  The main SWF is the parent of the charger.  Then to communicate with the main storyline of the loaded file can use:

    MovieClip (parent.parent) .someFunction ();

  • Management of the custom event sent by loading SWF fails

    I loaded and SWF using SWFLoader. Not a component, but just a regular Flash AS3 SWF. I can access its properties and functions but when I listen to a custom, event distributes, I get the error:

    Error #1034: Type coercion failed: cannot convert com.subhumanmedia.classes::SoundCueEvent@911ad61 to com.subhumanmedia.classes.SoundCueEvent.

    Here's the event:
    package com.subhumanmedia.classes
    {
    import flash.events.Event;
    SerializableAttribute public class SoundCueEvent extends Event
    {
    public static const = "cueSound" CUE_SOUND:String

    private var soundCueObjectInstance:Object;

    public void SoundCueEvent (type: String, bubbles: Boolean, cancelable: Boolean, soundCueObject:Object)
    {
    parameter soundCueObject:
    soundCueObject.cueSoundURL is the string with the name of file to play
    soundCueObject.cueSoundStartTime is the number giving the millisecond offset to read from
    //
    Super (type, bubbles, cancelable);
    soundCueObjectInstance = soundCueObject;
    }
    public function get soundCueObject (): Object
    {
    Return soundCueObjectInstance;
    }
    override public function clone (): event
    {
    return new SoundCueEvent (type, bubbles, cancelable, soundCueObjectInstance);
    }
    }
    }

    Here is the statement in the loaded SWF, the event:
    dispatchEvent (new SoundCueEvent (SoundCueEvent.CUE_SOUND, true, false, soundCues [cueCounter]));


    soundCues is an attay soundCueObjects.

    Here is the definition of the listener in my main class:
    slide.slideGraphic.swfObject.content.addEventListener (SoundCueEvent.CUE_SOUND, cueSoundHandler);

    And here's the Manager:
    private void cueSoundHandler(e:SoundCueEvent):void
    {
    trace (e);
    }

    If I change the type of parameter of the event Manager, it does not take a mistake, but I can't yet ride a SoundCueEvent event in order to obtain tracking information.

    Now both the right loaded SWF and main class get the definition of the event from a compiled SWC, but I tried several other ways to do it without any better result.

    I don't know even what causes the error and am totally baffled by how to solve it. Can anyone help?

    It is equivalent to the problem of shared code described in the presentation of the modules on my blog.

    Alex Harui

    Flex SDK Developer

    Adobe Systems Inc..

    Blog: http://blogs.adobe.com/aharui

  • To access the MovieClip instances in a loaded SWF file

    The situation as follows:

    loadedSWF.swf (published with Flash Player 8 AS2 or AS3 of Alpha Flash Player 9), contains on the symbols of the stage with the instance names: clipA, clipB, clipC, etc... No ActionScript is included in the file.

    In a Flex Builder 2.0 project, a component that extends mx.core.UIComponent load loadedSWF.swf:

    script
    var request: URLRequest = new URLRequest ("loadedSWF.swf");
    loaded var: Loader = new Loader();
    Loaded.Load (request);
    addChildAt(loaded,0);


    loadedSWF.swf successfully is displayed in the component's display list, but MovieClip instances that it contains are inaccessible.

    Its existence is verified:

    script
    trace (getChildAt (0)) / / result: [object Loader]
    trace (getChildAt (0) .root) / / result: [object _system_mx_managers_SystemManager]

    However, even if .root getChildAt (0) returns a mx.managers.SystemManager and mx.managers.SystemManager supports the numChildren property, trace (getChildAt (0).root.numChildren) survey error: 1119: access of the numChildren property possibly not defined through a reference with static type flash.display:DisplayObject.. Other methods like getChildAt(), etc. are also impossible to call. Direct access with getChildAt (0).root.clipA also throws an error, etc...

    Is it possible to access instances of the MovieClip on the stage of the loaded SWF file of a component that loads? I would appreciate any advice on this issue.

    a.Neko


    Note:
    The goal is to be able to load multiple clips into a component in a single loading of SWF file, then to instantiate the separately if necessary with addChild() and addChildAt() methods.

    Solution found:

    (Checked for loadedSWF.swf published with Adobe Flash Professional 9 Alpha Public)

    script (excerpt from Flex 2.0 AS3 component class)

    protected var clip: MovieClip = new MovieClip();

    protected final void requestSWF(value:String):void {}
    var request: URLRequest = new URLRequest (value);
    var asked: Loader = new Loader();
    requested.contentLoaderInfo.addEventListener (Event.COMPLETE, this.onRequestSWFComplete);
    requested. Load (request);
    return;
    };

    protected final void onRequestSWFComplete(event:Event):void {}
    event.stopPropagation ();
    This.clip = event.target.content.clipA; conversion of a local variable.
    this.addChild (this.clip);
    return;
    };

    this.requestSWF ("loadedSWF.swf");

    Result: clipA is added separately to the display of the component list.

    a.Neko

Maybe you are looking for