can someone help me with this little problem. I have have an external movie that loads in when a button pressed. within the main movie(load.fla) I have a scrolling menu, I've dropped the button with this so it will move with the image, but when I click the button the the external movie doesn't work. Is it something to do with the fact that the button is now embedded within the scroll movie????
please would any beable to fix script on button
cheers for your time
example:
attached is a folder with two files in 1. load.fla(main movie)2. movie_02.fla(movie trying to load)
I checked the FLA, and I am sure that the problem is in incorrect paths. For example, the function "initMovieLoad" loads the movie to the clip "monkey". And when your button is located deeper inside another clip, it does not find any clip "monkey" to load the movie to it.
To you shold change the paths accordingly.
► Dynamic Systems
► Professional Web Development Solutions!
► www.DySyst.com
i cannot open your fla (mx2004 here) but decompiling your swf shows that you need
to make the function global so it's scope is open to all levels of the Player -
Code:
// in load.fla
_global.initMovieLoad = function(path) { ..... }
// plus your buttons are using Flash 4 slash syntax
// you should update this to dot syntax
// slash syntax
on (release) {
tellTarget ('/graphics') {
if (Number(_currentframe) == 27) {
play();
}
}
initMovieLoad('movie_02.swf');
}
}
"/" is slash syntax for _root
"../" is slash syntax for _parent
// dot syntax
on (release){
if (_root.graphics._currentframe == 27) {
play();
}
initMovieLoad('movie_02.swf');
}
}
tellTarget was deprecated in Flash 5, slash syntax was used in Flash 4 -
tellTarget ('/graphics') {
if (Number(_currentframe) == 27) {
these two lines are replaced by dot syntax -
if (_root.graphics._currentframe == 27)
test the code on a button, to save your old code,
place comment delimiters around your old code
/*..old code will be ignored...*/
and paste the new code in place and test it,
hth
Last edited by a_modified_dog; 02-04-2007 at 01:50 PM.
I seem to have one final probelm which I hpe you can help with. Its carrying on from the movies we just been looking at. but now I'm trying to sit what we did in one main movie so that what we did loads and unloads from a main movie.
the problem I have is I can get the load.swf(movie we was just working on) but when I hit another button in the main movie, I can't get it to unload and disappear.
thought it might have been the _global thing so I added this to the main code in the main movie but still no joy.
what movies we have;
1.main.fla
( the main movie that starts, inside this two buttons, button1,button2. button one loads in the external movie load.swf, which then loads in all the other from that movie when the green buttons are pressed)
2.load.fla
the movie we've been working on
3.movie_2
an external movie that load.swf loads in.
sorry if I'm not explaining myself, please find attached the example files exxample_02
would you be able to have a look at tell me where I'm going wrong
i've had a look and I am totally confused ( so is Flash )
you have duplicate instance names in all the fla, so much so that
you are getting paths such as - "_level0.menu.monkey.menu.monkey"
i'll post what i've done so far, but you need to change the instance
names so they are all unique, and then you might get it working
run your main movie
load in a movie
use CTRL+ALT+V to List the variables
look at the confusion of duplicate instance names
rename them and alter your code to suit the new instance names
re-run your movie, load a swf, CTRL+ALT+V until it makes unique sense