whole site scroll
- Started
- Last post
- 12 Responses
- Buckyball2
If I wanted to do something similar to the page scrolling you see here in Flash:
How would I achieve that? Want to make a site go just up and down vertically when menu buttons are clicked.
Thanks,
bB
- imakedesign0
use stage.height in your AS tweens.
- Buckyball20
not the most code saavy so you might have to elaborate on that.
thanks
- imakedesign0
ok something like
scroll_btn.onRelease = function () {
scroll_mc._x=stage.height+30
}
and use what every easing code you use to make it smooth.
- jevad0
black magic
- UndoUndo0
not again
- smoothblend0
http://chattanoogadesigns.com/AS…
If you need help email me. You probaly will. I set it up for quick notes for work. I can't even understand it.
Just make one big Movie clip and place the code(in another movieclip) seen on the site clip on another layer...then call it from a button.(bottom)
- Buckyball20
thanks imake.
- imakedesign0
sorry i meant scroll_mc._y
and whatever.
my head hurts.
- Buckyball20
So this is where I am:
http://adrenalineshot.com/ADREN_…
Now the question is, after I've hit a button and scrolled down the page, what do I put on a button (script wise) to go backwards/up the page. I know there isn't any "Play movie backwards" command. Right now I just have it returning to the "stop" point on that frame.
Thanks,
bB
- lvl_130
you could just use this. i've been using it for a long while (you can just put it in a function as well but i'm too lazy to dig that up) and this is a really easy way to call this stuff...
on your big mc put this code:
onClipEvent (load) {
change speed to determine how fast it gets from orig. to new
speed = 4;
}
onClipEvent (enterFrame) {
//x position
_x += (_parent.xmark-_x)/speed;
//y position
_y += (_parent.ymark-_y)/speed;
// x scale
_xscale += (_parent.xsmark-_xscale)/speed;
//y scale
_yscale += (_parent.ysmark-_yscale)/speed;
//rotation
_rotation += (_parent.rmark-_rotation)/speed;
_alpha += (_parent.amark-_alpha)/speed;
}place this code on your button (oh and just for example sake i also instance named your main big mc to 'main':
on (release){
main.xmarck=300;
main.ymark=200;
main.amark=70;
main.rmark=45;
}
- lvl_130
oh and to have the movie play 'backwards' as you said you just need to change the code on your other buttons to reflect that. so i guess for you you just need to change the ymark on each button to a new coordinate.
ie:
button 1
on (release){
main.ymark=200;
}button 2
on (release){
main.ymark=600;
}
- Buckyball20
thanks lvl. I'll look into this. But for now, beer calls. :-)