Click to See Complete Forum and Search --> : rollover work in test in player but NOT in browser


Kinmaxpu
05-24-2010, 02:15 PM
Hi, im working in my bros. page in swishmax, and im adding some flash and scripts, when i test each flash file in player they work perfect, but when I test them in browser they dont do the rollover, please help me.
I have 6 diferent files: index, button1, button2, button3, button4 and button5, in button3 and button4 i have rollover images for show, as I told you, they work good in player and browser, but when I export them to index.html and button4.swf, it loads the page, but the rollover DOSNT work?
Here is the code in index file:

on (rollOver) {
gotoAndPlay("on");
}
on (rollOut) {
gotoAndPlay("off");
}
on (release) {
_parent[_parent.but].gotoAndPlay("off");
_parent.but="Button4";
_parent.filename="Button4.swf";
_root.LoadingActions.gotoAndPlay("time");
gotoAndPlay("hit");
}
-----------------------
and here is the code in button4:

on (rollOver) {
tellTarget (_root.Content.controls) {
gotoAndPlay("image1");
}
}

onFrame (6, afterPlacedObjectEvents) {
setLabel("image1");
tellTarget (_root.Content.masked_things.things) {
_x -= 300;
_x *= 0.8;
_x += 300;
}
}
onFrame (7, afterPlacedObjectEvents) {
prevFrameAndPlay();
}
onFrame (11, afterPlacedObjectEvents) {
setLabel("image2");
tellTarget (_root.Content.masked_things.things) {
_x -= 0;
_x *= 0.8;
_x += 0;
}
}
onFrame (12, afterPlacedObjectEvents) {
prevFrameAndPlay();
}
onFrame (16, afterPlacedObjectEvents) {
setLabel("image3");
tellTarget (_root.Content.masked_things.things) {
_x -= -300;
_x *= 0.8;
_x += -300;
}
}
onFrame (17, afterPlacedObjectEvents) {
prevFrameAndPlay();
}
------------------------
I can send You the files if You want, please help me

Thanks

Kor
05-25-2010, 05:00 AM
Your code is ActiveScript, not JavaScript... I will move this Thread to the better Multimedia Forum

Eye for Video
05-25-2010, 08:37 AM
Almost always when it works on your local machine but not on the server, there is a pathing problem to files being called by your main .swf. The most common error happens when all the Flash content is placed in one folder and then the main .swf is placed on a web page which is not also in the Flash folder. When testing the .swf locally, everything works just fine, because relative to the location of the main .swf (in the Flash folder), the other files it's calling are all at the same folder level, such as
Button4.swf
But if the main .swf is placed on an html page that is not in the Flash folder, then relative to that location, the path back to that button would be
flash/Button4.swf
even though the main swf is NOT in the same folder as the html, once it is placed on that page, it is, in effect, removed from the Flash folder and moved to the same folder as the html page.
To correct, just be sure the pathing to buttons, etc inside the main swf is correct for it's RELATIVE location on the web page and NOT it's physical location in the Flash folder.
Best wishes,
Eye for Video
www.cidigitalmedia.com