Re: LoadMovie from a website
Availor, you might be encountering the "sandbox" restrictions of the flash player - it stops you from reading files from a domain other than the one the web page is loaded from.
Be interesting to know more about the swf that was given to you. Ask the author how it works.
Paul
1 Attachment(s)
Re: LoadMovie from a website
onLoad () {
loadMovieNum("http://www.wer2b.com/loadingdock/test/wer2blayout1311a.swf",0);
}
this works fine by me,only thing if playing in Flashplayer your firewall may give a call.
when in your site this must work easy
(use this technic myself all the time
have a small site and a big one to put my pics and ext.swf there and have the little site load externaly(use Swishmax for scripting)
see attachment
Gr.Hans
Re: LoadMovie from a website
Hi
From what I’ve read on this issue pauland seems to be right.
So I had a browse of a book I bought a few months back on flash (although I haven’t tried it out yet)
This is a quote from the book.
In Flash player 7, cross-movie scripting is permitted only between movies originating from the same domain. Any other cross-movie scripting works only after calling System.securtiy.allowDomain to permit access. The following example shows how you would use System.securtiy.allowDomain to permit access to www.myserver.comand www.adomain.com
System.security.allowDomain(“www.myserver.com”.”www.adomain.com” );
Let us know how you get on,
Re: LoadMovie from a website
Thanks for your reply!
If it works for haakoo I see no reason why it shouldn't work for me. I have no firewall.
There is a tutorial describing the process. Maybe I just mistyped something.
I will try haakoo's method using the onLoad command.
Thanks again.
Re: LoadMovie from a website
http://www.kunstfocus.nl/loadingdock/extload.html
here file one resides and loads from here
www.wer2b.com
Not restricted to onloadfunction
I have load it in to a _level,but you can also load into a sprite/MC
Re: LoadMovie from a website
that was a nice piece of work haakoo
Re: LoadMovie from a website
I think that the Flash security sandbox is a bit more subtle than might be appreciated (of course it may not have anything to do with Availors problem at all). If a flash swf (main.swf, say) is running and has been loaded from domain a.com, it can load another swf (second.swf) from b.com into another level, but what is prohibited is main.swf and second.swf exchanging data in any way, or loading a swf from domain b.com into MovieClip created as part of the main.swf.
So you can load .swf files from different domains, but they cannot exchange data in any way: http://www.adobe.com/go/tn_16629
Anyway, I freely admit it's not a problem I've had (but then again I've not been accessing data across multiple domains), but I disagree if people say it's not a problem that can exist. It may or may not be a problem for Availor, that all depends on the code that he has and nobody has seen that.
Paul
Re: LoadMovie from a website
Availor,
Do a search on "clickTag". This allows for cross server scripting. There is also a need to ensure the cross server scripting only allows http and NOT ftp and other variations.
I've never used it but clickTAGS allow for 2 url's, the tracking url (to count the clicks) and the url of the swf. This way the author of the swf file only needs to add clickTAG as the url and the host site enters the clickTag address into their html page. I persume the banner can be changed as and whenever the client desires by just creating the new swf under the name of the previous swf.
Do a search on Adobes site on clickTags as well as Google. It think this will assist you.
Re: LoadMovie from a website
Thanks for the tips guy.
Haakoo - nice website of yours. I like the design. I wonder what went wrong. I will do a bit more experiments.
Re: LoadMovie from a website
thanks Availor,for the remark on my,not yet,completed site
If you use the method of loading one swf into another
the second becomes a part of the first one
therefor you can put some scripting in swf 1 and have it do something in the second(when loading into sprite/mc)
Gr.Hans
Re: LoadMovie from a website
I’ve just done it using the following code which is pretty much the same as you tryed, I did notice a typo error in your first post Availor, you put “ “around the target MC, I know this might be stating the obvious but have you also given your target MC an instance name
loadMovie("http://www.adomain.co.uk/pic1.swf",my_MC);
manny2k
Re: LoadMovie from a website
Sorry Availor I wasn't with you in the first post. In the Blank swf place the following code on frame1:
Code:
loadMovieNum("http://www.availor.com/flash/target.swf",1);
You can then just change target.swf on your server to have it show the new file. (Unless it's been cached on the viewers computer)
I've just tried it here by loading a swf to the forum with a link back to a swf on my site and it loaded fine. I took it down after as I just wanted to test it. If you PM me i'll give you a url so you can test it yourself.
Cautionary note: Allowing swf files that you have no control over nor any knowledge of their contents is a security risk for your sites server.
Although this article is about clickTags it holds equaly true here as you've no idea whether the click is being directed to an http site or elsewhere.
Here's the relevant text from the link below:
Quote:
Note: The ActionScript in this Flash advertisement is verifying that the clickTAG URL begins with "http:". This is an important security measure. If you do not take this precaution, a malicious HTML page could source your SWF and pass a clickTAG URL that begins with "javascript:" or another scripting pseudo-protocol. If your ActionScript code were to call getURL with a maliciously crafted JavaScript URL, it would be possible for the site serving the malicious HTML page to obtain the contents of your HTTP cookies or perform other actions on your site's behalf.
http://www.adobe.com/resources/richm...signers_guide/