vertical scroll
by bogdan Oancea
on
Jul 23, 2008 at 7:42:47 pm
I was wondering if you could help me with a tutorial. I want to create this effect http://www.oman3d.com/tutorials/flash/imagegallery/ . I want to create a menu with text and picture, about the size of those thumbnails. But i want tot create the effect on vertical. so the scroll of the menu is on vertical.
Re: vertical scroll by Pieter Helsen on Jul 23, 2008 at 7:46:58 pm
Change _x for _y and _width for _height...?
Kind regards,
Pieter
General notice: from now on, I would like to ask everyone to put [AS2] or [AS3] (corresponding to the version of actionscript you are using on your project) in front of their post titles when the question is actionscript related! Please help us help you faster. Thank you.
Re: vertical scroll by bogdan Oancea on Jul 23, 2008 at 7:51:33 pm
i tried that, it worked, but the scroll would not stop, i mean the buttons keep going down or up. they dont stop when they ar at the end like in that minisliding. all the buttons dissapear, the eather go totally up or down
Re: vertical scroll by Pieter Helsen on Jul 23, 2008 at 8:03:31 pm
container.onEnterFrame = function() {
if (scrolling) {
this._y += Math.cos((-_root._ymouse/Stage.height)*Math.PI)*15;
if (this._y>0) {
this._y = 0;
}
if (-this._y>(this._height-Stage.height)) {
this._y = -(this._height-Stage.height);
}
}
};
Clearly you missed on. It works for me.
Kind regards,
Pieter
General notice: from now on, I would like to ask everyone to put [AS2] or [AS3] (corresponding to the version of actionscript you are using on your project) in front of their post titles when the question is actionscript related! Please help us help you faster. Thank you.
Re: vertical scroll by bogdan Oancea on Jul 23, 2008 at 8:51:25 pm
yeah it's true, my fault but i still get a little "bug". I have 4 buttons, and i want them to be one unde another. the problem is that the first 3 are one under another, but the last one is at about 20px away from the last button. and i want to make the button to redirect the user that clickes it to another page. not like in the tutorial make the picure on the hole page.
This is the part that makes the button bigger.
Replace that with a getURL command to go to another page.
Kind regards,
Pieter
General notice: from now on, I would like to ask everyone to put [AS2] or [AS3] (corresponding to the version of actionscript you are using on your project) in front of their post titles when the question is actionscript related! Please help us help you faster. Thank you.
Re: vertical scroll by Pieter Helsen on Jul 24, 2008 at 11:28:55 am
Add what's in bold
this.createEmptyMovieClip("container",1);
var imagesNumber:Number = 9;
var urlArray:Array = new Array("http://www.tutorial5.com", "http://www.google.com");
myThumb_mc = container["thumb"+i+"_mc"];
// This adds a variable to the movieclip.
// That variable (_url) contains the URL from the array above.
myThumb_mc._url = urlArray[i];
myThumb_mc._y = (i-1)*myThumb_mc._width;
myThumb_mc._x = (Stage.height-myThumb_mc._height)/2
General notice: from now on, I would like to ask everyone to put [AS2] or [AS3] (corresponding to the version of actionscript you are using on your project) in front of their post titles when the question is actionscript related! Please help us help you faster. Thank you.
Re: vertical scroll by bogdan Oancea on Jul 24, 2008 at 11:23:07 pm
pls help me on this. it's the last thing i need :D just to know how to give each button an individual page to access
this is the code this far:
this.createEmptyMovieClip("container",1);
var imagesNumber:Number = 10;
var urlArray:Array = new Array("www.hi5.com", "www.google.com");
for (i=1; i<=imagesNumber; i++) {
container.attachMovie("thumb"+i,"thumb"+i+"_mc",i);
myThumb_mc = container["thumb"+i+"_mc"];
// This adds a variable to the movieclip.
// That variable (_url) contains the URL from the array above.
i tried putting instead of getURL(this._url, "_blank"); i put getURL(this._www.google.com, "_blank"); and this too getURL(www.google.com, "_blank"); it did not work and also i duplicated from myTbumb_mc.onRelease with myThumb1.. did not work
var imagesNumber:Number = 10;
var urlArray:Array = new Array("", "http://www.firstPage.com", "http://www.secondPage.com", "http://www.andSoOn.com");
for (i=1; i<=imagesNumber; i++) {
container.attachMovie("thumb"+i,"thumb"+i+"_mc",i);
myThumb_mc = container["thumb"+i+"_mc"];
// This adds a variable to the movieclip.
// That variable (_url) contains the URL from the array above.
myThumb_mc._link = urlArray[i];
myThumb_mc._y = (i-1)*myThumb_mc._height;
myThumb_mc._x = (Stage.width-myThumb_mc._width)/2;
myThumb_mc.onRelease = function() {
getURL(this._link);
};
}
General notice: from now on, I would like to ask everyone to put [AS2] or [AS3] (corresponding to the version of actionscript you are using on your project) in front of their post titles when the question is actionscript related! Please help us help you faster. Thank you.
Re: vertical scroll by bogdan Oancea on Jul 25, 2008 at 12:11:00 am
and "var urlArray:Array = new Array("", "http://www.firstPage.com", "http://www.secondPage.com", "http://www.andSoOn.com");"
i put the url in the order of the buttons, i mean if the first button is home, i put in new Array "home.html first right, and so on.. if contact is the 4-th i put the contact.html the 4-th??
Re: vertical scroll by Pieter Helsen on Jul 25, 2008 at 12:14:23 am
Yup, pretty much :p
Kind regards,
Pieter
General notice: from now on, I would like to ask everyone to put [AS2] or [AS3] (corresponding to the version of actionscript you are using on your project) in front of their post titles when the question is actionscript related! Please help us help you faster. Thank you.
Re: vertical scroll by bogdan Oancea on Jul 25, 2008 at 12:18:24 am
thx you really know you're AS :P could you recommand me a learning tutorial or a book or something, i sawu began u're flash at the age of 15... i am 17 and i want to learn flash php and html. I know the basic of html and php .... flash=0 :P so could you tell me, give me an advice on how toget better at them??.... anywhoom.. thanks a bunch >:D<
As far as PHP goes, it's a pretty easy language with an awesome help website. (www.php.net) Getting the hang of PHP shouldn't be too hard.
Kind regards,
Pieter
General notice: from now on, I would like to ask everyone to put [AS2] or [AS3] (corresponding to the version of actionscript you are using on your project) in front of their post titles when the question is actionscript related! Please help us help you faster. Thank you.
Re: vertical scroll by bogdan Oancea on Jul 25, 2008 at 1:11:40 am
oke so this is killing me :) the first link i put is index.html and the secont a gif picture like this
new Array("index.html", "image.gif");
and it gives me this message
Not Found
The requested URL /x/undefined was not found on this server.
in x folder is located index.html .. i've also tried to put the link like this "./index.html" doesn't work at all
Re: vertical scroll by Pieter Helsen on Jul 25, 2008 at 1:15:15 am
Arrays start counting at 0, your for loop starts counting at 1, that's why I put an empty value as the first value of the array.
new Array("", "index.html", "image.gif", ...);
Kind regards,
Pieter
General notice: from now on, I would like to ask everyone to put [AS2] or [AS3] (corresponding to the version of actionscript you are using on your project) in front of their post titles when the question is actionscript related! Please help us help you faster. Thank you.