Be careful with window.onresize! I think dynapi used
this event for window resizing functions.
It's best to use the onresize event listener on
dynapi.document inside of using window.onresize
--
Raymond Irving
--- Michael Bystrom <[EMAIL PROTECTED]>
wrote:
>
> Yep anchor will do it, but this is how I do it.
> Layer with regards to document size.
>
> middle = dynapi.document.addChild( new
> DynLayer("",0,0,500,500) )
>
> resizeLayer = function () {
> var w = dynapi.document.getWidth()/2 -
> middle.getWidth()/2
> var h = dynapi.document.getHeight()/2 -
> middle.getHeight()/2
> middle.setLocation(w,h)
> }
>
> window.onresize = function () { resizeLayer() }
>
> Cheers
> Michael
>
>
> Note:
> If you have not done it you have to remove the if
> statement in getWith() and
> height inside the dyndocument.js otherwise dynapi
> does not get the new
> document size.
>
> p.getWidth = function() {
> //if (!this.w)
> this.findDimensions();
> return this.w;
> };
> p.getHeight = function() {
> //if (!this.h)
> this.findDimensions();
> return this.h;
> };
>
>
>
>
>
>
>
> Den 03-10-25 08.29, skrev "C Kissinger"
> <[EMAIL PROTECTED]>:
>
> > I know I've seen
> mydynlayer.setAnchor({centerH:left,centerV:top})
> used
> > somewhere.
> > I'm not exactly sure yet how to use anchors, but I
> hope this helps.
> >
> > Christopher Kissinger
> > Web Development Consultant
> >
> >
> >>>> -----Original Message-----
> >>>> From: [EMAIL PROTECTED]
> >>>>
> [mailto:[EMAIL PROTECTED] On
> Behalf
> >>>> Of Daniel Tiru
> >>>> Sent: Friday, October 24, 2003 7:37 PM
> >>>> To: [EMAIL PROTECTED]
> >>>> Subject: [Dynapi-Dev] Anchor
> >>>>
> >>>>
> >>>> Hi!
> >>>>
> >>>> If i have a layer that i need to positioned in
> the middle and it is
> >>>> 500,500 in size how do i do this? If the
> window is bigger
> >>>> the layer will
> >>>> still be in the middle and so on... I am
> stuck..
> >>>>
> >>>> Regards
> >>>> Daniel
>
>
>
>
-------------------------------------------------------
> This SF.net email is sponsored by: The SF.net
> Donation Program.
> Do you like what SourceForge.net is doing for the
> Open
> Source Community? Make a contribution, and help us
> add new
> features and functionality. Click here:
> http://sourceforge.net/donate/
> _______________________________________________
> Dynapi-Dev mailing list
> [EMAIL PROTECTED]
>
http://www.mail-archive.com/[EMAIL PROTECTED]/
__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/
-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community? Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://www.mail-archive.com/[EMAIL PROTECTED]/