Loading a remote SWF via SWFLoader Issue

I have a simple flex app which loads an external XML into an
arrayCollection using HTTPService send method. This works fine as
both a stand-alone, or when loaded into it's parent as a LOCAL file
via the SWFLoader tag. However, when I place this child file onto a
remote server and try to load it into the parent which resides on
my desktop, the ArrayCollection default resultFormat of the send
method triggers the following runtime error (listed below). I don't
think it's a sandbox issue because when I change result format to
e4x, it works fine remotely. I've been hitting a wall on this for
days now... Any insight would be greatly appreciated and thanks to
all in advance!!!
PARENT SWF (resides on local desktop)
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="vertical" initialize="initData()">
<mx:Script>
<![CDATA[
public var baseURL:String;
public function initSWF(swfURL:String):void {
remote_swf.load(swfURL);
public function initData():void
baseURL = "
http://blahblahblah";
Security.allowDomain(baseURL);
]]>
</mx:Script>
<!-- WORKS when loading child swf LOCALLY -->
<mx:Button label="Load LOCAL SWF APP"
click="initSWF('remoteSWF.swf')"/>
<!-- DOES NOT WORK when loading child swf REMOTELY -->
<mx:Button label="Load REMOTE SWF APP" click="initSWF('
http://blahblahblah/remoteSWF.swf')"/>
<!-- LOADER -->
<mx:SWFLoader height="100%" width="100%" id="remote_swf"
autoLoad="false" visible="true" scaleContent="false"/>
</mx:Application>
CHILD SWF (resides on remote server)
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute" creationComplete="getXMLData()">
<mx:HTTPService id="myTeams" url="
http://blahblahblah/xml/myXML.xml"/>
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.rpc.events.ResultEvent;
import mx.collections.ArrayCollection;
public function getXMLData():void
Alert.show(Security.sandboxType);
myTeams.send();
]]>
</mx:Script>
<mx:Label text="THIS IS THE LOADED SWF WHICH HAS JUST
PERFORMED A SEND ON HTTP SERVICE TO CREATE ARRAY
COLLECTION"></mx:Label>
</mx:Application>
------------ RUNTIME ERROR ---------------------------------
ArgumentError: Error #1063: Argument count mismatch on
Object/
http://adobe.com/AS3/2006/builtin::hasOwnProperty().
Expected 0, got 2.
at mx.rpc.xml::SimpleXMLDecoder/decodeXML()
at mx.rpc.xml::SimpleXMLDecoder/decodeXML()
at mx.rpc.xml::SimpleXMLDecoder/decodeXML()
at mx.rpc.http::HTTPService/
http://www.adobe.com/2006/flex/mx/internal:rocessResult()
at mx.rpc::AbstractInvoker/
http://www.adobe.com/2006/flex/mx/internal::resultHandler()
at mx.rpc::Responder/result()
at mx.rpc::AsyncRequest/acknowledge()
at :irectHTTPMessageResponder/completeHandler()
at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunctio
n()
at flash.events::EventDispatcher/dispatchEvent()
at
flash.net::URLLoader/flash.net:URLLoader:nComplete()

After further investigations, it appears that the problem might be, due the fact that in the remote (loaded) swf, the following is null:
var sm:ISystemManager = ISystemManager(SystemManagerGlobals.topLevelSystemManagers[0]);
sm.swfBridgeGroup <----- equals null
I tried creating the swfBridgeGroup in the local (loading) swf, but the loaded one still thinks it is null.
Any ideas?

Similar Messages

  • "Detecting" a variable from an externally-loaded SWF via SWFLoader

    I load an external SWF file from a click event.  Then, when the interactions has reached the end of the presentation, we'd like it to unload itself, and go into another state.
    Is that possible?  ( actually transformed the SWF into a component using Flash Builder 4 hoping that would be easier to detect variables and events)
    Thanks,
    Doug

    It is possible, but you'll have to wire up the communications between the
    SWFs

  • Load a Flex2 SWF using SWFLoader: #1009 null error

    public function set visualization(vizSWF:String):void
    loader = new SWFLoader();
    try{
    loader.addEventListener(FlexEvent.CREATION_COMPLETE,
    setVizHandler);
    loader.addEventListener(ProgressEvent.PROGRESS,
    progressHandler);
    loader.load( vizSWF );
    }catch(error:Error){
    trace("Could not load visualization "+error);
    My progress action fires a bunch, tells me it's loading in.
    Once it's loaded in I get the error, it never fires on
    creationComplete
    131072 of 140574
    131072 of 140574
    140574 of 140574
    [SWF] C:\Documents and
    Settings\lbyron\Desktop\Workspace\Project\bin\Visualization.swf -
    283,275 bytes after decompression
    TypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    at mx.core::UIComponent/
    http://www.adobe.com/2006/flex/mx/internal::updateCallbacks()[C:\dev\flex_201_gmc\sdk\fram eworks\mx\core\UIComponent.as:4737
    at mx.core::UIComponent/set
    nestLevel()[C:\dev\flex_201_gmc\sdk\frameworks\mx\core\UIComponent.as:2357]
    at mx.managers::SystemManager/
    http://www.adobe.com/2006/flex/mx/internal::addingChild()[C:\dev\flex_201_gmc\sdk\framewor ks\mx\managers\SystemManager.as:1511
    at
    mx.managers::SystemManager/mx.managers:SystemManager::initializeTopLevelWindow()[C:\dev\f lex_201_gmc\sdk\frameworks\mx\managers\SystemManager.as:2329]
    at
    mx.managers::SystemManager/mx.managers:SystemManager::docFrameHandler()[C:\dev\flex_201_g mc\sdk\frameworks\mx\managers\SystemManager.as:2214]
    Any clue? The SWF it is loading is a basic Flex app, and runs
    perfectly fine on its own.
    THANKS!!

    Megamu, I'm getting this error as well, did you ever solve
    the issue?
    Thanks in advance

  • AIR 3.6 & 3.7 Loading Remote SWF Crashes iOS on Property Read

    I have been trying out the feature in AIR SDK 3.6 that allows you to load local swf files with ABC.  This is working fine.  However, I am getting a crash on an iOS AOT build when I load a remote swf that does NOT have ABC and I try to read any property on that remote asset.  I have never had this problem with AIR 3.4.  The problem persists on AIR 3.7
    Below is a simple example to reproduce the problem.  The crash will occur immediately when it attempts to trace the "currentLabels" property of the loaded content.  I believe the property itself to be arbitrary --- the same crash will occur when reading any property.  In fact, you can even set a breakpoint before that line and in the Flash Builder debugger, if you try to expand the content's properties the app will crash.
    package
              import flash.display.Loader;
              import flash.display.MovieClip;
              import flash.display.Sprite;
              import flash.display.StageAlign;
              import flash.display.StageScaleMode;
              import flash.events.Event;
              import flash.events.ProgressEvent;
              import flash.net.URLRequest;
              import flash.system.ApplicationDomain;
              import flash.system.LoaderContext;
              public class MobileAppTest extends Sprite
      private const path:String = "https://s3.amazonaws.com/wowzers-dev/mobile/client/";
                        private var files:Array = ["art/common/LoadingScreen.swf"];
                        public function MobileAppTest()
                                  super();
                                  stage.align = StageAlign.TOP_LEFT;
                                  stage.scaleMode = StageScaleMode.NO_SCALE;
                                  loadNext();
                        private function loadNext():void {
                                  var loader:Loader = new Loader();
                                  var req:URLRequest = new URLRequest(path + files[0]);
      trace("\n>>> loading: " + req.url);
                                  loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onLoadProgress);
                                  loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
                                  var context:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
                                  loader.load(req, context);
                        private function onLoadProgress(evt:ProgressEvent):void {
                                  trace(evt.bytesLoaded + " out of " + evt.bytesTotal);
                        private function onLoadComplete(evt:Event):void {
                                  trace("<<< onLoadComplete " + evt.currentTarget.contentType);
                                  trace("=== currentLabels: " + evt.currentTarget.content.currentLabels);
    Am I doing something wrong?  Is this a known issue that will be fixed?
    So far I have tested this on an iPad 3 with iOS 6.1.3.
    Thank you.

    I was having the same problem using CS5.5 and AIR 3.7.  For me, the solution was to put a label in my main timeline and then call this.currentLabels in the main .as class.
    My app was crashing every time I called the "currentLabels" property from a custom class controlling a remote SWF.  I thought that it might have been a problem with the FrameLabel class not being imported at compile-time, so I tried placing a flash.display.FrameLabel reference in the main class.  This did not fix the problem.  Then I tried making an arbitrary call to the currentLabels property of my main timeline (all you need to do is reference it) and everything else worked fine.
    *edit*
    After a little further testing, it seems that you can place the reference anywhere (I put it in my custom class by calling theRemoteSWF.parent.currentLabels), but that you must have a label somewhere in the main timeline and call the "currentLabels" property of your main SWF before referencing the currentLabels of a child SWF

  • SWF Loader scaling my SWFs

    Hello all,
    I have a Flex app that loads in a swf using 'SWFLoader' tag.
    the SWFloader and the swf being loaded in are the same height and
    width (see attached code) Now, the SWF getting loaded in is also
    468 X 351 however the designers that made it have crazy amount of
    random Movie Clips EVERYWHERE that isn't on the stage. My guess is
    that the actual height and width of the SWF is close to 1000 X
    1000. When I load this SWF in to my SWFLoader it scales everything
    down so all of the MovieClips are inside of this SWFLoader rather
    than just the SWF's Stage. Any Suggestions?

    "whomba" <[email protected]> wrote in
    message
    news:glq6j0$b20$[email protected]..
    > Hello all,
    > I have a Flex app that loads in a swf using 'SWFLoader'
    tag. the SWFloader
    > and
    > the swf being loaded in are the same height and width
    (see attached code)
    > Now,
    > the SWF getting loaded in is also 468 X 351 however the
    designers that
    > made it
    > have crazy amount of random Movie Clips EVERYWHERE that
    isn't on the
    > stage. My
    > guess is that the actual height and width of the SWF is
    close to 1000 X
    > 1000.
    > When I load this SWF in to my SWFLoader it scales
    everything down so all
    > of the
    > MovieClips are inside of this SWFLoader rather than just
    the SWF's Stage.
    > Any
    > Suggestions?
    >
    > <mx:SWFLoader id="mainMovieSWF" height="351"
    width="468"
    > source="{mainMovieSrc}" scaleContent="false"/>
    Try wrapping it as a component with the Flex component kit.
    That way you
    get to specify the bounding box.
    HTH;
    Amy

  • Load swf via Actionscript 2.0

    I use Actionscript 2.0 to load an external swf [shared
    directory], followed 2 similar tutorials [1 from LiveDocs, the
    other from Flash 8 ActionScript Bible] neither works. Here is the
    code, if someone sees whatI'm missing I'd appreciate the
    assistance:
    this.createEmptyMovieClip("myswf.swf", 999);
    var site_mc:MovieClipLoader = new MovieClipLoader();
    // Create listener object:
    var mclListener:Object = new Object();
    mclListener.onLoadError = function(target_mc:MovieClip,
    errorCode:String, status:Number) {
    trace("Error loading movie clip: " + errorCode + " [ " +
    status + "]");
    mclListener.onLoadStart = function(target_mc:MovieClip) :Void
    trace("onLoadStart: " + target_mc);
    mclListener.onLoadProgress = function(target_mc:MovieClip,
    numBytesLoaded:Number, numBytesTotal:Number) :Void {
    var numPercentLoaded:Number = numBytesLoaded / numBytesTotal
    * 100;
    trace("onLoadProgress: " + target_mc + " is " +
    numPercentLoaded + "% loaded");
    mclListener.onLoadComplete = function(target_mc:MovieClip,
    status:Number) :Void {
    trace("onLoadComplete: " + target_mc);
    my_mcl.addListener(mclListener);
    my_mcl.loadClip("myswf.swf");

    Hi,
    you add the listener to my_mcl wich is not your
    movieClipLoader ... your MovieClipLoader was declared as site_mc.
    You should have :
    site_mc.addListener(mclListener);
    site_mcl.loadClip("myswf.swf");

  • What is or isn't possible on iOS?  (Not having Loader, loadBytes(), external swfs, etc)

    My basic question is:  "What are the classes which we should not use for iOS using the packager."
    I have been trying for a few days trying to get a simple Flash app to run on the iPad.  A very simple app (with sound!) with just 2 classes works fine (Performance is a whole other issue.  We will get to that).  But if I try anything else, all I get is a white/black screen on the iPad.  So it would be really nice to know what classes, functions, etc we CANNOT use for the Packager.
    I have fairly simple app (not as simple as 2 classes) which loads some art assets via URLRequest/Loader, puts them on the stage.  Fairly common standard practice in AS3.
    I've read about not able to load an external file using the Packager.  So to fix the situation of loading assets, I have looked into the [embed] tag, which seems to work.  I hope the blogger doesn't mind, but this page is an excellent source on what works and doesn't work with the [embed] tag in it's various flavors:  http://www.richardleggett.co.uk/blog/index.php/2010/03/08/flash_builder_and_flash_pro_asse t_workflows.  For example, AS3 in a swf is stripped out from an external swf using [embed].
    The best way to load an external swf file for iOS seems to be using [embed] with "application/octet-stream" and load the swf through ByteArray (Option #4 in the link above).  This works great on the PC.  HOWEVER, on iPad, it fails.  The [embed] tag works on the iPad with the other ways, so my guess is that loadBytes() does not work.  Is this true Adobe/Flash guys?  Can you confirm this?
    My initial question is "why is this not allowed on iOS?".  If it is because of the fact that it uses a Loader, can it be changed so it's not using a Loader to construct a MovieClip?  I have a ByteArray with the raw swf/MovieClip data.  Why can't I construct a MovieClip from it without going through Loader?
    This loadBytes() failure seems to be the only thing preventing me from using the normal pipeline of Flash development in loading external assets.  If there are other ways people have found, please share!
    Now on to performance.  Adobe, can you post some examples/samples of code which runs at decent performance?  Like a "tech demo" of what is possible using the Packager running on iPad/iPhone.  That would be extremely helpful for everyone.  I have done a lot of the optimizing suggestions on various sites and pages ( and by Adobe http://www.adobe.com/devnet/flash/articles/optimize_content_ios.html), but I am not seeing the 30 fps performance that is MORE than possible on iPhone/iPad.  Displaying and moving around Bitmaps (I don't use any vector graphics) should be blazing fast.  Quake runs on iPad without any problems and that code is 10 years old.  Moore's law dictates that drawing Bitmaps using CPU should be faster than a 3D engine written 10 years ago...  I am trying out the new iOS 4.2 which is supposed to be "significantly" better, but I am still stuck on loadBytes().
    So at this point, I am blocked on loadBytes() and my performance for a simple app which draws a few Bitmaps and MovieClips is terrible.  I am hopeful some people out there have figured out some solution (there are lots of clever people out there) and I will stumble on to something.  But being forced to go native Objective-C seems to be my only option at this point.
    In summary, here are the questions I would like to ask the Adobe/Flash group for some more help/information/advise:
    - Why is Loader not allowed on iOS?  Is it a technical limitation of the hardware/os/Flash?  Will it never be supported?  What is the future of this class on iOS?
    - Why is loadBytes() not allowed on iOS?  I have the raw embedded data in memory.  I don't need to make a remote call so security should not be an issue.  Can I create a MovieClip without using Loader?
    - Why is AS3 stripped from the timeline when a Symbol is retrieved using [embed]?  Maybe this is the same reason loadBytes() fails, but if I could use [embed] and get a copy of the Symbol, that is what I need.  (There are issues with the mx.core.MovieClipLoaderAsset/Asset, but it is better than being blocked by loadBytes())
    - What are some apps you guys have written that we can use to compare PC vs iOS?  Again, a "tech demo" or sample code of what you as experts in Packager for iOS have done which runs at decent framerate (30+fps) would be of tremendous help.  If the Adobe/Flash group hasn't gotten the current Packager for iOS to handle more than 50+ 2D Bitmaps on screen running at 30+fps, that would be good to know.  Please let us know what the experts and owners of your software are capable of getting the most throughput using the Packager.  I'd hate to sound a bit fed up/angry, but I think you are wasting a lot of people's time and energy with a piece of software that, to me, seems like it was a bit early to release.  Flash can do some great things.  If it can do it on iOS, even better.  But PROVE it to us that it's possible, before having your customers run into barriers imposed on us by trial and error.
    Thanks.

    I have hardly ever seen a post here from someone at Adobe, so you may need to be patient.
    Read this article, and get its associated demo files, to see some good performing tech demos:
    http://www.adobe.com/devnet/flash/articles/optimize_content_ios.html
    Back to your main point, loaders are working, what isn't working for you is accessing of things in the library of a successfully loaded swf, that have been set to Export for ActionScript. That means that the swf you have loaded has an ActionScript Class, to represent the library symbol. iOS Flash apps are native ARM code, and don't include the virtual machines that a browser plugin has, and so it's not able to interpret ActionScript. That may be why it would fail.
    Now, I can think of at least a couple of reasons why you might want to have external swfs with elements that you want to reuse in the main swf. One would be if you're intending to make a lot of them, like say if you wanted to have an Asteroids game and the ability to use artwork from a set of different swfs. Another reason might be if you want to skin your interface, by taking specific elements from the loaded swf and using them in the main swf. That way you could have artists preparing those swfs for you, and you just include them in your package, and load the one you want.
    There is a way to do either of those things. The second one can be done by having the item as a named symbol on the stage of the loaded swf. With a to-be-loaded swf named "inner.swf", that has a movieclip on its stage named "mc1", this script in the main swf would load that external swf and use its symbol on the main swf's stage, without having to make the inner swf's symbol use ActionScript:
    var req:URLRequest = new URLRequest("inner.swf");
    var ldr:Loader = new Loader();
    ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,loaded);
    ldr.load(req);
    function loaded(e:Event) {
    var mc:MovieClip = e.target.content as MovieClip;
    var innermc:* = mc.mc1;
    innermc.x = 50;
    innermc.y = 50;
    addChild(innermc);
    For the other case, you can take the item off the stage of the loaded swf and draw it into a bitmapdata, and then make as many bitmaps from that as you like. Here's the above example, only it adds the original movieclip to the main swf stage, and also creates a bitmap that looks the same:
    var req:URLRequest = new URLRequest("inner.swf");
    var ldr:Loader = new Loader();
    ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,loaded);
    ldr.load(req);
    function loaded(e:Event) {
    var mc:MovieClip = e.target.content as MovieClip;
    var innermc:* = mc.mc1;
    innermc.x = 50;
    innermc.y = 50;
    addChild(innermc);
    var bmd:BitmapData = new BitmapData(innermc.width,innermc.height);
    bmd.draw(innermc);
    var bm:Bitmap = new Bitmap(bmd);
    bm.x = 150;
    bm.y = 150;
    addChild(bm);
    So, the thing to learn is that a native ARM code application does not have an ActionScript interpreter in it, and if you need to do something that normally requires interpreting ActionScript, find another way to do it.

  • Apple Remote Desktop-client mac issue

         Dear all,
                   I have using Apple Remote Desktop 3.7.2 on maverick,in that some of the client machine also visible offline, but i can take remote.
    i don't no why.plz help me
    Regards,
    Venki   

    Yes I've tried to ping the IP address and I get a reply.
    I've just discovered this morning that the issue appears to be with Apple remote desktop.
    The issue came up again this morning...I ended up shutdown ARD completely then loaded it back up, and guess what! The MAC address was showing up properly. I've discovered this is working for SOME of my issues. For the ones that weren't displaying properly I deleted the computer account out of ARD and then manually added the computer though a scanner import via single network address. The scanner finds the computer and it displays the correct Ethernet ID.
    So I’m guessing there is a bug with ARD and its mixing up/displaying the wrong Ethernet ID of some machines....
    Q

  • Apple Remote Desktop 3.4 issue

    Hi there,
    In Apple Remote Desktop 3.4 server I added a client computer by doing a scan by IP. Once the computer was added to a group I was able to take remote control, however after a few minutes I noticed the ARD console was having issues authenticating to it (Even though I authenticated properly to get the machine in ard). The ARD console was reporting that the computer was offline, but I was still able to observe and take control of the machine.
    I then noticed that the MAC address was the incorrect address. It was displaying another computer mac address that is on campus.
    My question: is ARD getting the Ethernet ID/MAC address from DHCP? WINS? DNS? Open Directory? LDAP? or from the client it's self? or do I have corruption in my ARD database?
    I am seeing this on a hand full of computers around campus (out of 500+ computers)
    (If I remove the client - the same thing occurs)

    Yes I've tried to ping the IP address and I get a reply.
    I've just discovered this morning that the issue appears to be with Apple remote desktop.
    The issue came up again this morning...I ended up shutdown ARD completely then loaded it back up, and guess what! The MAC address was showing up properly. I've discovered this is working for SOME of my issues. For the ones that weren't displaying properly I deleted the computer account out of ARD and then manually added the computer though a scanner import via single network address. The scanner finds the computer and it displays the correct Ethernet ID.
    So I’m guessing there is a bug with ARD and its mixing up/displaying the wrong Ethernet ID of some machines....
    Q

  • FAQ: How do I load an external SWF file into a parent SWF file?

    A ton of Flash users visit Adobe’s we site every month wondering  about how to load an external SWF file from within another SWF.
    Adobe's own TechNote on the subject attempts to answer the basic question, along with some common follow-up questions, including:
    How do I load more than one SWF?
    How do I load a SWF into a specific location in the display list?
    How do I resize the loaded SWF?
    How do I set its X and Y location?
    Here are some additional resources that elaborate on loading content and on working with the display list:
    Sample files for the above TechNote. A set of 3 FLA and 3 corresponding SWF files, including a parent SWF and 2 SWFs that the parent loads.
    Help > AS3 Developer’s Guide > Loading an external SWF file
    Help > AS3 Developer’s Guide > Loading display content dynamically
    Loading multiple external SWFs within a main SWF – CreativeCow.net forums
    Video tutorial: ActionScript 101 – Episode 6: Adding named objects to the Stage. By Doug Winnie. An example of how to add the loaded external asset to the Stage and modify its location or other properties.
    Video tutorial: Preloading in ActionScript 3.0.  By Lee Brimelow. A slightly more complicated example, showing how to  make the parent SWF display information about the progress of loading  the external SWF.
    Tutorial: Loading and unloading SWFs - FlashAndMath.com
    This article provides several examples of how to communicate between a parent SWF file and the loaded SWF:
    SWF to SWF Communcation via ActionScript 3.0 (by kglad)

    quote:
    Originally posted by:
    NedWebs
    You now seem to want to get rid of the swf once it has loaded
    and played itself thru. To do that you would need to have something
    in the swf itself that triggers its removal in its last frame. The
    following might work...
    MovieClip(this.parent).removeChild(this);
    Unfortunately I couldn't get this to work. I placed it on the
    last frame of the SWF to be called - is that right?
    I am not sure I am doing it correctly...

  • Help For Remote Access Via VPN

    Need Help
    what cisco product or router specification or model  can we use for VPN connection in our remote site via Internet Connection
    thanks Godbless

    There are several options here, but more information is probably needed to give a good recommendation.
    1.  What type of VPN?  A site to site VPN that stays up, or remote VPN that is more on demand?
    2.  What type of Internet access to have at your remote site?
    3.  Are you going to also use this as a gateway to the Internet or will this device sit to the side or behind your gateway?
    My first inclination is that if you just need occasional remote access to your remote site for support issues check out the ASA 5505.  Depending on where you will place it and what amount of user traffic will flow through it, you may be able to get by with just a base license and use IPSec remote VPN. 
    If this posts answers your question or is helpful, please consider rating it and/or marking as answered.

  • Loading an AS2 Swf into an AS3 project

    I have a need to be able to load legacy AS2 SWF's into a new
    AS3 project. I know that this is not readily possible, because you
    can only communicate between the two via the LocalConnection class.
    So, what I have done is to create an AS2 proxy SWF. This SWF will
    handle the loading of all legacy SWF's and act as a middleman to
    pass the function calls between the pre-compiled SWF and the new
    SWF using the LocalConnection class. The new SWF also needs to be
    able to load AS3 SWF's, though.
    Because of this, I have the need to detect the AS version of
    the loaded SWF. If 1 or 2, then change the source to the
    AS2Proxy.swf, if 3 then simply load it.
    I have written the following code. My problem comes in when
    the init event fires. Regardless of the compiled version of the
    loaded SWF, it always traces 3 as the AS version.

    Alright, I solved this problem, only to come up with many
    more.
    To solve this problem, I needed to point to the loaderInfo
    object of the UILoader's content. So:
    simulation.content.loaderInfo.actionScriptVersion.
    Now the proxy loads correctly, but I start getting errors
    immediately. Let me paste some code to show the next steps:
    First off. I immediately receive a StatusEvent error, though
    the path gets sent into the proxy and loads correctly.
    Next, when the complete event fires in the AS2 SWF - it sends
    a completion back up to let the AS3 SWF know that it finished (and
    any handling that needs to happen at that point.) I receive the
    following error:
    Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095:
    flash.net.LocalConnection was unable to invoke callback loadSwf.
    error=ReferenceError: Error #1069: Property loadSwf not found on
    com.applied.flash.events.AS2Connect and there is no default
    value.

  • GetURL not working when swf is loaded into another swf

    Ok, I need some help for something relatively simple which
    for some reason I've not been able to find any information on at
    all?
    Hopefully it will be something easy to fix.
    Essentially I have the following:
    my main movie "Home.swf"
    another movie "Sub.swf"
    I've loaded "Sub.swf" into "Home.swf" via an empty movieclip.
    Within "Sub.swf" I have some links which when clicked call
    getURL and open a HTML page in the browser.
    But for some reason the getURL isn't working and I believe
    its because the getURL is called from a loaded movie within
    "Home.swf".
    I've tried changing the actionscript to:
    _root.getURL('/mypage.html');
    _parent.getURL('/mypage.html');
    but neither (_root / _parent) seems to work?
    Need help here please.
    Many thanks.
    Kind regards,
    M.

    Hi kglad,
    Yes the button is definitely firing ok.
    In the "Sub.swf" movie, on the second frame of the timeline
    (the first frame is some preloader code) there is the following
    code:
    imgMC.mascara.onPress = function() {
    //trace('mc[activo] = ' + mc[activo]);
    switch(mc[activo])
    case _level0.imgMC.MC0:
    trace('0 - ' + mc[activo])
    break;
    case _level0.imgMC.MC1:
    trace('1 - ' + mc[activo])
    break;
    case _level0.imgMC.MC2:
    trace('2 - ' + mc[activo])
    break;
    case _level0.imgMC.MC3:
    trace('3 - ' + mc[activo])
    break;
    case _level0.imgMC.MC4:
    trace('4 - ' + mc[activo])
    break;
    case _level0.imgMC.MC5:
    trace('5 - ' + mc[activo])
    break;
    If I run this movie in Flash (ctrl-enter) then the trace
    works fine.
    But the trace stops working when I run the main "Home.swf"
    movie in Flash (ctrl-enter) when the "Sub.swf" is loaded into an
    empty movie clip.
    And when I change the trace for a getURL and test in a
    browser it still doesn't work?
    What do you reckon?
    Thanks.
    M.

  • Using Dreamweaver to create AIR app from HTML site, FLV loaded by placed SWF not loading

    Hello.
    I'm using Dreamweaver to create an HTML-based site that has pages with FLV-based videos that are loaded using a SWF file. The SWF file is just the player / skin. When I preview or publish to AIR, the videos do not show up. I'm sure others have asked how to accomplish this but I'm having difficulty finding the solution to this issue. Can someone share with them their solution please?
    Thank you!
    Robert

    Steveejay, I was having the same problem. It turns out that
    mine didn't like the fact that I was using the "POST" method in my
    loadMovie() call. I changed them to "GET", and it works fine in the
    web page now. Just doesn't work when previewing in Flash.

  • Trouble loading an external swf file implemented with AS3

    I am using Adobe Flash CS3
    At first, I tried
    swf_mc.loadMovie("//swf file
    location");
    It gave me
    quote:
    Warning: 1060: Migration issue: The method loadMovie is no
    longer supported.
    USE: var l = new Loader(); addChild(l); l.load(new
    URLRequest("your url"));.
    Well, the given code isn't working at all.
    But since it is a migration error, I thought maybe I can just
    save it into Flash5 format with AS1. Then it worked with most
    external swf files. However, the one I am trying to load is a swf
    file with AS3, so my older version swf can't load it at all.
    Anyone has any ideas about how to load an external AS3 swf
    file?

    AS3 is a completely different beast than AS1 or 2. loadMovie
    was removed from the language.
    The answer to your question is two fold. First, Adobe was
    kind enough to give us the code when it finds a migration issue.
    var _ldr:Loader = new Loader();
    addChild( _ldr );
    _ldr.load( new URLRequest( "your url") );
    Handling progress has also changed. I have a ContentLoader
    package on my site that you're free to use that should familiarize
    you with the new way that things are done in AS3.
    http://sd-dezign.com/blog/?page_id=10

Maybe you are looking for