Re: [Flashcoders] Problem with footer fixed to bottom of page
Without posting the errors, I can't tell for sure, but it's possible you didn't declare pubilc var footer_bar:MovieClip at the top of your class? Or, perhaps it's null? On May 21, 2009, at 12:41 PM, Jonathan Wing wrote: This is probably a silly question, but I've searched google and can't seem to find the right answer, which is strange as this is seems to be a common thing on pages. Basically, I have a footer that is fixed to the bottom of a page and for the width of a page, so that no matter what size a user sets a window for, it will always fix to the bottom. This is what I have so far (using AS3): In my .fla, I have a long gray bar with the instance name footer. Then, over in my .as file, I have the following: import flash.display.*; footer.y = stage.stageHeight - footer.height; stage.addEventListener(Event.RESIZE, resizeHandler); public function resizeHandler(e:Event):void { footer.y = stage.stageHeight - footer.height; footer.width = stage.stageWidth; } All of this works without a hitch. However, my problem arises when I want to add text. If I add text in its own mc, then it won't adjust with the page. If I add text inside the footer mc, it will stretch with the width of the page when I resize. So then I thought maybe I could make them two mc's embedded in one main mc, and only define the width for the bar. That is, something like: footer.y = stage.stageHeight - footer.height; footer_bar.width = stage.stageWidth; With footer as the main mc, and footer_bar as the long gray bar embedded inside. However, this results in a mess of errors. Any ideas? This seems so common, I'm surprised I can't find anything via Google. Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com mailto:jw...@cramcrew.com www.cramcrew.com http://www.cramcrew.com/ One Student At A Time The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of the company. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Problem with footer fixed to bottom of page
Hello Jonathan, stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; -- iv http://www.bezier.ru http://bezier.googlecode.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Problem with footer fixed to bottom of page
I suppose it should be: footer.y = stage.stageHeight - footer.height; footer[footer_bar].width = stage.stageWidth; since footer_bar is nested into footer. Kind Regards, Pinatti On Thu, May 21, 2009 at 4:41 PM, Jonathan Wing jw...@cramcrew.com wrote: This is probably a silly question, but I've searched google and can't seem to find the right answer, which is strange as this is seems to be a common thing on pages. Basically, I have a footer that is fixed to the bottom of a page and for the width of a page, so that no matter what size a user sets a window for, it will always fix to the bottom. This is what I have so far (using AS3): In my .fla, I have a long gray bar with the instance name footer. Then, over in my .as file, I have the following: import flash.display.*; footer.y = stage.stageHeight - footer.height; stage.addEventListener(Event.RESIZE, resizeHandler); public function resizeHandler(e:Event):void { footer.y = stage.stageHeight - footer.height; footer.width = stage.stageWidth; } All of this works without a hitch. However, my problem arises when I want to add text. If I add text in its own mc, then it won't adjust with the page. If I add text inside the footer mc, it will stretch with the width of the page when I resize. So then I thought maybe I could make them two mc's embedded in one main mc, and only define the width for the bar. That is, something like: footer.y = stage.stageHeight - footer.height; footer_bar.width = stage.stageWidth; With footer as the main mc, and footer_bar as the long gray bar embedded inside. However, this results in a mess of errors. Any ideas? This seems so common, I'm surprised I can't find anything via Google. Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com mailto:jw...@cramcrew.com www.cramcrew.com http://www.cramcrew.com/ One Student At A Time The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of the company. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Fabio Pinatti :: web.developer www.pinatti.com.br :: 19. 9184.3745 / 3342.1130 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Problem with footer fixed to bottom of page
Thanks Pinatti! That was the problem exactly--nesting not properly defined. Works great now. Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com www.cramcrew.com One Student At A Time -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Fabio Pinatti Sent: Thursday, May 21, 2009 2:53 PM To: Flash Coders List Subject: Re: [Flashcoders] Problem with footer fixed to bottom of page I suppose it should be: footer.y = stage.stageHeight - footer.height; footer[footer_bar].width = stage.stageWidth; since footer_bar is nested into footer. Kind Regards, Pinatti On Thu, May 21, 2009 at 4:41 PM, Jonathan Wing jw...@cramcrew.com wrote: This is probably a silly question, but I've searched google and can't seem to find the right answer, which is strange as this is seems to be a common thing on pages. Basically, I have a footer that is fixed to the bottom of a page and for the width of a page, so that no matter what size a user sets a window for, it will always fix to the bottom. This is what I have so far (using AS3): In my .fla, I have a long gray bar with the instance name footer. Then, over in my .as file, I have the following: import flash.display.*; footer.y = stage.stageHeight - footer.height; stage.addEventListener(Event.RESIZE, resizeHandler); public function resizeHandler(e:Event):void { footer.y = stage.stageHeight - footer.height; footer.width = stage.stageWidth; } All of this works without a hitch. However, my problem arises when I want to add text. If I add text in its own mc, then it won't adjust with the page. If I add text inside the footer mc, it will stretch with the width of the page when I resize. So then I thought maybe I could make them two mc's embedded in one main mc, and only define the width for the bar. That is, something like: footer.y = stage.stageHeight - footer.height; footer_bar.width = stage.stageWidth; With footer as the main mc, and footer_bar as the long gray bar embedded inside. However, this results in a mess of errors. Any ideas? This seems so common, I'm surprised I can't find anything via Google. Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com mailto:jw...@cramcrew.com www.cramcrew.com http://www.cramcrew.com/ One Student At A Time The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of the company. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Fabio Pinatti :: web.developer www.pinatti.com.br :: 19. 9184.3745 / 3342.1130 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of the company. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders