Scrolling Images Horizontally
Hi,I've got a script I'm writing which loads some images from xml, and then attempts to scroll them across the screen horizontally. I've determined that the best way to do this for my purposes is to tween each image individually, rather than adding them to a sprite and scrolling the sprite (while it would be easier, it won't work in my case). So, I have this bit of script that scrolls the images from their initial x position, and moves them to the left, off of the stage. The problem is, of course, the images are all moving different distances, and thus, move at different rates of speed in the tween effect. I've attempted to solve this by proportionally equalizing the distance they need to travel and the speed at which each image travels. My code is below.for(var i=0;i<images.length;i++) { runningWidth = runningWidth+images.largeImage.width; // accumulated width of the imagesnewXlarge = -(runningWidth); // new x position for the imagescrollSpeed:Number = runningWidth/4; // speed of travel in framesimageTween = new Tween(images.largeImage, "x", transitionType, images.largeImage.x, newXlarge,scrollSpeed, false);}This doesn't work however. Images of the same size move at the same speed, but larger or smaller images move slightly faster or slower. I know that this can be done... but... for whatever reason, the math here is escaping me. Any help would be appreciated. ThanksGeoff B
Adobe > ActionScript 3
Posted on: 09/09/2008 08:40:47 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Scrolling Images Horizontally
Hi,
I am looking for some script in flash, which is able to do the following:
I have some images which i just want to scroll horizontally with equal spaces in a specified fps and without any jerking. Is any way ??
Because i tried to do the same by using the simple motion tween, they are moving but also jerking, not in a certain level of perfection. So, i thought it might work best with some scripts.
So, any suggestions or any ideas ???
I am still working on FLash 5
Regards.
Scrolling Images Horizontally
Hi,
I am looking for some script in flash, which is able to do the following:
I have some images which i just want to scroll horizontally with equal spaces in a specified fps and without any jerking. Is any way ??
Because i tried to do the same by using the simple motion tween, they are moving but also jerking, not in a certain level of perfection. So, i thought it might work best with some scripts.
So, any suggestions or any ideas ???
I am still working on FLash 5
Regards.
Scrolling Horizontally
I have managed to program a MC which contain a skyline to move to the right if the cursor is on the far left, and to the left if the cursor is on the far right. The skyline is bigger than the stage, so this effect gives the illusion of movement. However the skyline I want the skyline to stop moving when its left edge reaches the left side of the stage, and again to stop moving when the right edge reaches the right side of the stage. I've tried some simple If formulas, utilising the _x command, but so far they have not worked.
Canm anybody help with a simple suggestion as to what I should do?
Thanks
Scrolling Horizontally A&F Example
Hi I saw this flash player on abercrombie and Fitch's site and wondered how they managed to create it, interested in learning this. Can anyone help me with this.
Heres the link
http://www.abercrombie.com/aftv/inde...005-MAIN-PHOTO
Thankx
Scrolling Horizontally
Hi all,
I'm quite new to flash and actionscript and ran into a problem. I'm creating a flash movie with a horizontal scrolltext. However this text is variable in width. So i'm using textFormat to determine the width of my dynamic text box based on a certain font type. Then through a setInterval (set at 40) i decrease the number of pixels by 2.
Works perfectly, however when I go over some links on the website the setInterval causes the animation to get jerky. If I stop moving my mouse over some links then the animation is smooth again.
So basically my setInterval isn't working for this purpose since the animation gets jerky once I hover over (html/javascript) links.
Then I thought I might do the trick by creating a keyframe at runtime but then again I read somewhere you can't create those at runtime..
So does anyone know a solution for my problem?
Btw my animation runs in Flash 8.
Thanks for any help ....
Scrolling Horizontally
I just made a scroll area with buttons and draggable items. All the code is written for vertical scrolling, the content I need to be scrolled is going to be horizontal. how can I rewrite this code to be horizontal scrolling? it seems like the scroll button (the one you drag along) doesn't stay confined to its scroll line either.
scrolling = function () {
var scrollHeight:Number = scrollTrack._height;
var contentHeight:Number = contentMain._height;
var scrollFaceHeight:Number = scrollFace._height;
var maskHeight:Number = maskedView._height;
var initPosition:Number = scrollFace._y=scrollTrack._y;
var initContentPos:Number = contentMain._y;
var finalContentPos:Number = maskHeight-contentHeight+initContentPos;
var left:Number = scrollTrack._x;
var top:Number = scrollTrack._y;
var right:Number = scrollTrack._x;
var bottom:Number = scrollTrack._height-scrollFaceHeight+scrollTrack._y;
var dy:Number = 0;
var speed:Number = 10;
var moveVal:Number = (contentHeight-maskHeight)/(scrollHeight-scrollFaceHeight);
scrollFace.onPress = function() {
var currPos:Number = this._y;
startDrag(this, false, left, top, right, bottom);
this.onMouseMove = function() {
dy = Math.abs(initPosition-this._y);
contentMain._y = Math.round(dy*-1*moveVal+initContentPos);
};
};
scrollFace.onMouseUp = function() {
stopDrag();
delete this.onMouseMove;
};
btnUp.onPress = function() {
this.onEnterFrame = function() {
if (contentMain._y+speed<maskedView._y) {
if (scrollFace._y<=top) {
scrollFace._y = top;
} else {
scrollFace._y -= speed/moveVal;
}
contentMain._y += speed;
} else {
scrollFace._y = top;
contentMain._y = maskedView._y;
delete this.onEnterFrame;
}
};
};
btnUp.onDragOut = function() {
delete this.onEnterFrame;
};
btnUp.onRollOut = function() {
delete this.onEnterFrame;
};
btnDown.onPress = function() {
this.onEnterFrame = function() {
if (contentMain._y-speed>finalContentPos) {
if (scrollFace._y>=bottom) {
scrollFace._y = bottom;
} else {
scrollFace._y += speed/moveVal;
}
contentMain._y -= speed;
} else {
scrollFace._y = bottom;
contentMain._y = finalContentPos;
delete this.onEnterFrame;
}
};
};
btnDown.onRelease = function() {
delete this.onEnterFrame;
};
btnDown.onDragOut = function() {
delete this.onEnterFrame;
};
if (contentHeight<maskHeight) {
scrollFace._visible = false;
btnUp.enabled = false;
btnDown.enabled = false;
} else {
scrollFace._visible = true;
btnUp.enabled = true;
btnDown.enabled = true;
}
};
scrolling();
I did the tutorial found here.... http://www.kirupa.com/developer/flash8/scrollbar.htm
Scrolling MC Horizontally With Buttons
I'm trying to make a site for my company that has small pictures of our projects that can be scrolled across the screen horizontally. Instead of having a big scroll bar, I just wanted simple little buttons on one side with arrows pointing to either side. I also want to make the pictures buttons that can go to other scenes with the project descriptions.
I've got everything setup within a MC and I have a rectangular mask so the pictures show through, my only problem is the scrolling. I can find tutorials on how to scroll things vertically with a scroll bar, but what I want is to scroll horizontally with buttons. I don't yet know enough about actionscript to manipulate these to suite my needs. Can anyone help? Thanks so much!!
Horizontally Scrolling Text?
Hey does anyone know how to make horizontally scrolling text...I know this link is javascript but this is what I want (made in flash)
http://www.appletcollection.com/ascroll.html
I would also like it to be able to have buttons inside of it like in the example above, but when you scroll your mouse over it I want it to stop...then if you don't click on anything and you scroll out it will continue scrolling. Then the whole thing will loop over and over.
Anything that you can help me with on this issue would be greatly appreciated.
Thanks
Jason
Scrolling Thumbnails Horizontally
I have been through a bunch of tutorials but I can't find one that works. On the main timeline I have button 'left' and button 'right' along with 'imagesMC'. When left or right is pressed I need it to scroll 'imagesMC' left/right. Can someone help? Thanks!
Horizontally Scrolling Movieclips....
I am needing some help with horizontal movie clip movement. I have a flash file that works by itself. The movie clip moves across the screen to the correct spot when you hit the corresponding buttons. But when I try to recreate the action in another flash file, the buttons show, but no movie clip movement. For what ever reason the buttons can no longer talk to the movie clip to move it across the stage.
I have kept everything the same name, kept the actions in the same spot and everything, it just doesn't work.
Does anyone have any idea what could be causing this to happen? I will try and supply more details to anyone who wants to help me with this. It shouldn't be a hard thing to accomplish. If you know of any good tutorials on this I would greatly appreciate it.
Horizontally Scrolling Site
I'm not sure if I can explain this too clearly, but I'm sure many of you will know what I mean. There is a type of flash site design that is quite popular, where all the pages of the site are in one long horizontal strip like so:
[ 1 ][ 2 ][ 3 ][ 4 ][ 5 ]
... and when you select a page from the navigation the site scrolls sideways and stops at the page you want. Do you know what I mean?
My questions are, is there a generic name for this layout/navigation, and does anyone know of a good tutorial that could talk me through it?
Thanks!
[CS3] Horizontally Scrolling MC With Actionscript
First off there is an FLA attached to this for reference.
Here's the breakdown of my project:
I have a Master Movieclip - "blocks mc"
That movieclip contains two instances of a "blocks" movieclip
The "blocks" movieclip contains 4 buttons.
Inside of my main movieclip "blocks mc" there's a timeline where I'm scrolling instances of "blocks1" & "blocks2" from right to left. I made two instances of "blocks" so when the first one scrolls off screen, the second will fill in the area to the right and the scroll will be seamless.
I'm trying to attempt to set this up dynamically with actionscript, instead of doing it with motion tweening on the timeline - the main reason being, I'm going to add more buttons to "blocks mc" and I'd like to somehow make it so that my animation speed will stay the same - based off of the width of "blocks mc" - no matter how many more buttons I add to it.
Here's the catch though - each of the buttons inside of "blocks mc" will have an onRelease getURL command - and I also wanted to set it up so that when you rollover the buttons they stop the parent movieclip and then when you rolloff of the button, the parent movie clips starts back up.
What I'm not sure how to do is how do I get the buttons to work inside of "blocks mc" after I start setting up onEnterFrame commands for "blocks mc"?
If you take a look at and run the attached FLA file, you'll see how I have this setup so far - the animation is setup manually and I'd like to set it up with actionscript and keep my button onRelease, onRollOver & onRollOff functionality in tact.
Any help on this is highly appreciated.
Thanks!
FOO
Scrolling, And Stopping, Horizontally
I've a scroll bar, that controls an MC.
I'm looking for a little assistance with stopping a scrolling MC on either side, so it doesn't scroll right out of view.
The tutorials I've seen are fine, except...all of them are for vertical scrolling.
I'm sure its out there, I just don't have the actionscriping know-how to know the name or scripting for it. Any suggestions?
All I have as of now are my (masked) MC with instance name, and left and right buttons that control it.
Thanks for the help
Scrolling Logos Horizontally
I'm looking to find a tutorial and some information about setting up a small flash piece for a website that, when loaded, will be able to display x-number of logos that are slowly moving from top to bottom in a loop. When the cursor goes over that area it will either move up or down, depending on the location. And obviously, the logos can be clicked for entrance into a different page within the site. I'm a basic flash person (mainly XHTML/CSS developer) with limited scripting knowledge which is why (a) I came here and (b) already searched the web for similar tutorials, but am only finding "text scrolling" applications.
Please advise!
Scrolling An Image Horizontally
I have a JPG image that is 6851 x 632 px. I would like to scroll the image horizontally (I would like to see 1000 x 632 at a time). How can I create a horizontal scroll bar to scroll an image like that?
Any help will be greatly appreciated.
Thank you in advanced,
Scrolling Text Horizontally - HELP
Hi all,
Here comes another tricky (I think at least) question regarding scroll in Flash. I have followed the tutorial (http://www.kirupa.com/developer/mx/dynamic_scroller.htm) for loading text dynamically from a text-file and using the scrollbar component. It works fine. However, what I would like to do instead is to get the text to scroll horizontal instead. This might not be such a tricky thing to do, however, here comes the tricky part. Imagine a HTML-table. For every update I make, another column is added to far most left, and thus the whole table becomes wider. The table has a fixed height and the columns in it have fixed widths. Thus, the newest text will be positioned inside a column to the left, and then the older updates will follow to the right, each in its own comlumn. Is a solution like this (scrolling text horizontally) possible to accomplish in flash (perhaps by using a scroll component and dynamically loading text from a text-file)?
Again, I apologize if there is an answer in the forums to a question such as this one and I haven’t been able to find it. Help is very much appreciated.
Best regards,
Illuminare
Scrolling Text Horizontally - HELP
Hi all,
Here comes another tricky (I think at least) question regarding scroll in Flash. I have followed the tutorial (http://www.kirupa.com/developer/mx/dynamic_scroller.htm) for loading text dynamically from a text-file and using the scrollbar component. It works fine. However, what I would like to do instead is to get the text to scroll horizontal instead. This might not be such a tricky thing to do, however, here comes the tricky part. Imagine a HTML-table. For every update I make, another column is added to far most left, and thus the whole table becomes wider. The table has a fixed height and the columns in it have fixed widths. Thus, the newest text will be positioned inside a column to the left, and then the older updates will follow to the right, each in its own comlumn. Is a solution like this (scrolling text horizontally) possible to accomplish in flash (perhaps by using a scroll component and dynamically loading text from a text-file)?
Again, I apologize if there is an answer in the forums to a question such as this one and I haven’t been able to find it. Help is very much appreciated.
Best regards,
Illuminare
Horizontally Scrolling Text
Hey does anyone know how to make horizontally scrolling text...I know this link is javascript but this is what I want (made in flash)
http://www.appletcollection.com/ascroll.html
I would also like it to be able to have buttons inside of it like in the example above, but when you scroll your mouse over it I want it to stop...then if you don't click on anything and you scroll out it will continue scrolling.
Anything that you can help me with on this issue would be greatly appreciated.
Thanks
Jason
Text Scrolling Horizontally On Curve
I am trying to get my text to move along arc. The effect I'm striving for is like when you type on a guide in Adobe Illustrator. However, my text fragments move like blocks across the guide instead of ALONG it. Does this make sense? Can this be done in Flash and if so, HOW?
Scrolling Image Horizontally N Vertically
i have an image masked in a rectangle.Image is quite big in size than rectangle,i've scrollers vertical and horizontal so that i can scroll the image.Can anybody help me out for the scripting part
thks in advance
Scrolling A Movie Clip Horizontally
I've looked over a good bit of this forum for a script to do this but nothing I've found is what I need to do. I've got a movie clip that I want to scroll horizontally with a mouseover on left and right buttons.
Thanks for help!
Gerry
Horizontally Scrolling HtmlText Problem
O.K., I found a script that scrolls the contents of textbox from right to left, then repeats. This works great, until I add HTML formatting to the text string...
The problem is that Flash seems to get confused and sets the maxHscroll to an incorrect number.
Here's the code that only seems to scroll NON-html text just fine:
Code:
var special = "this is a freakin test. <B>here is some bold text</B>. <I>italics, whew!!!!</i>";
//var special = "this is a freakin test. here is some bold text. italics, whew!!!!";
this.createTextField("scroller_txt", 1, 0, 0, 640, 35);
scroller_txt.spacebuffer = " ";
scroller_txt.border = true;
scroller_txt.speed = 1;
scroller_txt.multiline = true;
scroller_txt.variable = "special";
scroller_txt.spaceSize = scroller_txt.getNewTextFormat().getTextExtent(" ").width;
scroller_txt.spacesRequired = Math.ceil(scroller_txt._width/scroller_txt.spaceSize);
for (var i = 0; i<scroller_txt.spacesRequired; i++) {
scroller_txt.spacebuffer += " ";
}
scroller_txt.html = true;
scroller_txt.htmlText = scroller_txt.spacebuffer+special+scroller_txt.spacebuffer;
scroller_txt.hscrollInterval = function() {
if (this.hscroll == this.maxhscroll) {
this.hscroll = 0;
}
this.hscroll += this.speed;
};
setInterval(scroller_txt, "hscrollInterval", 10);
Try using the above chunk of code, and uncomment the other variable 'special' and see how it scrolls fine, but with HTML formatting, it gets confused - just like me!
I would just format the text by using TextFormat, but i really need to use HTML formatting so I can add multiple URLS, different colors, etc. in the string.
If ANYONE could help me with this one, I'd be one happer coder and you could say that you've done your good deed for the day. ha.
Thanks in advance,
-JakeMAN
Horizontally Scrolling HtmlText Problem
O.K., I found a script that scrolls the contents of textbox from right to left, then repeats. This works great, until I add HTML formatting to the text string...
The problem is that Flash seems to get confused and sets the maxHscroll to an incorrect number.
Here's the code that only seems to scroll NON-html text just fine:
Code:
var special = "this is a freakin test. <B>here is some bold text</B>. <I>italics, whew!!!!</i>";
//var special = "this is a freakin test. here is some bold text. italics, whew!!!!";
this.createTextField("scroller_txt", 1, 0, 0, 640, 35);
scroller_txt.spacebuffer = " ";
scroller_txt.border = true;
scroller_txt.speed = 1;
scroller_txt.multiline = true;
scroller_txt.variable = "special";
scroller_txt.spaceSize = scroller_txt.getNewTextFormat().getTextExtent(" ").width;
scroller_txt.spacesRequired = Math.ceil(scroller_txt._width/scroller_txt.spaceSize);
for (var i = 0; i<scroller_txt.spacesRequired; i++) {
scroller_txt.spacebuffer += " ";
}
scroller_txt.html = true;
scroller_txt.htmlText = scroller_txt.spacebuffer+special+scroller_txt.spacebuffer;
scroller_txt.hscrollInterval = function() {
if (this.hscroll == this.maxhscroll) {
this.hscroll = 0;
}
this.hscroll += this.speed;
};
setInterval(scroller_txt, "hscrollInterval", 10);
Try using the above chunk of code, and uncomment the other variable 'special' and see how it scrolls fine, but with HTML formatting, it gets confused - just like me!
I would just format the text by using TextFormat, but i really need to use HTML formatting so I can add multiple URLS, different colors, etc. in the string.
If ANYONE could help me with this one, I'd be one happer coder and you could say that you've done your good deed for the day. ha.
Thanks in advance,
-JakeMAN
Help Needed For Horizontally Scrolling MC With Mouse Interaction
Hi there - I'm working on a project that needs a horizontally scrolling mc for a menu. I've mulled on a few ideas and wanted to see if anyone had any other suggestions?? Basically the menu exists in a 600 x 230 popup with the menu comprised of a five 600 x 230 movieclips strung together scrolling slowly in a loop from right to left.
When the user does a mouseover a menu item, a few words appear, telling you what the menu item is, but the scrolling doesn't stop, so the scroll is fairly slow. If the user moves the mouse over any area to the right, say about 100 pixels in from the right hand size, I want the scroll basically to speed up until the mouse is moved away from the 'speed up the scroll invisible button or m/c'. Any ideas?
Also if the mouse is moved out of the window, does flash consider that as a Mouseout? If this whole mc fills all the space will the mouseout event trigger if the mouse moves away from the window?
cheers
frank
Controling Horizontally Scrolling Movie Clip
Hi,
ive run into a bit of a problem with a flash project im working on and could really do with some help. I have a movie clip which I want to scroll horizontally when a user clicks on a button. this horizontal scrolling image is broken up into five different images each of which corresponds to a section of my site which tween and scroll sidewards. each of these photos has a stop action attached to the frame when it has scrolled into its correct position.
when a user clicks on a button i want the movie clip to scroll through the images until the image stops on the corresponding picture for that button. if it was the case that i wanted the movie clip to just go directly to the corresponding frame its no problem a simple gotoandstop action will look after that however i want it to scroll through each of the pics until it arrives at the correct one instead of jumping directly to each image.
the problems arise when i attach the necessary stop action at the point where the correct image has scrolled into position. so what happens when i attach an action to my button which initiates the scrolling in the movie clip the clip gets stuck on the next stop action it encounters.
is there any way that i can set up my movie clip to scroll in the way i want it to?
i have considered that there may be a way to direct the movie clip to scroll through its frames and direct it to stop on a particular frame without using stop actions on the frame in the movie clip but as my actionscripting is a bit ropey i don't know if thats possible.
if anyone knows a script i could use to do this or could recommend another approach i would be really greatful.
thanks,
el scifo
oh yeah forgot to add im using mx
How To Pause & Wrap Horizontally Scrolling Menu?
I've seen JavaScript that pauses horizontally scrolling graphics. How do you pause the following with ActionScript? Also how do you wrap the movie clip so it appears continuous?
From "Visual QuickStart Guide FlashMX," I have following to scroll long row of grahics in MovieClip (which works):
_root.onEnterFrame = function() {
menuMC._x = menuMC._x + (0.5*Stage.width - _xmouse)/50;
};
/*VGG Flash MX p.327 - horizontally scrolling menu that responds to cursor position. Create movie clip of buttons or graphics and name instance on Stage. Add above ActionScript to first frame of _root timeline.
When horizontal postion of mouse [_xmouse] is subtracted [-] from half [0.5] of Stage width, you get a number that is positive if cursor is on left or negative if cursor is on right. This value is used to move horizontal position of movie clip [MC._x]. Division [/] by 10 makes increment smaller and, henc e, movement of movie clip slower.*/
Thanks for any and all help,
auntNiNi
Scrolling Movieclip With Mouse Movement - Horizontally
Hi everyone:
I am trying to make a movie clip that contains different buttons. Not all the buttons will be visible on the stage always, so I want that when the user moves the mouse arrow left, the movie clip containing the buttons updates and move along with it to the right...and vise versa. I found this great snippet of code from Kglad, and it seems to do exactly what I need!!! The issue I am having is that my pieces update only after I am done moving the mouse...so the movie clip is not moving along with the pointer. Attached is the code. Here is a sample of what I am trying to accomplish:
http://sungard.com/
Attach Code
root.addEventListener(MouseEvent.MOUSE_MOVE,f);
var t:Timer=new Timer(40,0);
t.addEventListener(TimerEvent.TIMER,moveF);
function f(e:MouseEvent) {
t.stop();
t.start();
}
var speed:Number = .9;
function moveF(e:TimerEvent) {
front_mc.x =speed*front_mc.x+(1-speed)*(stage.stageWidth-front_mc.width)*root.mouseX/stage.stageWidth;
back_mc.x = speed*back_mc.x+(1-speed)*(stage.stageWidth-back_mc.width)*root.mouseX/stage.stageWidth;
if (Math.abs(front_mc.x- (stage.stageWidth-front_mc.width)*root.mouseX/stage.stageWidth)<1 && Math.abs(back_mc.x-(stage.stageWidth-back_mc.width)*root.mouseX/stage.stageWidth)<1) {
front_mc.x = (stage.stageWidth-front_mc.width)*root.mouseX/stage.stageWidth;
back_mc.x = (stage.stageWidth-back_mc.width)*root.mouseX/stage.stageWidth;
t.stop();
}
e.updateAfterEvent();
}
Edited: 11/13/2008 at 12:40:39 PM by rafa@mediatech
Placing Dynamically Loaded Images Horizontally...
I am trying to place differently sized images on the stage dynamically using loadClip(). I need to be able to get the previous loaded movieclip's x position and width in order to load the next one in the right place. I have tried using an array, but onLoadInit has caused some strange problems. It causes my array indexes to run backwards. Traced outside of onLoadInit, it displays fine. Is there a better method to do this? Thanks for any input you can give. I hope this makes at least some sense.
- Jon
Load Images Via XML And Place On Stage Horizontally.
Alright folks. A while back I got some help with making a movie clip draggable. I've got that working without any issues. However, I'm loading in some images via XML.
Each of these images will be placed within the draggable movieclip called imagecontainer_mc. I want to create a large horizontal image with each one placed next to each other. The user can drag through them instead of scrolling horizontally.
Here's an example of how the site will look with static images.
http://www.defiancevisual.com/flashtest01.swf
I've got the XML in my flash document, and I've got loops that trace the image location and widths back to me.
http://www.defiancevisual.com/gallery/ is my XML.
I'm stuck when it comes to image placement. I think my approach to creating a movie clip and tossing an image in it all within imagecontainer_mc isn't working. Could anyone point me in the right direction?
Code:
#include "lmc_tween.as"
//Make the stage fluid
Stage.align = 'TL';
Stage.scaleMode = 'noScale';
//Initialize image container
imagecontainer_mc._x = 0;
imagecontainer_mc._y = 0;
//imagecontainer_mc._y = ((Stage.height / 2) - (imagecontainer_mc._height / 2));
//Initialize menu items
logo_mc._y = 0;
logo_mc._x = 0;
navigation_mc._x = Stage.width - navigation_mc._width;
navigation_mc._y = 0;
music_mc._x = Stage.width - music_mc._width;
music_mc._y = Stage.height - music_mc._height;
tagline_mc._x = 0;
tagline_mc._y = Stage.height - tagline_mc._height;
//Place the items accordingly on resize
sizeListener = new Object();
sizeListener.onResize = function() {
imagecontainer_mc.tween("_y", ((Stage.height / 2) - (imagecontainer_mc._height / 2)), 1, "easeInOutExpo");
navigation_mc._x = Stage.width - navigation_mc._width;
music_mc._x = Stage.width - music_mc._width;
music_mc._y = Stage.height - music_mc._height;
tagline_mc._y = Stage.height - tagline_mc._height;
};
Stage.addListener(sizeListener);
//Set the variables of the drag physics
decel = .8;
ratio = .5;
padding = 100; //in pixels
var dragX:Number;
var dragY:Number;
//Keep the horizontal drag within the bounds of the stage
MovieClip.prototype.checkBounds = function () {
if (this._x <= Stage.width - imagecontainer_mc._width - (Stage.width - padding)) {
this._x = Stage.width - imagecontainer_mc._width - (Stage.width - padding);
}
if (this._x >= 0 + (Stage.width-padding)) {
this._x = 0 + (Stage.width-padding);
}
if (this._y >= Stage.height - padding) {
this._y = Stage.height - padding;
}
if (this._y <= 0 - (imagecontainer_mc._height - padding)) {
this._y = 0 - (imagecontainer_mc._height - padding);
}
};
imagecontainer_mc.onEnterFrame = function () {
if (!drag) {
this._x += xspeed *= decel;
this._y += yspeed *= decel;
} else {
x = this._x;
this._x = this._parent._xmouse - dragX;
y = this._y;
this._y = this._parent._ymouse - dragY;
}
this.checkBounds ();
};
imagecontainer_mc.onPress = function () {
dragX = this._xmouse;
dragY = this._ymouse;
drag = true;
};
imagecontainer_mc.onRelease = imagecontainer_mc.onReleaseOutside = function () {
drag = false;
xspeed = (this._x - x) * ratio;
yspeed = (this._y - y) * ratio;
this.checkBounds ();
};
oldx = _root._xmouse;
oldy = _root._ymouse;
function loadXML(loaded) {
if (loaded) {
albumsNode = this.firstChild.childNodes;
albumtotal = albumsNode.length;
albums = [];
//initialize p
p = 0;
for (a=0; a<albumtotal; a++) {
albums[a] = this.firstChild.childNodes[a].attributes.title;
//trace(albums[a]);
imagesNode = this.firstChild.childNodes[a].childNodes;
imagestotal = imagesNode.length;
imageurl = [];
imagewidth = [];
for (i=0; i<imagestotal; i++) {
imageurl[i] = this.firstChild.childNodes[a].childNodes[i].attributes.url;
imagewidth[i] = this.firstChild.childNodes[a].childNodes[i].attributes.width;
//trace(imagewidth[i]);
image();
}
}
} else {
trace("There was an error loading the file.");
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("http://www.defiancevisual.com/gallery/");
function image() {
if (loaded == filesize) {
picturemcname = "image_mc" + i;
picture = imagecontainer_mc.createEmptyMovieClip(picturemcname, i);
picture.loadMovie(imageurl[i]);
//p = number(imagewidth[i]) * -1;
p = p + number(imagewidth[i]);
trace(p);
imagecontainer_mc.picturemcname._x = p;
}
}
Am I approaching this wrong?
Vertically/horizontally Scrolling Movie Clip Question
I found a tutorial at http://www.bluegelmedia.com/tutorial.../slidingmc.htm
that shows how to build a horizontally scrolling movie clip.
I adjusted it so that it scrolls vertically, and for the most
part, it seems to work just fine. The only thing I cant seem
to get it to do, is to “load” at a certain point. For example,
I’ve got my mc scrolling 4 sections, labled “1” , “2” , “3” & “4”.
The buttons make it scroll just fine to any of the
correspsonding sections.. but it “loads” with section 4 half way
out of the screen…! in the above URL, is the original code
(for the horizontal scroll) and below is mine (changed to scroll vertically). I’ll also include the flash file as well, in
case that would be helpful.
Oh yeah.. in my example, its an mc inside an mc.. cause I want
to be able to scroll horizontally, then scroll vertically for
more info. The attached file only show the vertical scrolling, but
thats why its an mc inside an mc. i'm new to flash.. so if that in itself might cause some problems (mc inside an mc).. let me know that too!!
Hope that makes sense!
************************************************** ******
onClipEvent (load) {
Scene1_x = 0;
Scene1_y = _y;
Scene2_x = 0;
Scene2_y = _y-(+550);
Scene3_x = 0;
Scene3_y = _y-(-275);
Scene4_x = 0;
Scene4_y = _y-(+275);
//a variable "Scene" is being defined …. Scene1 x coordinates equals _x
}
onClipEvent (enterFrame) {
target_y = this["Scene"+scene+"_y"];
// here target is defined to equal the value of the variable "scene"
// this is done in an equation with strings so that we get "scene"+the value for scene + the property x position
// this is done so that we don't have a value and then _x which is "illegal" in programing. 1_x or 2_x would not be acceptable ....the above string gives us Scene1_x or scene2_x
_y += (target_y-_y)/3;
}
// the last line slows the movement down by thirds.....
************************************************** ******
thanks for any help!
-5000
G-13
Auto Scrolling Dynamically Loaded Text - Horizontally
Well my title pretty much says it all.
How do I make a dynamic text area in my flash movie that loads the text I want from an external .txt file AND scrolls it right to left - kind of like a news ticker at the bottom of cnn.
Any help would be sooooo appreciated. Thanks
Images In Kirup Photo Galley Flipped Horizontally
I followed the tutorials to make the photo gallery, and everything works fine, except that all of my pictures are flipped horizontally, which causes some pictures to look funny. Can anyone tell me why this is happening and how I can fix it?
Thanks in advance!
Images In Kirup Photo Galley Flipped Horizontally
I followed the tutorials to make the photo gallery, and everything works fine, except that all of my pictures are flipped horizontally, which causes some pictures to look funny. Can anyone tell me why this is happening and how I can fix it?
Thanks in advance!
Can't Fit All Images Into My Scrolling Images Movie
I'm pretty new at Flash, especially actionscript and I can't figure out how to get my movie to go through all the images I put in. In the library there's a movie folder in which there are 3 movies. The second one has most of the actionscript. I can't figure out what I need to manipulate so that all the images play/scroll through.
I put it up a link to the flash film on the web because even when zipped the file is too large to post as an attachment.
http://www.wakefly.com/staging/flash/flashmovie.htm
Any input would be much appreciated. Thanks!!!
Scrolling Images With Rollover Images
Ok, I am going to try to describe what I am trying to do to the best of my ability.
I have a scrolling menu of images, when you rollover the right arrow they move right, the left they move left. That all works fine, but I am having a problem figuring something out. What I want to do is: When someone is scrolling along they can rollover one of the images and it will bring up the pic in a certain area. Only problem, how would I do this without the scroll bar reseting itself. Right know I have it set up so that when you click one of the images in the menu it goes to another scene with that pic in it, but the scrollbar is gone. You then have to click a back button and it takes you back to the page with the scroll bar, but it is back at the beginning of the menu, and not where the person left off.
Any need to clarify anything let me know!
Thanks!
Scrolling Images
Hey guys, have a look at ::
> http://www.gridplane.com
Under the photos section, select the Light & Motion series.
How can I achieve this scrolling effect between photos?
Any tutorials?
This is exactly an effect I am currently trying to create, so any help is appreciated.
Please Help How Do I Get A Scrolling Set Of Images...
Please help!!
I am trying to create a web page that has a set of scrollable images on the left hand side. When hovering over the images, they scroll and when clicked on the chosen image appears, full size on the right. How can I acheive this? Any ideas?
Scrolling Images
I have seen many tutorials about scrolling text but how do I make images scroll? I tried one tutorial but with no results. I am planning to have 3 columns on the page with the center one being images which the user can scroll. The other 2 columns remain static. I need help. Please tell me what to do? Some tutorial that I can use?
Thanks a lot.
Scrolling Images
Does anyone know how this works. The images scroll across the screen until the mouse moves and the images follow the direction of the mouse. The site below shows what I'm taking about. If anyone know how to do this, or of a tutorial please let me know???
http://www.juliefowells.com/main.html
nauhs
Scrolling Images
I want to scroll an image across the screen using buttons and the keyboard. To move the image this is the code im using for one button:
on (press, keyPress "<Left>") {
pic._x += 250;
}
What i want to do is make it so if you hold down the button it will keep scrolling across the screen, until you let go.
Any ideas?
Scrolling Images
I am planning to create a movie with arrow buttons to scroll a movie clip with bunch of images in a rectangular area. Have looked at the tutorial here...it's a good one but a little bit complicated for me. Besides, it's based on another tutorial which I have a problem getting into the webpage. Is there any recommendation on any materials or tutorials that could help me?
Help With Scrolling Images
i found an open movie, http://www.flashkit.com/movies/Scrip...6162/index.php, but i can't figure out how to put my movie clip in it and configure all the actionscripting because the comments are in italian. i'm also very new to flash but if someone could just explain the process of duplicating this movie and customizing it, i can figure everything else out. i know how to make the mask and i have the image that i want to scroll, i just need a walk-through. thanks,
alyssa
Help Scrolling Images
hello,
I'm trying to make a scrolling image strip(a number of images) which move to left and right. Sure, If I rollover right button, the image strip moves to right and same way for left.
It should move forever, but I can't make it. I don't know how to make it replace at the starting point if it move out from the stage.
Please give me your smart contributions.
Thanks /Joo
-= Scrolling Images =-
if you press the links on this site http://www.planetnintendo.com/eterna...ss/index2.html if you press the later buttons the images are blurred. Is there a way to fix this. Its about 5 images, 631 px in width. Ive seen this work before.
Thanks
n
[Edited by Nigel1985 on 07-31-2002 at 12:16 PM]
Scrolling Images
I need to make a mc that i can scroll within another main mc.
At the moment I have made a seperate .swf file that loads
in to the main mc.
In this .swf I would like to add pictures and text, and maybe some more small mc's. Also I would like to scroll this mc vertically.
Any Help Welcome
Scrolling Images
imagine, some images scrolling right to the left(whit a mask)?
that's my problem.
how doing to repeat the images?
once again....that's urgent. thanks for
a quickly answer.
Scrolling Images
hello,
I have an image of a spiral staircase and I want it to seem like the visitor is climbing up the stairs. When I attempt this, the entire image scrolls until it is no longer on the screen. What I need it to do is zoom and move to left and right to follow the staircase.
Can anyone help me with this? Thanks a heap!
Scrolling Images - Help
Hi - hope I can be clear as to what I am looking for.
I am triying to create an effect similar to the one on this site :
http://www.lefroybrooks.com/catalogue/xo/index_swf.htm
where the images scroll across the screen when a button is clicked. Also want to create the effect that the images scroll BACKWARDS when the buttons are clicked as well. Basically, I want to recreate the navigation of the above site (to an extent)
Thanks!
merenoyes
|