Graphic Design Forum and Web Design Forum  

Go Back   Graphic Design Forum and Web Design Forum »Web Design Forum »Flash Forum

Notices

Flash Forum Flash Design and Actionscript Forum


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 15-04-2008, 03:48 PM
LeadMagnet's Avatar
Mr. Tambourine Man
 
Join Date: Jun 2007
Location: Ireland
Posts: 1,081
Default Fullscreen flash resource

Hey there everybody.
I thought i'd be generous here and make a little template people can use and learn from.

I just knocked up this thing here really quick showing how to position elements relative to the edge of a user's browser window.
  • The stage is the green rectangle in the center, the grey is the background colour of the flash movie.
  • Arrows touch the screen's edge
  • figures show the window width and height
  • The red dot just flashes to indicate the framerate of the movie (as you can see while resizing in firefox, flash movies are frozen, which is why the arrows and figures don't re-adjust until you stop resizing. Not a big deal really though.
I'm using SWFObject for this because it's so damn snazzy. Download the resources here (as well as the HTML file above):
http://blog.deconcept.com/swfobject/swfobject.zip
*edit - Update* Sample page here
Download the files here */edit*


So anyway, this is really basic and i haven't done much with it yet, i thought it might be a good idea to get a bit of feedback from you ladies and gents first. Primarily any feature requests really.
I intend to keep this script freely available.
*edit* Oh, i intend to add in some easily modifiable script for scrolling. Lack of a scrollbar is a really common problem within flash and it shouldn't be.
__________________
Subtlety is my middle name... and first and last in case you didn't get the point.

Last edited by LeadMagnet; 16-04-2008 at 09:23 PM. Reason: updated version
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!RSS Share on Facebook Share This Article & VoteForum Netvibes Page
Reply With Quote
  #2 (permalink)  
Old 15-04-2008, 04:52 PM
Toon's Avatar
Netvibes is an Addiction™
 
Join Date: Jan 2007
Location: Sheffield, UK
Posts: 15,724
Default

Great Stuff
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!RSS Share on Facebook Share This Article & VoteForum Netvibes Page
Reply With Quote
  #3 (permalink)  
Old 15-04-2008, 05:29 PM
jeffross's Avatar
Command Z aficionado
 
Join Date: Mar 2008
Location: Boise, Idaho, USA
Posts: 277
Default

Wow! Very cool. Actionscript is just not one of my stronger points with Flash. Would you be able to add some comments in the code to give hints on what each line does?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!RSS Share on Facebook Share This Article & VoteForum Netvibes Page
Reply With Quote
  #4 (permalink)  
Old 15-04-2008, 07:31 PM
LeadMagnet's Avatar
Mr. Tambourine Man
 
Join Date: Jun 2007
Location: Ireland
Posts: 1,081
Default

Absolutely.
Like i said though, looking for some ideas for features to add first before i update it again.
I'll probably create an object class for positioning purposes, whereby the designer can flick some switches and give objects positions relative to set points in the movieclip such as the corners, the middle of the edges, center of the page.
If i'm feeling REALLY energetic i might try to code in some positioning and size styling rules similar to what css does.
Wouldn't it be nice if you could use a css file to position elements in Flash dynamically? Sure would.
__________________
Subtlety is my middle name... and first and last in case you didn't get the point.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!RSS Share on Facebook Share This Article & VoteForum Netvibes Page
Reply With Quote
  #5 (permalink)  
Old 15-04-2008, 07:33 PM
Mailno's Avatar
Experienced Member
 
Join Date: Aug 2007
Posts: 137
Default

Good work Leadmagnet, makes good sense
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!RSS Share on Facebook Share This Article & VoteForum Netvibes Page
Reply With Quote
  #6 (permalink)  
Old 16-04-2008, 09:22 PM
LeadMagnet's Avatar
Mr. Tambourine Man
 
Join Date: Jun 2007
Location: Ireland
Posts: 1,081
Default Update

Made a small update. Mainly to make it more user-friendly.
Sample page here
Download the files here

Changes:
  • Split it up and made almost all the actionscript external to keep the FLA clean for users to put their own content in there however they like to.
  • Added a function for simplicity called fs_posit(). Copy the sample in edit_me.as
    • fs_posit accepts 5 variables:
      • Y-position; X-position; target; X-offset(optional); Y-offset(optional)
      • Y-position is a vertical position. Accepts the values "top", "center" and "bottom".
      • X-position is a horizontal position. Accepts the values "left", "center" and "right".
      • target is the name of the instance you want to position.
      • X-offset offsets the position by whatever amount you specify (negative values offset to the left, positive to the right). Accepts pixel values or percentages of the total screen width (percentages must be written as Strings. i.e. in quotation marks).
      • Y-offset offsets the position by whatever amount you specify (negative values offset upwards, positive downwards). Accepts pixel values or percentages of the total screen width (percentages must be written as Strings. i.e. in quotation marks).
  • originalheight and originalwidth variables must be set to your movie's stage height and width, even though the movie will resize in your browser. Necessary for script calculations.
  • Positions will now update while resizing the browser window in Firefox.
  • If you have any other code you want to run when the browser is resized, place it within the resizer() function in edit_me.as
Any questions?
Still accepting feature requests.
__________________
Subtlety is my middle name... and first and last in case you didn't get the point.

Last edited by LeadMagnet; 16-04-2008 at 09:27 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!RSS Share on Facebook Share This Article & VoteForum Netvibes Page
Reply With Quote
  #7 (permalink)  
Old 17-04-2008, 01:38 AM
LeadMagnet's Avatar
Mr. Tambourine Man
 
Join Date: Jun 2007
Location: Ireland
Posts: 1,081
Default

Made another update cause i was bored.
Lots more stuff added, but some of it's incomplete so i won't upload the source yet.
View the progress here: FS_script sample page

Anybody reading this? Anybody care? lol
__________________
Subtlety is my middle name... and first and last in case you didn't get the point.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!RSS Share on Facebook Share This Article & VoteForum Netvibes Page
Reply With Quote
  #8 (permalink)  
Old 17-04-2008, 06:33 PM
jeffross's Avatar
Command Z aficionado
 
Join Date: Mar 2008
Location: Boise, Idaho, USA
Posts: 277
Default

I'm still checking in!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!RSS Share on Facebook Share This Article & VoteForum Netvibes Page
Reply With Quote
Reply


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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Resource: Best Brands of the World Graphic Design Links Graphic Design Links 0 23-03-2008 11:30 AM
Great free resource site vanthudz General Web Design Forum 0 09-03-2008 04:11 AM
Fawnt - Font Resource Centre Toon Typography Forum 3 17-12-2007 01:47 PM
Vector Resource Mack Graphic Design Forum 5 19-05-2007 08:19 PM
Resource Bridge Graphic Design Cwilk Design Forum Employment 0 18-04-2007 05:14 PM


All times are GMT. The time now is 06:37 AM.



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC5