A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: How to play (not access methods) a remote SWF with createEmptyMovieClip?

  1. #1
    Junior Member
    Join Date
    Jun 2006
    Posts
    15

    How to play (not access methods) a remote SWF with createEmptyMovieClip?

    2 hours of searching, and nothing. Everything talks about accessing methods & variables.

    Simple:

    - I have a local flash file that is loading .swf files from a local directory, and playing them.
    Code:
    	for (x=myBanners.length-1;x>-1;x--){
    		var bannerName:String = "banner" + (x+1);
    		var movieLocation:String = myBanners[x].firstChild.nodeValue;	
    		var mcl=new MovieClipLoader();
    		var obj=new Object()
    		mcl.addListener(obj);
    		var fileLoad = this.createEmptyMovieClip(bannerName, this.getNextHighestDepth());
    		mcl.loadClip(movieLocation, fileLoad);
     	}
    - Never mind that it is loading locations from XML...
    - I want one or more of them to be .swf files that are remote, right now they are local, on the same fs as the calling swf (this one)...

    Tried already:

    - System.security.allowDomain("*"); on both calling and called .swf
    - Putting this in the called server's docRoot as crossdomain.xml:

    Code:
    <?xml version="1.0"?>
    <!DOCTYPE cross-domain-policy
    	SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
    <cross-domain-policy>
    	<allow-access-from domain="*"/>
    </cross-domain-policy>
    Any ideas?

    TIA!

    pat
    :)

  2. #2
    Senior Member
    Join Date
    Oct 2004
    Location
    Biograd, Croatia
    Posts
    179
    I remember one time I was loading images from other domain and despite of everything setup properly couldn't really manipulate them normally (use masks or transitions on them etc...). Hope there is a solution for you though.

  3. #3
    Junior Member
    Join Date
    Jun 2006
    Posts
    15
    toltec7,

    Small world! Thanks again for writing.

    It doesn't need any manipulating, that is the issue. All that is out there talks about accessing variables and methods-I need none of that, but simply to play is as what happens when you load a .swf locally.

    In the above, all movies are actually running as soon as they are loaded, I just adjust _alpha to make only one visible at a time.

    Pulling .swf locally (relative path to calling .swf) is ok. Perfect. Pulling in the above method with:

    http://myRemoteDomain.com/remoteMovie.swf

    ..instead of:

    ./relative/path/to/localMovie.swf

    fails. Nothing is displayed. No errors, nothing.

    TIA!

    pat

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center