Hi there,
I've just added some external swf.'s to my site which contain
various slideshows and galleries which now don't work at all. I
understand that all the paths in my external swf.'s containing
_root will assume that the main timeline is now the _root movie, so
I wondered if there might be a quicker way of correcting all the
paths without having to go through each one individually as there
are literally hundreds!
Any help would be greatly appreciated. Many thanks.external swf path problem
one easy was is to open each SWF and to Search / Replace. of
course not in the action script but on the stage, to get ALL
''_root'' without exception. i hope you know what i mean, this
function is very effective since Flash 8 i guess (maybe Flash 7 but
not before). if you do not know what i mean: click with the mouse
one time on your stage (not a mc or any object) and press command+F
on mac or ctrl+F on pc. hope it helps you.
a scripted way depending on how your SWFs look like for now:
if you write:
this._lockroot = true;
on the first frame of your SWF, this SWF turns to root.
to reset it:
this._lockroot = false;
if it does not help, let me know and i will follow your
thread here to try to help you.
all the best.external swf path problem
Hey batchas07,
Thanks for getting back to me. Erm, I'm pretty new to flash,
(the actionscript side of it anyway), so I didn't really follow
your first solution. I'm currently using Flash MX so would that
still work?
I read somewhere else to try the 'this._lockroot = true;'
script in the first frame of my external swfs. but this doesn't
seem to have done the trick either?
To give you a bit more of an idea, I'm building a site which
has five links at the bottom of the stage which each take you to a
different container movie clip, (each with an instance name of
'holder'), which each of the external swfs load in to. I'm using
the (loadMovie(''external.swf'', ''holder'') ) method of getting the
movies. All the movies load in fine, but as some of them are
slideshows with movie clips inside them I'm guessing their paths
will all be wrong which is why they don't work. The only way I have
managed to make the main movie recognize the external swfs is to
add 'holder.' after '_root.' to all the paths to buttons and movie
clips in these external swfs, but doing this to all of them will
take a long time.
Really not sure why the 'this._lockroot = true' method isn't
working out for me???
Thanks again for the help.
i guess the _lockRoot exists since flash 7 and is now
recognized by flash 6. could be.
though i'm not sure this is the solution for what you
explained. is the slideshow working fine in the SWF itself (i mean
independently from your main movie, when you don't call it via your
main movie?).
Yeh, all the SWF's still work perfectly on their own when not
in my main movie.
I did try loading the SWFs by using
'loadMovieNum(''external.swf'', 1)' script in my actions layer in my
main movie which did make them work, but I'm not sure this is the
best way of doing things as I dont seem to be able to stop them
running into each other!
i'm not sure i understand what you exactly need. could you
explain what you mean with: ''I dont seem to be able to stop them
running into each other!''
are you loading all SWFs in your main movie at once?
i thought that: you have a main movie ''main.swf'' with a few
buttons at the bottom.
you click on the first button called ''slideshow 1'' and it
should load a ''slideshow1.swf'' movie in your main movie.
then you click the second button named ''slideshow 2'' and it
should load the ''slideshow2.swf'' in your main movie too, but first
''slideshow1.swf'' should be unloaded. am i right?
if yes, you just need 1 container (not 5 if you have 5 SWFs
to load into). if you name this empty movieClip (this container)
''holder'', you just need to write on your first button:
on (release) {
loadMovie(''slideshow1.swf'', ''holder'');
}
on your second:
on (release) {
loadMovie(''slideshow2.swf'', ''holder'');
}
and so on. so each time you click a button, the container
loads the next SWF and replaces the old one.
just tell me if i'm wrong and you exactly would like to do
within your slideshows.
Subscribe to:
Post Comments
(Atom)
No comments:
Post a Comment