AS question
- Started
- Last post
- 23 Responses
- goygoygoy
hi,
i'm loading a swf in my movie, it works perfectly when I test the movie, but if I test it in a html page, the loaded swf doesn't load, any ideas?
- tymeframe0
are the files in the right directories?
- goygoygoy0
sure, cos' it works when I test it by opening only the swf...
- -sputnik-0
doesn't mean its in the right place.
check your path
- F_180
make sure the swf you are trying to load and the main swf you are loading into are both in the same directory. also, make sure your path is relative...see if that works.
- goygoygoy0
thks, but all those points seem to be ok here... I simply don't get it
- goygoygoy0
they are in same direcotry, so that's relative right?
../images/collectionWomen.swf
- lvl_130
get rid of the space in your file name
- goygoygoy0
thks but that's just a type mistake, file name has no space
- ********0
dude, post your paths so we know what you're talking about.
- lvl_130
oh, nevermind then : )
- F_180
how are you loading it in...on a level or into an empty movie clip?
- lvl_130
yeah, what jred said^
- PixelDrama0
hey man, sometimes you get that problem when the file is called before it is completly loaded. You wont get this problem testing locally cause the data transfer rate is of course, real high. Try putting a preloader on the swf you are trying to load. Do this unless of course your testing the html document locally as well.. other than that.. i dunno.
- goygoygoy0
okay so, I'm testing the html locally, doesn't work.
code AS is (I tried every possibilities)
content2.loadMovie("../../html/i...the 2 swf's are in "images" folder and the html page is in html/ folder...
- goygoygoy0
okay so, I'm testing the html locally, doesn't work.
code AS is (I tried every possibilities)
content2.loadMovie("../../html/i...the 2 swf's are in "images" folder and the html page is in html/ folder...
- goygoygoy0
thks pixeldrama but the swf i'm trying to load is 2kb... so couldn't be that, right?
- F_180
i see your code, and it doesnt specify what youre loading into. it should specify a level or an empty movie clip
- goygoygoy0
it's loading into emptyMovieClip called "content2"
- jkosoy0
It is what pixeldrama is referring to. Flash gets caught up in these load movie things. Something like this might work:
--
content2.loadMovie('movie.swf')
_level0.onEnterFrame = function()
{
if(content2.getBytesLoaded() > 4)
{
// do whatever content2 is supposed to do.
delete this.onEnterFrame;
}
};--
Even on a 1x1 empty flash file, loadMovie gets caught on the first 5 bytes if you try to do something immediately after loadMovie.
- goygoygoy0
thks jkosoy, but i still doesn't work, strange! I should maybe sleep on it...