Go Back   kirupaForum > Flash > Flash 8 (and earlier)

Reply
 
Thread Tools Display Modes
Old 06-18-2007, 12:33 AM   #1
RndmIND
x Fortitudine Vincimus x
HOW IS THIS DONE - Dynamic Layout

I've been looking for months about how to do this. I've looked all over these forums, through all of the books I could find, but I've never found out how to do this.

I need to make a full flash website that has multiple elements that anchor to specific corners while having the main content in the middle stay centered.

Best Example::
http://www.drawingart.org/#/home

- The content in the middle is always centered, no matter how big the screen
- The menu bar locks to the bottom of the screen and stretches to fill the screen
- The Icons on the side of the pages are locked to the Top Left, Middle Left, and Bottom Left, as well as the Top Right, Middle Right, and Bottom right

I've figured out how to make ONE object anchor by telling the Stage to = TL, CC, TR, ect. but I have multiple things that need to anchor to different areas...

I need to know how to do this, and no one on here seems to know how, nor do I know a way to figure this out.

Anyone know?

- Shea
RndmIND is offline   Reply With Quote

Sponsored Links (Guests Only) - Register | Need Help?
 

Old 06-18-2007, 12:45 AM   #2
FizixMan
Registered User
 
FizixMan's Avatar
This should get you started after your months of research and reading.

How to make a fullscreen flash:
http://www.kirupa.com/developer/mx2004/fullscreen.htm


How to detect screen size changes so you can resize/reposition the elements in your layout:
http://livedocs.adobe.com/flash/mx20...=00001695.html
FizixMan is offline   Reply With Quote
Old 06-18-2007, 12:45 AM   #3
zao
Ga-dunk-ga-dunk-dunk
 
zao's Avatar
Location Chicago, IL

Posts 981
Looks to me he is using mc_tween, then he is just using basic scripting telling the MC that if the screen is adjusted, to move to the center again.

ActionScript Code:
#include "mc_tween2.as"
var stageCenter:Object = new Object();
stageCenter.onResize = function() {
    contentMC.tween("_x", Stage.width/2, 3.5);
    contentMC.tween("_y", Stage.height/2, 3.5);
};
Stage.addListener(stageCenter);


That combined with full-browser flash support, makes it work.

__________________
Signature
zao is offline   Reply With Quote
Old 06-18-2007, 02:39 AM   #4
RndmIND
x Fortitudine Vincimus x
zao, i think that is what ive been missing, though im not sure, ill try it and get post my findings. thanks guys.
RndmIND is offline   Reply With Quote
Old 06-18-2007, 04:08 AM   #5
MLaZz
do ActionScript not drugs
Location Ljubljana, Slovenia, EU

Posts 123
here.. i was trying this out myself few weeks ago.. here is my .fla of my test movie.

it has header, footer, left and right side that follow the border of browser.

MLaZz
Attached Files
File Type: fla resizeTest.fla (68.0 KB, 264 views)
MLaZz is offline   Reply With Quote
Old 06-30-2007, 06:44 AM   #6
aamirbhatti
Registered User
Please provide tutorial

Nice and great work. Please, can you provide tutorial for this

Quote:
Originally Posted by MLaZz View Post
here.. i was trying this out myself few weeks ago.. here is my .fla of my test movie.

it has header, footer, left and right side that follow the border of browser.

MLaZz
aamirbhatti is offline   Reply With Quote
Old 06-30-2007, 06:45 AM   #7
aamirbhatti
Registered User
Nice and great work Malz please provide tutorial for this
aamirbhatti is offline   Reply With Quote
Old 06-30-2007, 06:52 AM   #8
aamirbhatti
Registered User
Nice and great work MLaZz. i was also looking for this work since two months. Please can you provide tutorial for this. or step wise methods how to do this
aamirbhatti is offline   Reply With Quote
Old 06-30-2007, 10:56 AM   #9
prg9
Registered User
Quote:
Originally Posted by aamirbhatti View Post
Nice and great work MLaZz. i was also looking for this work since two months. Please can you provide tutorial for this. or step wise methods how to do this
You might try looking over these threads:
Simple Stage Manager - Source + Tutorial
Full Screen in FLASH - Tutorials Listed
Full Browser Images - Source + Info (long thread, read through it)

