Flash Games

 FAQ   Search   Members   Groups   User Control Panel      Login 

It is currently Wed Dec 03, 2008 12:12 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: resizeListener HELP!
PostPosted: Thu May 03, 2007 9:37 pm 
Offline

Joined: Thu May 03, 2007 9:17 pm
Posts: 1
First off, I would like to say that I am relatively new with action script, so this problem is probably something very simple that I have just overlooked with my novice-ness.

I have implemented this tutorial...
http://www.fireflytutorials.com/flash-tutorials/fullscreen-flash-movie/index
into my flash design which is a set of scrolling images at the top of my site with a white gradient mask on each side.

I stretched the flash file without warping using the tutorials' techniques, linking the left and right gradients to each side.

I then added the "var resizeListener..." so that the objects would stay on the edges of the window if it gets resized without having to refresh the page.

This is where i ran into my problem. The objects load on the edge of the window, but the flash file stays just as wide as it was loaded, no sticking to the edges...

Code:
// positions objects to window edge //
Stage.scaleMode = "noScale";

var HPositioner:Number = (Math.round((Stage.width - 820) / 2));

function gradAlign () {
setProperty(rightGrad_mc, _x, (820 + HPositioner) - 0);
setProperty(leftSnap_mc, _x, 0 - HPositioner);
}

gradAlign();

// refreshes values on window resize //
var resizeListener:Object = new Object();
Window.addListener(resizeListener);

resizeListener.onResize = function () {
     gradAlign();
};


Any help would be GREATLY appreciated. Thank you :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group - Flash Games
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums.
Click here to Register

If you are a current member here on DEVPPL, please login below:

User:
Pass:
Log me on automatically each visit: