View Full Version : couple questions
Probably very easy ones, but it's not working. Okay - question 1. I've got a .swf file - one frame long, four objects, all dynamically placed and loaded via AS. now, when I ctrl-enter, the movie works brilliantly. however, when I open it in a browser, nothing shows. It's basically five interrelated functions in frame 1, followed by:
this.onLoad = function(){
calBuild();
}
where calBuild() is the main function. Should work, right? Cause it doesn't. Not in the browser, anyway.
Second stupid question - I have a movie with a pushbutton and an empty (placed) movieclip. in the function handler for the pushbutton, i have a simple line of code:
function calHandler(){
_root.loadMovie("blah.swf", _root,placer);
}
this should work just fine, except that the blah.swf movie doesn't load into the target, it loads into the level0 in the current movie. This is not exactly what I was expecting.
Is there something terribly simple that I'm missing here? Any ideas or advice is much appreciated.
CyanBlue
04-07-2003, 05:23 PM
Howdy...
1. The only thing I can think of is you having stop() or gotoAndStop() function somewhere in your movie... See if you have it...
2. Try this code...(You had ',' instead of '.' in it...)function calHandler(){
_root.placer.loadMovie("blah.swf");
}Let me know...
Unfortunately, nope on both counts. I don't have a stop() in the first code section (at all, actually. Might want to change that - thanks!). And I just tried the suggested code in the second - I still get nothing. I'd post the AS here, but it's just over 100 lines long, so I'm afraid that I'd have to post the entire file. That and the fact that I'm sure there's a more elegant way of doing what I'm doing, so I'm a little embrassed to post.
Anyway - I'm thinking now that maybe the onLoad function call is the culprit. But I can't use an onEnterFrame or it defeats the purpose of the function - I can't have the entire function run every frame, the data has to change before its' run again. Hell, maybe I will just post the entire friggin' file. Thanks for the ideas - I'm gonna keep playing with it for a while and I'll let you know what I find.
CyanBlue
04-07-2003, 09:11 PM
Hm... onLoad... I guess I just skipped that part... Use trace() function to see if that function gets fired or not...
Just by going over the descriptions that you have given so far doesn't give me much details... I don't really want to see the whole couple megabyte files either... Try to create a sample with what you are trying to do and post the sample if you want to... ;)
Missed this post somehow... weird. Anyway, like I said, in the testing environ (Flash), the movie works perfectly. It's once I get it out of there that it doesn't. Quite honestly, I gave up and posted the file zipped on the Actionscripting board. It's just not working, and while I'm not a terribly vain man, I look better without the clumps of missing hair....
http://www.actionscripts.org/forums/showthread.php3?s=&threadid=25801
Thanks for your help so far - hopefully this can get sorted. By the way - the files actually only like 11 KB or something. It's really lite.
I really need to start getting more sleep. Figured it out - took our the onLoad wrapper and just left the code at
calBuild();Amazingly enough, everything's rocking now. D'oh! :rolleyes: Thought I'd let you know I got it and say thanks for the help...
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.