Groups | Blog | Home
all groups > flash actionscript > march 2004 >

flash actionscript : loadmovie works locally / but when uploaded


fat-jack
3/30/2004 11:39:26 PM
Any ideas why it would work fine on my local machine (during export/testing)
but not when uploaded to my webserver?

Seems simple enough...

FRAME 1:
totalbytes = -1;
mclipName = "movieClip.swf";

FRAME 2 (loadtarget):
loadmovie(mclipName,loadtarget);

FRAME 3 (calculation):
if (totalbytes != loadtarget.getBytesTotal()) {
gotoAndPlay ("loop");
} else {
gotoAndPlay ("content");
}

FRAME 4 (loop):
totalbytes = loadtarget.getBytesTotal();
gotoAndPlay ("calculation");

FRAME 5 (content):
with (loadtarget) {
gotoandplay(2);
}



David Stiller
3/31/2004 9:10:21 AM
Did you upload both the SWF that does the importing and the SWF that is
imported?


David
stiller ( at ) quip ( dot ) net


[quoted text, click to view]

David Stiller
3/31/2004 4:01:42 PM
fat-jack,

I do see that in your original post, you have a number of alpha case
discrepancies. One of your gotoAndPlay() statements is mixed case, for
example, and another is lowercase. It's important to get them in the format
AS expects.

loadmovie() isn't a function, as it turns out, but loadMovie() is. -- I
haven't looked at your code in detail, but go through each line and make
sure you're character-for-character correct. I find that the Actions
panel's color coding helps ... incorrect method calls show up as black and
correct ones show up as pink (by default, anyway).


David
stiller ( at ) quip ( dot ) net


[quoted text, click to view]

kglad
3/31/2004 4:04:18 PM
fat-jack
3/31/2004 6:06:34 PM
Yes both files are uploaded in the same directory.

Right now, it seems that the calculation may be the problem. It hoses the
browser and asks me if I want to stop the script. Sometimes if I click "no",
it displays the correctly imported movie clip.

In response to the other posting... Isn't "loadmovie" a flash predefined
function? I've used it several times without fail.

Thanks for the responses.

FAT-JACK
kglad
3/31/2004 11:29:32 PM
no, loadMovie() is the flash function. loadmovie() won't be recognized by
flash and will fail unless it's user defined. if you made a typo in the forum
that's not in your movie, then you're not giving yourself a chance to get the
best help. you should copy and paste your code. you may inadvertantly correct
a typo that's escaping you when you re-type here. and you may introduce
additional errors, like the one above.
AddThis Social Bookmark Button