If you need more just Google. Hope those help you.
prg9 is offline   Reply With Quote
Old 06-30-2007, 02:02 PM   #10
mattsaintg
Registered User

Heres and example of what you were looking for.

This file contains 5 movieclips, each of which are positioned according to the stage width and height. A listener is set to watch for stage resizes and calls the function to reposition the movieclips. The center movie clip uses the tween class (MC tween or Laco) to center, giving a nice easing effect.

If you want this to work fullscreen, just be sure to set the width and height of the .swf to 100%.

Hope this helps.

// Matt
Attached Files
File Type: fla aligner.fla (60.0 KB, 158 views)

__________________
c03ur
mattsaintg is offline   Reply With Quote
Old 07-01-2007, 04:04 AM   #11
aamirbhatti
Registered User
Dear when i run this file error comes. Error opening include file lmc_tween.as: File not found.
#include "lmc_tween.as"

Quote:
Originally Posted by mattsaintg View Post
Heres and example of what you were looking for.

This file contains 5 movieclips, each of which are positioned according to the stage width and height. A listener is set to watch for stage resizes and calls the function to reposition the movieclips. The center movie clip uses the tween class (MC tween or Laco) to center, giving a nice easing effect.

If you want this to work fullscreen, just be sure to set the width and height of the .swf to 100%.

Hope this helps.

// Matt
aamirbhatti is offline   Reply With Quote
Old 07-01-2007, 04:05 AM   #12
aamirbhatti
Registered User
Thanks prg9. realy thanks

Quote:
Originally Posted by prg9 View Post
You might try looking over these threads:
Simple Stage Manager - Source + Tutorial
Full Screen in FLASH - Tutorials Listed
Full Browser Images - Source + Info (long thread, read through it)

If you need more just Google. Hope those help you.
aamirbhatti is offline   Reply With Quote
Old 10-06-2007, 04:55 PM   #13
AvanteWD
AvanteWebDesign.com
You Are Awesome!

Quote:
Originally Posted by MLaZz View Post
here.. i was trying this out myself few weeks ago.. here is my .fla of my test movie.

it has header, footer, left and right side that follow the border of browser.

MLaZz
Thanks MLaZz. That file was exactly what I needed! You rock!
AvanteWD is offline   Reply With Quote
Old 11-23-2007, 07:41 PM   #14
KDS
hOsTE.L tRAiL
 
KDS's Avatar
Location Walden Road, Chislehurst, Kent

Posts 65
how to make it smooth

Quote:
Originally Posted by MLaZz View Post
here.. i was trying this out myself few weeks ago.. here is my .fla of my test movie.

it has header, footer, left and right side that follow the border of browser.

MLaZz


In http://www.drawingart.org/#/home when you change the size of your browser screen by
maximize and minimize. you can notice the content are moved smoother (smooth).

how to make this?

thx friend

__________________

Knowing the tools doesn't give you credit, the skill is knowing the best way to use them.
KDS is offline   Reply With Quote
Old 11-24-2007, 07:20 PM   #15
KDS
hOsTE.L tRAiL
 
KDS's Avatar
Location Walden Road, Chislehurst, Kent

Posts 65
any one!

__________________

Knowing the tools doesn't give you credit, the skill is knowing the best way to use them.
KDS is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:12 PM.

SUPPORTERS:

kirupa.com's fast and reliable hosting provided by Media Temple. flash components
Creative web apps. Make your own free flash banners and photo slideshows.
Check out the great, high-quality flash extensions. Buy or sell stock flash, video, audio and fonts for as little as 50 cents at FlashDen.

Flash Transition Effects

Flash Effect Tutorials

Digicrafts Components
Flash effects. Art without coding. Upload, publish, deliver. Secure hosting for your professional or academic video, presentations & more. Screencast.com
Streamsolutions Content Delivery Networks Flipping Book - page flip flash component.
Flash-Gallery.com - Get your flash photo gallery (flash component or swf gallery Learn how to advertise on kirupa.com
 

cdn
content delivery network (cdn)

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd. Copyright 2010 - kirupa.com Copyright 2010 - kirupa.com