-
Thankyou
Yeh tried that and its not quite right so i thought i was doing it wrong, but i'll try again now.
Also when its uploaded it preloads fine but the fade doesn't work, unless when the image is fully loaded then you clickthrough them and its fine....
-
Here is any example of it:
http://www.alastairsopp.co.uk/scale.html
The fade only works after you images have loaded once and you go back through.
At the moment i have crude buttons on it but i would like them ti stay fixed and not scale with the main movie when the window is reszied....
Not sure how.
Thanks
-
Senior Member
To get the nav portion not to scale you'll need to apply a resize function to the background image that excludes the nav. So something like,
PHP Code:
Stage.align = "TL"; Stage.scaleMode = "noScale";
sizeListener = new Object(); sizeListener.onResize = function() { trace(Stage.width); trace(Stage.height); picHolder._width = Stage.width; picHolder._height = Stage.height; } Stage.addListener(sizeListener);
This will resize the picHolder mc only. Mind you, the proportions to your bitmaps could be distorted depending on the size of the browser window.
And I have no idea if this is mx compliant. Not too competent with pre Flash 8 code. HTH.
Wile E. Coyote - "Clear as mud?"
-
Senior Member
OK, figured out how to keep the proportions the same no matter the size of the window, equates to no skewing. Just replace the onResize function and add the function setBackground();. Again, I'm not sure if this is compliant to Flash MX, but at least it's worth a shot.
PHP Code:
sizeListener.onResize = function() { setBackground(); }
function setBackground() { var startX = 0; var startY = 0; picHolder._x = startX; picHolder._y = startY; picHolder._width = Stage.width; picHolder._height = Stage.height; picHolder._xscale > picHolder._yscale ? picHolder._yscale = picHolder._xscale : picHolder._xscale = picHolder._yscale; }
Wile E. Coyote - "Clear as mud?"
-
Thanks Robb.
Nothing happens when i resize the window with that code....
-
Originally Posted by Robb@exo
OK, figured out how to keep the proportions the same no matter the size of the window, equates to no skewing. Just replace the onResize function and add the function setBackground();. Again, I'm not sure if this is compliant to Flash MX, but at least it's worth a shot.
PHP Code:
sizeListener.onResize = function() {
setBackground();
}
function setBackground() {
var startX = 0;
var startY = 0;
picHolder._x = startX;
picHolder._y = startY;
picHolder._width = Stage.width;
picHolder._height = Stage.height;
picHolder._xscale > picHolder._yscale ? picHolder._yscale = picHolder._xscale : picHolder._xscale = picHolder._yscale;
}
Hi
I'm not sure how to change this code so that it works.
If i have cs3 will it?
As i might get it soon.
Many Thanks
-
Senior Member
Yeah it works under cs3 - as2... that's what I have.
Wile E. Coyote - "Clear as mud?"
-
Senior Member
Look as this swf, hopefully it will work for you. Just put it in the folder where your main swf resides (I think it's your root directory).
Last edited by Robb@exo; 07-31-2009 at 08:14 AM.
Wile E. Coyote - "Clear as mud?"
-
Wow thanks!
It works great!
Could you give me the .fla file or would i not be able to edit it as i want to make a couple of tweaks.
Thanks again
-
Senior Member
The fla file is currently in a version 8 format, so I doubt you'll be able to edit anything with a mx version. And my computer with Flash MX 2004 is out of commission at the moment, so I can't resave it to a legacy version.
Wile E. Coyote - "Clear as mud?"
-
I have access to cs3 at the moment so that would work yes?
-
Senior Member
Last edited by Robb@exo; 07-31-2009 at 08:14 AM.
Wile E. Coyote - "Clear as mud?"
-
Wow thanks for all your help!
It works great!!!
I was wondering though. Would it be hard to have a list and when one is clicked it loads an image into the picHolder
-
Senior Member
Rather than the NEXT and PREV buttons? If so, then no, you could set it up in a similar manner. But rather the pics being called via a numeric variable, you just assign which button loads which image.
Wile E. Coyote - "Clear as mud?"
-
Yeh do away with the next/prev and have a list of maybe 10 projects i have.
Then when one clicked it loads into the picHolder behind.
So the text is still overlayed.
I guess i need to change this bit?
Code:
var pathToPics= "images/";
var pArray = ["0.jpg", "1.jpg", "2.jpg", "3.jpg", "4.jpg", "5.jpg", "6.jpg", "7.jpg" ];
var pIndex = 0;
var fadeSpeed = 10;
var total = pArray.length;
var p = 0;
loadMovie(pathToPics+pArray[0], picHolder);
this.onEnterFrame = function() {
filesize = Math.round(picHolder.getBytesTotal());
loaded = Math.round(picHolder.getBytesLoaded());
preloader._visible = true;
if (loaded < filesize) {
preloader._xscale = 100 * loaded / filesize;
} else {
preloader._visible = false;
if (picHolder._alpha < 100) {
picHolder._alpha += 10;
}
}
};
Not sure how.
No dramas if not, its great as it is.
Just a thought
-
Originally Posted by Robb@exo
But rather the pics being called via a numeric variable, you just assign which button loads which image.
Could you help me with this bit?
-
Also im trying to change the position of the picHolder.
At the moment its set to x and y = 0
Is there any way to have it set to 'LM' ?
As that helps lots with centering the image so that bottom isn't chopped off in widescreen monitor/browser setups.
Thanks
-
Senior Member
Wile E. Coyote - "Clear as mud?"
-
Senior Member
Here's a new file with a list style nav. It's a F[8] version not MX, didn't have time to figure it out.
Last edited by Robb@exo; 03-01-2010 at 11:41 AM.
Wile E. Coyote - "Clear as mud?"
-
Wow thanks.
I love that list of projects.
When the window is dragged in the quality degrades quite a bit though....
Is there a way of setting it position to 'L' and not '0'?
Code:
function setBackground() {
var startX = 0;
var startY = 0;
picHolder._x = startX;
picHolder._y = startY;
picHolder._width = Stage.width;
picHolder._height = Stage.height;
picHolder._xscale > picHolder._yscale ? picHolder._yscale = picHolder._xscale : picHolder._xscale = picHolder._yscale;
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|