help,stageListener?
- Started
- Last post
- 8 Responses
- blackspade
hi ..im stuck with somthing in flash if anyone can tell me what im doing wrong!?
I have a full-browser-flash page im working on here:
http://webdev1.otago.ac.nz/witma…..that is %100 by %100, with certain MC elements set to re-align to the center etc using a stageListener on Load or window resize.. Which is all working perfect.
My problem is, im trying to load an external .swf into a blank holder MC on the stage. ie; on the 'about the exhibition' MC, I have:
on (release) {
_root.mc_load.loadMovie ("about.swf");
}.. I need this external .swf to always be centered also, but it seems to be ignoring the stageListener script and just loading into the blank MC and then does not flex with the rest of the MC elements.
mc_load._x = stageXCenter = Stage.width * .5;
mc_load._y = stageYCenter = Stage.height * .5;click 'about the exhib' to see what i mean,
What should i be doing differently to get external .swfs to re-align on window resize/on load?
- _b_0
hey chris, are you making sure that movie has loaded before you set its _x and _y? because if you don't, it won't have a _width and _height to halve. know what I mean?
- _b_0
*re-reads question*
hmmm, its not centered, but it is 'flexing' (moving) with the other stuff. still having issues?
- blackspade0
ah good point Barry, yup i do know what you mean
im just not sure, how would I tell it too wait until the external swf has loaded? (im not an action scripter by any means! hehe) hmm
- blackspade0
thanks unfit!!
ill try that way
thanks Barry, i think ill get there *crosses fingers*
- _b_0
hey unfit, that pastebin isa dope idea. rawk.
- blackspade0
yea, v-cool + handy =)
- blackspade0
hey unfit, I pasted your code and edited the;
var content_width:Number = 500;
var content_height:Number = 300;then took the action off the button MC like you suggested, but now nothing is happening at all ?
I have all my actions on the first frame of my first layer, including the;
mybutton.onRelease = function() {
mc_load.loadMovie("about.swf");
}is that correct ?