Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

wanna get publication's width/height.. 1

Status
Not open for further replies.

baad

Programmer
Apr 10, 2001
1,481
RU
hie
i wonder, if there is a way to get the movie(publication)'s width or height?
i wanna make a dynamic swf document that wuld load another swf's into mc's & i want that mc's to be centered after new content was loaded into them.. is it clear for now?
so, as far as external swf's arent of the same size, i wanna knowout *somehow*, u guyz tell me if its possible, the movie's width & height & position this mc just like i want..

& if it is possible, may be i can change this values from within the movie without movie content being scaled? Victor
 
I believe, but am not absolute...

when using load movie, the new movie will inherit the size, width/height of the current movie, as well as center it. it will also keep the new movie bg transparent if you elect this. so if you make your new movie more friendly, I'd suggest making it the same size as the parent movie, making it transparent, and positioning the content within the parents boundaries.

take care, Liz Catch the vigorous horse of your mind!
 
hi rubychyld, thunx for ur response
u mean loading into the layers (levels)?
actually i thought about loading into mc's, that is why i was wondering how to center a mc with new content..

looks like the better way is to set this width in the global variable & dance from this point..

thanks anyway Victor
 
have a look at faq250-756 Item 42. Might help.

dave
dave@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^​
 
thanks, i'll have a look Victor
 
hey, dave, i'm a bit lost..

what is purpose for this code? isnt it an endless loop of loading movie 1.swf?

onClipEvent (load) {
loadMovie ("1.swf", "this");
}

what was u tryin to do?
i'm curious.. Victor
 
hi vituz

just about to leave the office so this is rushed.

I haven't looked at the coding for that fow a while, it was created for someone asking a simliar question to the problem you offered above, so it wasn't necessarily something I was trying to do.

Anyway to answer you're question, in a word, 'no'.

An on 'load' event does just that, it performs the action when it loads, ie: only once. If it were an enterframe it would continuously load the swf (as you mistakingly suggest).

So, summing up, the code loads the swf, and from what I remember of the script it repositions the loaded movie and rescales it's width and height, just as your question asks.

I'll have another look at the script tomorrow, unless you say "OK, I get it now"....?

dave

dave@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^​
 
well, "i havent got it now"

u c, u have this script in 1st frame:
..
loadMovie ("1.swf", _root.place1);
.. (short cut)

so, i believe this is where 1.swf loads..

but then, in the mc "place1" u have the script i posted last thread..
why?

i "read" this scripts this way:
1. in the 1st frame 1.swf is loaded into mc place1
2. then, when this file is loaded into target mc (thy load event occurs) it re-loads it, & then, onLoad - again..

oh, i think i got it:
load is event of mc, but not a movie that is being loaded into it, right?

but why then u have doubled this script? for safety? :)

u havent this action in other mc's (place2 & place3)

i just was curious if there is some hidden idea wich i dont get from first look, but looks like there is no..

am i on the right way?

thanks Victor
 
yeah you're right Victor, managed to get a look at the script just now and it looks like the 'onload' action was left there in error, so thanks for pointing it out. I'll change the FAQ FLA accordingly. ;-)

Cheers mate,

dave
dave@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^​
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top