ActiveDen

AS 3.0 Fullscreen Stage Align and Resize

  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • United States
Jerico says
Author

Update
If you would like the background image to scale proportionally add the following code inside the ENTER _FRAME and RESIZE functions.

backgroundMC.scaleX > backgroundMC.scaleY?
backgroundMC.scaleY = backgroundMC.scaleX: 
backgroundMC.scaleX = backgroundMC.scaleY;

3 years ago
  • Has been a member for 2-3 years
  • Bought between 10 and 49 items
  • Australia
floodout says
Purchased

could you do a screen grab of how where exactly you are meant to put this and how the script should then read? cheers

3 years ago
Author
Jerico Jerico replied

It’s very simple, copy the block of code and paste within both of the functions mentioned above. Be proactive man :) try it out

3 years ago
  • Has been a member for 2-3 years
  • Bought between 10 and 49 items
manphoto1 says
Purchased

Hi Jerico, i added the lines you suggest for the background image to scale proportionally; however the image loaded on the page undistorted but with the bottom of the background dissapeared off the page. What did I do wrong and how do I fix this?

3 years ago
Author
Jerico Jerico replied

I don’t think you’ve done anything wrong, this is part of proportional scaling. Play with your browser windows proportions and you’ll see how it works.

3 years ago
  • Has been a member for 2-3 years
  • Bought between 10 and 49 items
zimmes says
Purchased

I send you a question about proportions. You don’t need to answer. it works fine. The loader flashes in the upper left corner thoug. Any reason?

3 years ago
Author
Jerico Jerico replied

Double check the changes you have made. If the original version prior to you making changes doesn’t do that, it must be related to the mods you’ve made.

3 years ago
  • Has been a member for 5-6 years
  • Bought between 10 and 49 items
honolulu1986 says
Purchased

it is possible to have this in as2.0?

2 years ago
Author
Jerico Jerico replied

http://www.activeden.net/user/robwes19

2 years ago
  • Has been a member for 3-4 years
  • Bought between 10 and 49 items
isjam0919 says
Purchased

Great component and simple to use. However, I’ve got a problem when loading a swf and toggling full screen mode. The alignment of the loaded swf, although fine for normal viewing in the browser, doesn’t center when it’s added as a child to centerMC. Any advice on how to handle loaded swf’s into your component?

Thanks!

2 years ago
  • Has been a member for 3-4 years
  • Bought between 10 and 49 items
isjam0919 says
Purchased

To answer my own question, and to help others, I realized after my previous posting that the Loader I created to load the swf needed to be added to the list of objects in the event listener functions. Simply adding a child to an existing movie clip in this component doesn’t mean it will align with the parent movie clip. I’m not fluent in AS3 enough to explain why but the bottom line is I discovered the problem…and it was me!

Once again, this is a great component and simple to use, and working through the code helped me to learn AS3 a little better.

2 years ago
Author
Jerico Jerico replied

Glad you figured it out

2 years ago
  • Has been a member for 4-5 years
  • Bought between 10 and 49 items
SminkyPinky says
Purchased

Hi, Great looking file, however i am having difficulty with the proportional scaling, I have placed the 3 lines of code in frame 2 AS in various places between the ENTER _FRAME and RESIZE functions, but it still stretches the image, please indicate the line numbers these lines of code should be placed. I have tried lines 4,5&6 and 34,35&36. the only other reference i can find to these functions is in the preloader?

really hope to hear from you soon!

Cheers

2 years ago
Author
Jerico Jerico replied

not the preloader, frame 2, after line 53 and 77

2 years ago
  • Has been a member for 4-5 years
  • Bought between 10 and 49 items
SminkyPinky says
Purchased

Hey!

Lines 23, 24 & 25 seem to have done it, however when the background re-sizes it flickers very badly, is there something that can be done about this? thx!

2 years ago
Author
Jerico Jerico replied
place the code beneath both instances of:
backgroundMC.height = stage.stageHeight;
If you do it right there’s no reason for flickering.
2 years ago
  • Has been a member for 4-5 years
  • Bought between 10 and 49 items
SminkyPinky says
Purchased

Hey, there is no line 53 and 77, but I did find the code you noted and paste beneath, lines 23 then line 34 – and it works perfect, thanks!!!!

2 years ago
Author
Jerico Jerico replied

Cool :)

2 years ago
  • Has been a member for 2-3 years
  • Bought between 10 and 49 items
kunstwerk says
Purchased

Hi Jerico, how can i make a center alignment for the background image? current the background is positioned top and left. thanks!

2 years ago
Author
Jerico Jerico replied

file comes as is, sorry.

2 years ago
  • Has been a member for 3-4 years
  • Bought between 10 and 49 items
alain100 says

hi, is it possible to add a movieclip in the center x,y

Thanks

2 years ago
  • Has been a member for 3-4 years
  • Bought between 10 and 49 items
alain100 says
Purchased

ok, I figured it out :)

2 years ago
  • Has been a member for 3-4 years
  • Bought between 10 and 49 items
alain100 says
Purchased

Hi Jerico,

would it be possible to have a movieclip or swf as background instead of bitmap ?

thanks

2 years ago
Author
Jerico Jerico replied

Currently its only setup for an image.

2 years ago
  • Has been a member for 3-4 years
  • Bought between 100 and 499 items
  • Portugal
CarloxFranco says
Purchased

Good night

I am having difficulty with the flash, I do not need and it appears that the TopLeft corner

9 months ago
  • Has been a member for 3-4 years
  • Bought between 100 and 499 items
  • Portugal
CarloxFranco says
Purchased

need support as soon as possible, with great urgency

9 months ago
by
by
by
by
by