thekok
April 18th, 2003, 07:43 PM
Still here asking x help.
Hi everyone,
I got some problems with the dimension of a series of pics that are suppose to slide.
Some details:
Simple layout, Stage size 400w X 300h
45 x 400 bottom bar for 14 buttons ( so r the pics)
400 x 255 usable space to slide the pics
every button has an action like that:
on (release) {
_root.controller.targXpos2 = 1500;
}
the last number, the x position make me going crazy, I know it should be easy but I can handle 14 pics moving around x the stage ( 5230 pixel width )
---------Actions x the controller: -----------
onClipEvent (enterFrame) {
setProperty(_root.bar, _x, cX-(difX/14));
cX2 = _root.content._x;
difX2 = cX2-targXpos2;
setProperty(_root.content, _x, cX2-(difX2/14));
}
onClipEvent (load) {
targXpos = 65;
targXpos2 = 2615;
}
Does any one can help me understand how i can calculate the right number for every button so all the pics will be showed centered.
glad to give u more details if u need.
There is also a bar following the mouse over the button but i will take it away.
sorry if all this sound stupid but i am quite new to AS .
good Easter:pope:
Hi everyone,
I got some problems with the dimension of a series of pics that are suppose to slide.
Some details:
Simple layout, Stage size 400w X 300h
45 x 400 bottom bar for 14 buttons ( so r the pics)
400 x 255 usable space to slide the pics
every button has an action like that:
on (release) {
_root.controller.targXpos2 = 1500;
}
the last number, the x position make me going crazy, I know it should be easy but I can handle 14 pics moving around x the stage ( 5230 pixel width )
---------Actions x the controller: -----------
onClipEvent (enterFrame) {
setProperty(_root.bar, _x, cX-(difX/14));
cX2 = _root.content._x;
difX2 = cX2-targXpos2;
setProperty(_root.content, _x, cX2-(difX2/14));
}
onClipEvent (load) {
targXpos = 65;
targXpos2 = 2615;
}
Does any one can help me understand how i can calculate the right number for every button so all the pics will be showed centered.
glad to give u more details if u need.
There is also a bar following the mouse over the button but i will take it away.
sorry if all this sound stupid but i am quite new to AS .
good Easter:pope: