Just stumbled across this site:
http://www.refune.com/index_main.html
Does anyone know how they got that really crisp backround image to scale in Flash without pixelation? Been tring to get that down for ages…
Looks awesome.
Just stumbled across this site:
http://www.refune.com/index_main.html
Does anyone know how they got that really crisp backround image to scale in Flash without pixelation? Been tring to get that down for ages…
Looks awesome.
gvozden - Thanks for your tip - Im pretty new to actionscript and couldnt figure out how it was done.
Did some searching and found what I needed.
ActionScript Code:
[FONT=Courier New][LEFT][COLOR=#0000FF]Stage[/COLOR].[COLOR=#0000FF]scaleMode[/COLOR] = [COLOR=#FF0000]"noBorder"[/COLOR];
[COLOR=#000000]var[/COLOR] stageListener = [COLOR=#000000]new[/COLOR] [COLOR=#0000FF]Object[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#0000FF]Stage[/COLOR].[COLOR=#0000FF]addListener[/COLOR]COLOR=#000000[/COLOR];
stageListener.[COLOR=#0000FF]onResize[/COLOR] = [COLOR=#000000]function[/COLOR] COLOR=#000000[/COLOR][COLOR=#000000]{[/COLOR]
[COLOR=#0000FF]background[/COLOR].[COLOR=#0000FF]_height[/COLOR] = [COLOR=#0000FF]Stage[/COLOR].[COLOR=#0000FF]height[/COLOR];
[COLOR=#0000FF]background[/COLOR].[COLOR=#0000FF]_width[/COLOR] = [COLOR=#0000FF]Stage[/COLOR].[COLOR=#0000FF]width[/COLOR];
[COLOR=#000000]}[/COLOR];
[/LEFT]
[/FONT]
this produces something like the link I posted. Used a 1600x1200 image and same w/h for the stage.
Cheers
Ok so Ive manage to stumble in to another problem now I have the scaling background sorted.
When I attach another movie clip (lets say ‘navigation’) to the stage it gets scaled with the background clip on browser resize.
How do you make this new clip independant of the background so its size stays constant on resize? Like on the http://www.refune.com/index_main.html site
Thanks
Are you sure ‘navigation’ isn’t being loaded into ‘background’? That seems like the problem.
sorry, double post
btw dont forget to set the _quality = “BEST”; for a movie clip with an image in it…makes it scale and animate much smoother w/out aliasing :thumb2:
Also don’t forget (or learn for the first time) that _quality is a global property and changing it for one movie clip will change it for the whole movie
really? ok then…well thats not a bad thing is it?
Depends I guess - If you want everything on the same quality setting then it’s good but if you want some on low and some on high then it isn’t :).
Hey thanks for the tips guys.
In response to BlueNar:
Navigation clip isnt being loaded in ‘background’ - both the Nav and Background clips are on root timeline.
here is what I have -see how the nav scales with the background? I dont want it to scale but keep its position in relation to the browser.
click here for my flashtest
Ive attached my files for you to see - If anyone has time to look and tell me where im going wrong I’d be grateful.
Thanks again.
I’m still not sure exactly how they are doing the resizing. As you shrink your browser window, look carefully. The background image keeps the same width to height proportion which keeps the image nonpixelated. The only thing I can think of is they check to see if the Stage width to height ratio is the same as the image’s (I assume 1.25:1) and if its not, center the image but dont resize it. Hmm
you can learn a lot with swf decompilers :thumb:
Check out this thread Rasper:
:: Copyright KIRUPA 2024 //--