all groups > flash (macromedia) > july 2005 >
You're in the

flash (macromedia)

group:

loadmovie in preview works, in html not


loadmovie in preview works, in html not mensmen
7/31/2005 8:50:53 PM
flash (macromedia):
Hi There,
I am not getting something to work. I am pretty.......new at flash.

I have a loadmovie where attached to a button it loads an other swf file in a
movie clip, and it loads fine in the preview.
Also if i open it directly in a browser (firefox or IE)
(http://localhost/myfile.swf) then all is well.
Only when i embed it in a HTML file (done with dreamweaver standard code) i
run in to problems.
The first main swf file opens , if i press the button, nothing happens and my
browser status bar says waiting fort localhost...
Nothing happens, not after 5 minuts never.

please help.
Re: loadmovie in preview works, in html not Pong The Greek
7/31/2005 8:58:24 PM
Why do you use http://localhost???

Try just to load the swf through its relative address "myfile.swf"

Regards
Re: loadmovie in preview works, in html not mensmen
7/31/2005 9:12:57 PM
within the main swf i use the relative address.
If i open the main swf file i use this address for example.
It works fine if i just do not open it directly in the browser and not in a
html page.
But i want it in a html page.

Re: loadmovie in preview works, in html not Pong The Greek
7/31/2005 11:14:36 PM
It sounds like a security issue. Flash does not allow you to load stuff from different domains. Have you tried to upload the files in the same domain? Could you post your script? It would help.
Re: loadmovie in preview works, in html not mensmen
7/31/2005 11:32:57 PM
There is not much script to post.
2 swf files , a main file and a sub file wich get loaded in to the main swf
file,
in the same directory full access to everything.

The button:

on (release) {
loadMovie("sub_swf_file.swf", "placeholder"); // is has another name and
"placeholder" is a mc instance name.
}

Ans as i said in preview its working, in HTML file its not.
Is there something i schould know if its in a HTML file?
Whats the difference, i just tried and put the html file, and both swf files
in the same dir,
in the main swf i gave the loadmovie the url
"http://localhost/testloadmovietest/sub_swf_file.swf".
also tried with no localhost just the name of the sub swf, no music.

Thanx for helping
( i am off to bed and hope i see your answer tomorow)
Aldo (The Netherlands)
Re: loadmovie in preview works, in html not Laiverd.COM
8/1/2005 12:00:00 AM
Any relative path to an external resource (movie, xml textfile etc.) has to start from the location of the HTML file into which the
host flash movie is embedded.

John

--
---------------------------------------------------------------------------------------
RESOURCES
http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash
---------------------------------------------------------------------------------------
TUTORIALS at
www.laiverd.com
Flash & PHP Emailform
Using textfiles in Flash
---------------------------------------------------------------------------------------

Re: loadmovie in preview works, in html not Pong The Greek
8/1/2005 12:07:48 AM
I do not understand why it wont work with the relative path...

I should not work with the
"http://localhost/testloadmovietest/sub_swf_file.swf" so dont bother with that.

I have created a working example for you. You can download it from
http://www.dnpmedia.gr/loadMovie.zip

also check your publish settings Flash Player 7 etc. and try to upload the
files.

Good luck
Re: loadmovie in preview works, in html not Pong The Greek
8/5/2005 12:00:00 AM
I usually create my own HTML pages using Dreamweaver cause I don't like the
HTMLs that Flash generates.

If you use the Flash generated HTML then (if you don't change any HTML) your
calling movie should be in the same folder with the HTML. After that the other
movies can be anywhere in exactly the same domain as the calling movie.

If you wish to use files in other domains check for crossdomain.xml it's a
file that enables this. Use flash help for that or google it.


Re: loadmovie in preview works, in html not mensmen
8/5/2005 7:53:54 AM
Thanks Pong for your work.
I still dont know what i did wrong, i started from scratch with your example
as.... euh example. And now it works. This is strange.
Do all movies need to be in the same container as well as the html file?
I can work also with an "movies" container.?

But thanks again for your work.




AddThis Social Bookmark Button