-
Can't Re-Member
try using the actual file path :
container.loadMovie("swf/home.swf")
do you get error messages in the output window?... what exactly is/isn't happening?...
-
what's happening is when i use the full code you posted last time, it doesn't load the external files at all, so i can't even say if the resizer code is working on not.
So to make sure that the load movie code is working, i removed the resizer code, and tested it, it loads the external files-but of course no resize since i already removed the resizer code.
so what I’m thinking is that both codes are conflicting somehow!!
-
Can't Re-Member
well that doesn't make any sense... did you try loading the movie using the actual file path and file name in full, instead of using variables?... Better yet.. move the external swf to the same directory as the main movie and try to load it.
try moving your loadMovie() code to frame 2 and see if it works...
comment out this line : $stage.onResize(); and try again...
there's nothing wrong with the onResize code, it's the order in which you are trying to execute things. Do you get an error message about the movie not being found or anything in the output window?... if not, then flash is finding the movie.. so it's gotta be something else. But i assure you. That code works.
once you have eliminated all the possible things that could be conflicting... if it still doesn't work.. then post your code EXACTLY AS IT IS in your movie...
-
okay, i tried everything, only when i removed $stage.onResize(); it loads the external file, but again not resized.
my code looks like this:
Stage.align = "TL";
Stage.scaleMode = "noScale";
var $stage:Object = new Object();
$stage.onResize = function() {
var $width:Number = Math.round(Stage.width);
var $height:Number = Math.round(Stage.height);
container._width = $width;
container._height = $height;
};
Stage.addListener($stage);
$stage.onResize();
var filePath:String = "./swf/";
var currMovie:String = "home.swf";
container.loadMovie(filePath + currMovie);
I've searched everywhere for an answer, it seems there are other ppl with same problem.
-
-
-
Can't Re-Member
you can't load a movie while trying to change the properties of the clip containing it.
there are two solutions...
1.) Use the MovieClipLoader() class to load your movies.. then you can invoke the Stage.onResize handler when loading of the swf file has finished...i.e.:
MovieClipLoader.onLoadComplete = function(){
$stage.onResize();
};
2.) invoke the listener from the first or second frame of your loaded movie... i.e.
_level0.$stage.onResize();
-
yeah okay now it works fine, but it gives me a atrange result, now my external movie is resized outside my stage, maybe to double size!!
i used the 2nd methode you mentioned.
on the main movie :
Stage.align = "TL";
Stage.scaleMode = "noScale";
var $stage:Object = new Object();
$stage.onResize = function() {
var $width:Number = Math.round(Stage.width);
var $height:Number = Math.round(Stage.height);
container._width = $width;
container._height = $height;
};
Stage.addListener($stage);
var filePath:String = "./swf/";
var currMovie:String = "home.swf";
container.loadMovie(filePath + currMovie);
and on first frame of external file:
_level0.$stage.onResize();
Last edited by Web Rhino; 09-27-2006 at 04:46 PM.
-
Can't Re-Member
are you trying to reposition elements in the external swf?.. or just the main stage items?
try putting :
Stage.align = "TL";
Stage.scaleMode = "noScale";
on the first frame of your external swf
-
I was hoping to resize "resize" 1 element in the external swf, the background image only, here's an example link of what i'm doing now http://www.poised.com/flash.html
once the page load i have main.swf, i made it load the contact.swf as external movie, you'll notice that it loads it double size, but when you resize down the browser window, and maximize it again, you'll see my BG that i want to expand.
P.S. i really appreciate your help, i wish i can help you with anything one day, if you want to see my source files i can give it to you over MSN, but it's also good to keep this chat here to fix this problem once and for all.
Last edited by Web Rhino; 09-27-2006 at 07:17 PM.
-
you know, i got it to work, i just added the stagelistners inside my external movie to resize the external swf bg
I'll upload the result in a while
-
Can't Re-Member
WOOO HOOO!!! glad you figured it out.
On a side note.. I prefer to keep discussions and the problem solving process out of IM or Private Messages in favor in the public forums. That way, anyone searching who may have a similar problem can benefit, or anyone who may be following a certain thread isn't just left hanging.
Good luck with the rest of your project
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|