View Full Version : Relative Scroll
anthonygatto
01-12-2003, 07:07 PM
Hello,
I am doing a similar movie to the Relative Scroll tutorial and the difference is with my movie my buttons reside inside of another movie clip. I use the same target actionon
(release) {
/photos:target = 1;
director ();
}
Nothing happens! I tried a with action and still nothing.What could I be doing wrong. Thanks
AnthonyGatto
farafiro
01-13-2003, 10:47 AM
note that the director() is a function, so u should assign it first
anthonygatto
01-14-2003, 12:04 AM
Thanks for the advise. I figured it out though...well I lucked out, but now there is a new problem! Here is the script I used to make it work:
on (release) {
tellTarget("photos")
with (_root/photos) {
/photos:target = 4;
director();
}
}
It works great. The only problem is when I load this movie into my main movie it doesn't work at all! It's probably something so small I can't see it, but hope someone out there can.
Remember this entire movie is on _level2 of the main movie....if that helps.
Thanks soooooo much.
AnthonyGatto
farafiro
01-14-2003, 01:26 PM
two things, first for your code
tellTarget and /: was to be used in flash 4, replaced by the dot syntax in flash 5+
with : makes all to scope what in the (), so no need to target it again
so, do this[as]on (release) {
_root.photos.target = 4;
director();
}[as]now, when u press the button, the target will change and will call the director() function
but wait a minute, we want these two things (the "target" variable and the function "director()") to be called when launching the swf file
so we need also to put them in the first fram
farafiro
01-14-2003, 01:26 PM
two things, first for your code
tellTarget and /: was to be used in flash 4, replaced by the dot syntax in flash 5+
with : makes all to scope what in the (), so no need to target it again
so, do thison (release) {
_root.photos.target = 4;
director();
}now, when u press the button, the target will change and will call the director() function
but wait a minute, we want these two things (the "target" variable and the function "director()") to be called when launching the swf file
so we need also to put them in the first frame
anthonygatto
01-14-2003, 04:23 PM
Hey,
I changed the script and I still have nothing. Here is the script that is attached to the scroll movie on frame 1
/photos:target = 1;
/photos:direction = "f";
function director () {
if (/photos:target</photos:current) {
/photos:direction = "b";
} else if (/photos:target>/photos:current) {
.bar:direction = "f";
} else if (/photos:target==/photos:current) {
.photos:direction = "null";
}
goto = (String(/photos:direction+/photos:current));
trace (goto);
photos.gotoAndPlay(goto);
}
It's exactly the script from the tut but like I said the buttons that control it are on a seperate MC. And when it is tested in the browser it works but when I load this .swf on another level it doesn't work:(. Thanks for your time.
AnthonyGatto
farafiro
01-15-2003, 07:59 AM
first change the code from flash 4 code
and
post the fla
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.