Elastic Scroller Tut Needed
Anyone know of a good tut out there dealing with elasticity and scrolling movie clips? This one is good, but written for flashMX. I'd like to know of any others since mx2004 seems to have much more to offer and many improvments.
http://www.flashkit.com/tutorials/In...-687/index.php
Cheers
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 06-14-2005, 03:04 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Elastic Text Scroller
Hi everyone
I really want to create a text scroller which has a friction/elastic feel to it. Can anyone point me inthe the direction of a good tutorial/.fla that will explain how i do this?
Many thanks
Jamie
Elastic Line Help Needed
Hi
I've looked everywhere but just can't find what i'm looking for.
I want to have a curvy line which can be be pulled like elastic from any point.
Any examples will be really helpful.
qamar
Help Needed With Connected, Elastic Objects
I have to connect thirteen squares, 12 of them are connected through four lines with one in the center. When you click on one of 13 buttons, one of the squares moves in the foreground in a smooth, elastic way and the others move to another position.
Is there any script i can use or is this impossible? It also has to work with Flash 4.
thanks a lot for any help!
Scroller Help Needed
Is there an easy way for making a scroll function for dynamic text?
like 2 buttons, one for up and one for down?
I looked at the form but there are many links to scollbars but it's for images and stuff.
i have looked also at the component but, i dont want to use that!
please tell me
thnx
Help Needed For MC Scroller
I am using the scroll code from tutorials and it's working beautifully.
Except, scrollable content gets updated via XML and once that happens, viewable content location resets to the initial y position, which is the top of the content.
Since the height of the content movieclip changes - either reduce or increase - scroll function is called each time, but, it'd be desirable to leave the viewing location the way it was before update. So the user doesn't have to scroll back down to where they were. And update occurs every so often by a timer.
Please help!
Scroller Help Needed
Is there an easy way for making a scroll function for dynamic text?
like 2 buttons, one for up and one for down?
I looked at the form but there are many links to scollbars but it's for images and stuff.
i have looked also at the component but, i dont want to use that!
please tell me
thnx
Scroller Problem.Help Needed
Hi there,
I found a tutorial on actionscript.org to make a textscroller.
It's a really basic one.Works great but when I place the content from the timeline into an mc.The mc doesn't work .It has to be placed in an mc because this has to deal with how I set up my site structure.Could someone have a look at this file.It's the mc'test' that should work.
Big thx in advance
Grtz,
Modulater
Help Needed With Photo Scroller
Hi all, l'm trying to use this photoscroller idea which i downloaded from flashkit...file attached. thanks to the author
l have placed the animation on my main stage. As you will notice the actual mouseover buttons are contained on the thumbnail in a seperate movie, then added to the stage under a mask. What l am trying to do is load an associated movie clip in a blank container clip on the main stage. e.g click on thumbnail one and it will load the external hs_1.swf into an empty movie clip, click on thumbnail 2 and it will load the external hs_2.swf into the empty container clip. l can't seem to get it to work. l have tried everything and made sure l gave the blank movie clip container on the main stage an instance name. l'm quite sure its easy but still cant work it out. Can anyone help me, getting very frustrated...PLEASPLEASE PLEASE.
Help Needed Withe Scroller
hi
i have been workin on an artists website www.hetainpatel.com
its all in flash. FLASH MX OS X what my problem is on pages that have a verticle scroll bar, when i scroll down it skips to many lines. all i want it to do is have it scroll down slower so you can read the info, like a normal iframe.
here is the actionscript that i have used:
// set up content_mc info
contentRight = _parent.content_mc._y;
contentLeft = 250-_parent.content_mc._height; //365-
// set up gutter info
gutterLeft = _parent.scrollbarGutter_mc._y-3;
gutterRight = ((_parent.scrollbarGutter_mc._y+_parent.scrollbarG utter_mc._height)-this._height)-1;
// don't use the hand icon
this.useHandCursor = false;
// handle press event
this.onPress = function() {
this.startDrag(false, this._x, gutterLeft, this._x, gutterRight );
dragging = true;
this.onMouseMove = function() {
updateAfterEvent();
};
};
// handle release event
this.onRelease = this.onReleaseOutside = function() {
this.onMouseMove = undefined;
this.stopDrag();
dragging = false;
ySpeed = (newypos-oldypos)*RATIO;
};
// set initial variables
FRICTION = .92;
RATIO = .5;
dragging = false;
// handle onEnterFrame event
this.onEnterFrame = function() {
if (!dragging) {
oldypos = this._y;
newypos = oldypos+ySpeed;
ySpeed *= FRICTION;
if (newypos>gutterRight || newypos<gutterLeft) {
ySpeed *= -FRICTION;
newypos = oldypos;
}
this._y = newypos;
// always move content_mc whether dragging or not
var percent = (this._y-gutterLeft)/(gutterRight-gutterLeft);
this._parent.content_mc._y = percent*(contentLeft-contentRight)+contentRight;
} else {
oldypos = newypos;
newypos = this._y;
// always move content_mc whether dragging or not
var percent = (this._y-gutterLeft)/(gutterRight-gutterLeft);
this._parent.content_mc._y = percent*(contentLeft-contentRight)+contentRight;
}
};
Advanced Scroller Help Needed
I am working on a scroller that containes linked buttons. I have not been able to use Dynamic fields because the extra buttons don't go up with the text when the text box is resized.
How would you create such a project?
Your help is appreciated.
Ecinele
RSS News Scroller / XML - Help Needed
Hi everyone,
I've got hold of this very funky scroller, which I've put up as an example here:
www.mattblank.com/test
The problem is, it only reads from the XML that I've uploaded called news_feed.xml (this template XML file came with the scroller www.mattblank.com/test/news_feed.xml).
What I would prefer though is if it could instead read from the file I've created and uploaded called rss.xml (www.mattblank.com/test/rss.xml), which I think is more RSS friendly, however the flash file can't read it for some reason, it will just show the title and description of the rss.xml file instead of all the items.
I will be eternally grateful if someone could help me on this one. I've attached all necessary files (you normally have to preview it live to see any content).
I don't want the flash file to read the links from rss.xml, but I want them to stay in the XML incase people want to use it as an RSS.
I hope this isn't too confusing
Please help me!
Many thanks,
Matt Blank
P.S. All files needed are in the attached zip file.
Image Scroller Help Needed...
Hi all,
I'm new to these forums and was hoping someone may be able to give me some direction on an issue that has been bugging me. If this request is in the wrong place could someone tell me the best place to post?
I have been building an image gallery site for my girlfriend who is a fashion photographer and it is pretty much finished to her requirements. See http://www.elisedumontet.com. Site is a small flash file and all images are loaded via a CMS that my brother kindly built for me.
The thing is, my girlfriend wanted a very simple image scroller and I think it looks a bit outdated and want to add something funkier (and convince her it's worth having something better) - problem being my actionscripiting is not yet up to what I want to achieve
The type of scroller I would love to add to this site can be seen at http://www.rainerbehrens.com/
I have tried to do some experiments in this style and all have ended in failure
does anyone know of anywhere I can find a source for this or something similar? It doesnt need to be a total rip - just something more interesting than what I have managed to build.
Any other comments on the site would also be greatly appreciated - good or bad.
Cheers.
d
MC Scroller Needed (a Very Basic One).
Simple scrollbar that i can just copy and paste it here and there, which also does math.floor (or was it math.round for pixel fonts etc) anyway let me know. Does anyone know of one?
/me Thanks you's verily much 8)
Fantastic Scroller - But Help Needed Urgently
Hi Guys,
Found this fabulous scroller on Flashkit:
http://www.flashkit.com/movies/Scrip...33/index.shtml
I really want to use this bad boy, but am having a few problems.
Mainly that I want the scroller to work as an MC, so that I can use it with Load Movie. Also, so that I can use it on different levels.
Everything seems to point to _root, which really screws up using it as a MC. I've tried playing with it, but am unable to get it to work.
CAN ANYONE CRACK THIS BAD BOY SO THAT IT WORKS AS A SELF CONTAINED MC?
FYI: Here is the mani timeline Actionscript used:
_root.movent = false;
_root.dragging = false;
_root.scrolling = false;
_root.davant = this.indexOf("/scroller");
function controlParar (que) {
}
function mou () {
marge = 50;
tellTarget (_root.scroller) {
_root.ymin = _y;
_root.ymax = _y+_height;
_root.xmin = _x;
_root.xmax = _x+_width;
}
if (_root._ymouse<=_root.ymin-marge) {
_root.pararem = true;
} else if (_root._ymouse>=_root.ymax+marge) {
_root.pararem = true;
} else if (_root._xmouse<=_root.xmin-marge) {
_root.pararem = true;
} else if (_root._xmouse>=_root.xmax+marge) {
_root.pararem = true;
} else {
_root.pararem = false;
}
if (_root.dragging == true) {
_root.ymouse = _root._ymouse;
if (_root.ymouse<=_root.ymin2) {
_root.ymouse = _root.ymin2;
}
if (_root.ymouse>=_root.ymax2) {
_root.ymouse = _root.ymax2;
}
tellTarget (_root.scroller) {
_y = _root.ymouse;
}
tellTarget (_root.texteamoure) {
_y = _root.ymin1-((_root.ymouse-_root.ymin2)*_root.desp1);
}
} else if (_root.scrolling == true) {
tellTarget (_root.scroller) {
_root.ymouse = _y;
}
_root.ymouse = _root.ymouse+_root.desp2;
if (_root.ymouse<=_root.ymin2) {
_root.ymouse = _root.ymin2;
}
if (_root.ymouse>=_root.ymax2) {
_root.ymouse = _root.ymax2;
}
tellTarget (_root.scroller) {
_y = _root.ymouse;
}
tellTarget (_root.texteamoure) {
_y = _root.ymin1-((_root.ymouse-_root.ymin2)*_root.desp1);
}
} else if (_root.movent == true) {
tellTarget (_root.texteamoure) {
// _y = _root.ymin1-((_root.ymouse-_root.ymin2)*_root.desp1);
_root.ymouse = ((_root.ymin1-_y)/_root.desp1)+_root.ymin2;
}
tellTarget (_root.scroller) {
_y = _root.ymouse;
}
}
if (_root.pararem == true) {
_root.dragging = false;
}
}
function scrolleja (desp) {
_root.desp2 = desp;
if (desp != 0) {
_root.scrolling = true;
} else {
_root.scrolling = false;
}
_root.dragging = false;
}
function començaDrag () {
_root.dragging = true;
}
function creaDrag (boto, y1, texte, y2) {
_root.scroller = boto;
_root.texteamoure = texte;
tellTarget (_root.scroller) {
_root.ymin2 = _y;
_root.xmin2 = _x;
_root.xmax2 = _width;
}
_root.ymax2 = _root.ymin2+y2;
tellTarget (_root.texteamoure) {
_root.ymin1 = _y;
_root.ymax1 = y1-y2;
_root.xmin1 = _x;
_root.xmax1 = _width+_x;
}
_root.desp1 = ((_root.ymax1-_root.ymin1)/(_root.ymax2-_root.ymin2));
}
function paraDrag () {
_root.dragging = false;
}
function començaMoviment (quin) {
tellTarget (quin) {
_root.tmp = _root.ymin1+" "+_root._ymouse+" "+_root.ymax1;
if (_root._ymouse>=_root.ymin1 and _root._xmouse>=_root.xmin1 and _root._xmouse<=_root.xmax1 and _root._ymouse<=_root.ymax1) {
startDrag (quin, false, _x, _root.ymin1, _x, _root.ymin1*2-_root.ymax1);
}
}
_root.movent = true;
}
function paraMoviment (quin) {
tellTarget (quin) {
stopDrag ();
}
_root.movent = false;
}
_root.ample1 = 490;
_root.ample2 = 60;
creaDrag(_root.davant+"/scroller", _root.ample1, _root.davant+"/texte", _root.ample2);
Urgent Help Help Needed With Text Scroller
hi everyone
i am trying to load a text scroller into a target.
does any one have a sample???????
i am using this scroller--->>
i have a symbol where i have 3 empty keyframes on each one this script
1keyframe - stop ();
2.tellTarget ("/scroller") {
prevFrame ();
}
3.tellTarget ("/scroller") {
prevFrame ();
}
gotoAndPlay (2);
//than i have my scroller symbol where i have the text in motion.On my bottom arrow i have this
on (press) {
play ();
}
on (release) {
stop ();
}
//on the upper one
on (press) {
tellTarget ("sub") {
gotoAndPlay (2);
}
}
on (release) {
tellTarget ("sub") {
stop ();
}
}
it is working perfectly when you just play it directly or if you load it on the level
but as soon as i load it in the target the upper arrow doesnt work, what is the problem???
i have tryed to load every single text scroller in the flash kit archive in the target but no one seems to work,
Does anyone knows how can i fix this one or if any one has an simple text scroller that i can load it into a target
thanks a lot lot
Art Darbin
Help Needed With Flash 4 Text Scroller
I am trying to make a text scroller that scrolls sections of type at a time instead of line by line. Also I am wanting to have more control over the way the type looks, paragraphs, line breaks, etc. currently I have a scroller using the tutorial found in the tutorials section. So far this is the only technique that i've seen used. I tried using tell target, but I must be doing something wrong, because that's not working. If you want to see what i'm talking about: http://www.oymdesign.com
click on the capabilites link and then on marketing and then click on the tab in the top right hand corner.
thanks for your help
Button In Scroller Not Working Help Needed
i have created a movie clip containing a sroller using actionscript, in this movie clip in this there is a another movie clip containing the pictures and buttons on separate lavers (the bits that scroll)
i have set up one instance of the button which has a onrelease gotoandplay action to scene1, (frame label) project 1
this should move the main timeline to the label and trigger another movie clip, but dosent can anyone shed any light on this
regards jason
i would be more than happy to email the flash document if someone is prepared to take a look
Text Scroller Needed Emergency
Hello
I was reading your post and checking out your sites very nice work.
My question go out to Edificially. I was looking at your site and saw that you had a text scroller. I'm trying to figure out 1 for myseflf, I did one using mx components but I need something that looks much better not so plain more of a modern style, would you have any idea's? thanks
Help Needed For Dynamic Text Scroller
I am looking to create a good dynamic text scroller like the one that
is a component. Any one have information on how to make one it is
really appreciated.
Thanks
Randy
Help Needed ASAP With Rollover Scroller
Hi all --
New to the forum and looking to do the following:
I have a long text box that I'd like to scroll through when the user mouses over an up and a down button. No idea how to write this code. I know it's not hard and I'm guessing it's just something like:
xxxxxxx.onRollover = function (){
content.scroll -=1;
}
Tried the above and it didn't do anything. Could really use some help here!
Thanks in advance!
Buttonless Scroller ActionScript Help Needed
I hope someone can help me with this cos it's drivng me nuts.
I've been following the tutorial on flashkit to create a buttonless scroller (http://www.flashkit.com/tutorials/In...-909/index.php)
so that I can create pages that will load into a movie Clip in my sites main swf.
The problem I have is that when I load the swf I create using the tutorial, the rollover doesn't work and it just sits there motionless. I have a feeling that I need to turn it into RollOver actions instead of a defined space in the actionscript. Can anyone confirm this is what I need to do, or is there another solution. I've already had a go at trying to "convert" the tutorial, but the rollovers just don't seem to work.
I've tried altering the actionscript (by using the principles of a rollover button script) to accomodate my rollover buttons but am getting nowhere with it. With my actionscripting not being my greatest asset, I just can't figure it out how to do it.
Here's the actionscript from the tutorial.....Tutorial ActionScript Code:
//setting the variables for the script;
_root.scrollerName = _root.scrollerClip;
_root.left = 0;
_root.innerLeft = 50;
_root.right = 609;
_root.innerRight = 559;
_root.top = 0;
_root.bottom = 395;
_root.minXposition = -1200;
_root.maxXposition = 0;
_root.idleScrollSpeed = 0;
_root.overScrollSpeed = 5;
//if the scroller has gone to the end, switch directions;
if (_root.scrollerName._x < _root.minXposition) {
_root.scrollerDirection = "right";
} else if (_root.scrollerName._x > _root.maxXposition) {
_root.scrollerDirection = "left";
}
if (_root._ymouse < _root.bottom && _root._ymouse > _root.top) {
//checking to see if the mouse is in the left area, if so, continue;
if (_root._xmouse > _root.left && _root._xmouse < _root.innerLeft) {
if (_root.scrollerName._x > _root.maxXposition) {
break;
} else {
_root.scrollerName._x = _root.scrollerName._x + _root.overScrollSpeed;
}
} else if (_root._xmouse > _root.innerRight && _root._xmouse < _root.right) {
if (_root.scrollerName._x < _root.minXposition) {
break;
} else {
_root.scrollerName._x = _root.scrollerName._x - _root.overScrollSpeed;
}
} else if (_root._xmouse < _root.left or _root._xmouse > _root.right) {
if (_root.scrollerDirection == "right") {
_root.scrollerName._x = _root.scrollerName._x + _root.idleScrollSpeed;
} else if (_root.scrollerDirection == "left") {
_root.scrollerName._x = _root.scrollerName._x - _root.idleScrollSpeed;
}
}
} else if (_root.scrollerDirection == "right") {
_root.scrollerName._x = _root.scrollerName._x + _root.idleScrollSpeed;
} else if (_root.scrollerDirection == "left") {
_root.scrollerName._x = _root.scrollerName._x - _root.idleScrollSpeed;
}
Basically, I can't figure out how to convert that to make it work via roll over buttons, or similar such action that would allow it to work when loaded into another swf.
My apologises if it is an easy problem to fix, but it's frustrating the hell out of me and would appreciate any help.
[Flash8]Help Needed Thumbnail Scroller
So I have read the tutorial: http://www.kirupa.com/developer/mx2004/thumbnails.htm, and I based my flash file off the code given there.
I would like to, instead of letting the thumbnail_mc's scroll when you rollover them, have buttons on either side that scroll (slow when mouseover and fast when pressed) the mc's instead. Here is what I have, which doesn't seem to work:
Code:
previous_btn.onRollOver = function(){
thumbNailScroller(30);
};
next_btn.onRollOver = function(){
thumbNailScroller(30);
};
previous_btn.onPress = function(){
thumbNailScroller(50);
};
next_btn.onPress = function(){
thumbNailScroller(50);
};
function thumbNailScroller(scroll_speed) {
// thumbnail code!
this.createEmptyMovieClip("tscroller", 1000);
tscroller.onEnterFrame = function() {
if ((_root._ymouse>=thumbnail_mc._y) && (_root._ymouse<=thumbnail_mc._y+thumbnail_mc._height)) {
if ((_root._xmouse>=(hit_right._x-40)) && (thumbnail_mc.hitTest(hit_right))) {
thumbnail_mc._x -= scroll_speed;
} else if ((_root._xmouse<=(hit_left._x+40)) && (thumbnail_mc.hitTest(hit_left))) {
thumbnail_mc._x += scroll_speed;
}
} else {
delete tscroller.onEnterFrame;
}
};
}
it would be very helpful for you to read the (at least part of) the tutorial if you are going to try to help me.
Well, thanks..
-c..
Scroller With Ease Small Fix Needed
Hello,
I have a good fla file for scrolling with ease. It is working fine but with small issue.
Find attached fla and swf file.
When we run it first time it is perfect.
First you click 'down arrow buton' and scroll it. After this, again when you click 'up arrow button' at its last , the content movie clip keeps moving 1 or 2 pixel up and down contineously. Which is not needed. it should be static at its top position.
Can anyone help me? its 2 minute job for expert person.
Thanks in advance.
Mailverma
Draggable Elastic MC, Isnt That Elastic
i have an MC (hand) that ive made to be draggable. once the hand is released it should return to its original position....but of course, it doesnt.
the code is a slight variation of some i found a while back and have kept in a folder.
first frame on code layer in main timeline
ActionScript Code:
hand.elasticPos = function(targetX, targetY, accel, convert) { tellTarget (this) { xPos = xPos * accel + (targetX - _x) * convert; yPos = ypos * accel + (targetY - _y) * convert; _x += xPos; _y += yPos; }};
on the 'hand' MC
ActionScript Code:
onClipEvent (load) { x = _root.hand._x; y = _root.hand._y;}onClipEvent (enterFrame) { if (!pressed) { elasticPos(x, y, .9, .5); // elasticPos( targetX, targetY, accel, convert); }}
and finally inside the hand MC is a button for draggable reasons, on which is..
ActionScript Code:
on (press) { //ignore this stuff... _root.LEN.gotoAndStop("LEP"); _root.REN.gotoAndStop("REP"); _root.LEB.gotoAndStop("LEBP"); _root.MN.gotoAndStop("MP"); // end of ignore this.startDrag(); pressed = true;}on (release, releaseOutside) { this.stopDrag(); //ignore this stuff... _root.LEN.gotoAndStop("LEN"); _root.REN.gotoAndStop("REN"); _root.LEB.gotoAndPlay("LEBN"); _root.MN.gotoAndStop("MN"); //end pressed = false; }
yeh. it doesnt work.
any help would be fantastic
its probably something blindinly obvious but ive been messing with actionscript all day and its all starting to blur...
ive included the original file
I Need To Make This Txt Scroller Move Onmouseover, Not Onclick - Help Needed
I have a text scroll box that is moved by an up and down arrow, but you have to actually click it for it to scroll. I'm wanting to set it up to where you just mouse over the arrow and it scrolls automatically. I just downloaded this text scroller, so I'm not sure what to edit in the script. This is what the buttons currently say:
up arrow:
onClipEvent (enterFrame) {
if (_parent.lPressed=="1") {
_parent.gotoAndStop(_parent._currentframe-1);
}
}
down arrow:
onClipEvent (enterFrame) {
if (_parent.lPressed=="true") {
_parent.gotoAndStop(_parent._currentframe+1);
}
}
any suggestions?
It's static text that is moving as well as a layer of graphics. Here's a screenshot of the scrolling movieclip if that helps at all: http://www.nlgraphics.com/screenshot.jpg
Can I modify the code that I currently have in place, or would something totally different have to be put together?
Any help is appreciated.
XML Based Horizontal Image Scroller (src Included): Some Help Needed.
Hello,
I'm currently working on an XML based horizontal image scroller. Since I'm stuck with 2 annoying problems, I decided to share the project's source, and count on the experience of others to try and help me.
As you'll see, it's running pretty good already, only 2 major problems left:
- Bug when scroller moves to the left: the images overlap, and I simply can't locate the problem.
- The tooltip: I can't seem to get it into highest layer (level), on top of everything. When tracing it's depth, it says '-16383'.
As for the rest, I still need to implement 2 remaining functionalities:
- If the sum of the images (width) is smaller than the width of the movie, the images need to be duplicated untill theirs sum's width exceeds the width of the movie.
- I'd like to add a nicer mouseOver effect.
Especially help on the 2 bugs would be greatly appreciated, the other remaining functionality I'll work out myself...
[source removed]
Make Xml Infinite Scroller Load/unload Images In And Out As Needed
I have a xml infinite scroller that currently loads all images all at the same time. It works great but I will need to load about 20 to 30 images that will scroll by and that will cause processing problems.
I am wondering if it would be possible to make the xml infinite scroller only load the images that are in view and then unload them in and out as the scoll by? I have no idea if this is possible but I think many flashers could make use of it.
Convert Movieclip Scroller To Dynamic Text Scroller
I have code I borrowed that is set up to scroll a movie clip image. However, it doesn't work well if I replace the graphics with a text box as the scrolling becomes "jerky" as I think there is too much information for it to process with the complexity of the text. So I was hoping to change the scrolling content from a movie clip image with text to a dynamic textbox. But it will not function when I do that change. In this currrent setup, the movieclip instance name is "contentmain". I tried naming the instance of the dynamic textbox with that name, but no text shows up next to the scroller when I play the movie.
Here's the code:
scrolling = function () {
var scrollHeight:Number = scrollTrac._height;
var contentHeight:Number = contentMain._height;
var scrollFaceHeight:Number = scrollFace._height;
var maskHeight:Number = maskedView._height;
var initPosition:Number = scrollFace._y=scrollTrac._y;
var initContentPos:Number = contentMain._y;
var finalContentPos:Number = maskHeight-contentHeight+initContentPos;
var left:Number = scrollTrac._x;
var top:Number = scrollTrac._y;
var right:Number = scrollTrac._x;
var bottom:Number = scrollTrac._height-scrollFaceHeight+scrollTrac._y;
var dy:Number = 0;
var speed:Number = 10;
var moveVal:Number = (contentHeight-maskHeight)/(scrollHeight-scrollFaceHeight);
// Setup easing event
contentMain.desiredX = contentMain._y;
contentMain.onEnterFrame = function() {
this._y -= (this._y - this.desiredX) / 3;
};
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.desiredX = Math.round(dy*-1*moveVal+initContentPos);
};
};
scrollFace.onMouseUp = function() {
stopDrag();
delete this.onMouseMove;
};
btnUp.onPress = function() {
this.onEnterFrame = function() {
if (contentMain._x+speed<maskedView._x) {
if (scrollFace._x<=left) {
scrollFace._x = left;
} else {
scrollFace._x -= speed/moveVal;
}
contentMain._x += speed;
} else {
scrollFace._x = left;
contentMain._x = maskedView._x;
delete this.onEnterFrame;
}
};
};
btnUp.onDragOut = function() {
delete this.onEnterFrame;
};
btnUp.onRelease = function() {
delete this.onEnterFrame;
};
btnDown.onPress = function() {
this.onEnterFrame = function() {
if (contentMain._x-speed>finalContentPos) {
if (scrollFace._x>=right) {
scrollFace._x = right;
} else {
scrollFace._x += speed/moveVal;
}
contentMain._x -= speed;
} else {
scrollFace._x = right;
contentMain._x = 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();
Any ideas?
Thanks,
Dave
Convert Movieclip Scroller To Dynamic Text Scroller
I have code I borrowed that is set up to scroll a movie clip image. However, it doesn't work well if I replace the graphics with a text box as the scrolling becomes "jerky" as I think there is too much information for it to process with the complexity of the text. So I was hoping to change the scrolling content from a movie clip image with text to a dynamic textbox. But it will not function when I do that change. In this currrent setup, the movieclip instance name is "contentmain". I tried naming the instance of the dynamic textbox with that name, but no text shows up next to the scroller when I play the movie.
Here's the code:
scrolling = function () {
var scrollHeight:Number = scrollTrac._height;
var contentHeight:Number = contentMain._height;
var scrollFaceHeight:Number = scrollFace._height;
var maskHeight:Number = maskedView._height;
var initPosition:Number = scrollFace._y=scrollTrac._y;
var initContentPos:Number = contentMain._y;
var finalContentPos:Number = maskHeight-contentHeight+initContentPos;
var left:Number = scrollTrac._x;
var top:Number = scrollTrac._y;
var right:Number = scrollTrac._x;
var bottom:Number = scrollTrac._height-scrollFaceHeight+scrollTrac._y;
var dy:Number = 0;
var speed:Number = 10;
var moveVal:Number = (contentHeight-maskHeight)/(scrollHeight-scrollFaceHeight);
// Setup easing event
contentMain.desiredX = contentMain._y;
contentMain.onEnterFrame = function() {
this._y -= (this._y - this.desiredX) / 3;
};
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.desiredX = Math.round(dy*-1*moveVal+initContentPos);
};
};
scrollFace.onMouseUp = function() {
stopDrag();
delete this.onMouseMove;
};
btnUp.onPress = function() {
this.onEnterFrame = function() {
if (contentMain._x+speed<maskedView._x) {
if (scrollFace._x<=left) {
scrollFace._x = left;
} else {
scrollFace._x -= speed/moveVal;
}
contentMain._x += speed;
} else {
scrollFace._x = left;
contentMain._x = maskedView._x;
delete this.onEnterFrame;
}
};
};
btnUp.onDragOut = function() {
delete this.onEnterFrame;
};
btnUp.onRelease = function() {
delete this.onEnterFrame;
};
btnDown.onPress = function() {
this.onEnterFrame = function() {
if (contentMain._x-speed>finalContentPos) {
if (scrollFace._x>=right) {
scrollFace._x = right;
} else {
scrollFace._x += speed/moveVal;
}
contentMain._x -= speed;
} else {
scrollFace._x = right;
contentMain._x = 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();
Any ideas?
Thanks,
Dave
Text Scroller With Image With Mouse Scroller
Hi to all,
I have problem with flash. that i want to creat dynamic text & image scroller in scroller by creating custom scroller (not inbuilt component) That scroller i can scroll with help of mouse's scroller. (the mouse's scroller & image must be include in to the scroller box)
Help me !
Help me !
Reply me fast if u have solution for it!!!!
Regards,
Samual
Convert Vertical Scroller To Horizontal Scroller
Hi have a cool vertical scroller that I did try to convert to horizontal, but I could not make it work.
Can someone help ??
Below is the code for vertical scroller:
Thanks to anyone who can help.
//code by Billy T
//set a variable
targY=0;
//set the x position of the dragger
dragger._x = 370;
line._x = 370;
//set the drag action of the dragger
//drag is restricted to the height of the mask
dragger.onPress=function(){
startDrag(this,false,this._x,0,this._x,theMask._he ight-this._height);
}
//stop the drag
dragger.onRelease=dragger.onReleaseOutside=functio n(){
stopDrag();
}
//set the mask for the text
theText.setMask(theMask);
//the scrolling animation
theText.onEnterFrame=function(){
/*set a variable
this variable basically stores info regarding what fraction of the total text
is being displayed through the mask and ensures that dragging the dragger
from top to bottom will reveal all the text.
this allows you to change the amount of text and the scroller will update itself
*/
scrollAmount=(this._height-(theMask._height/1.3))/(theMask._height-dragger._height);
//set a new target y position
targY=-dragger._y*scrollAmount;
//set the y of the text to 1/5 of the distance between its current y and the target y
//change the 5 to a lower number for faster scrolling or a higher number for slower scrolling
this._y-=(this._y-targY)/5;
}
Horizontal Scroller...NOT Vertical Scroller
Hi all:
I was just curious if anyone knows of a good tutorial for a horizontal scroller ... I want to use arrows not a bar, and I can find the vertical tutorials, but I was curious if anyone knew of a horizontal one.
THanks in advance
Image+text Scroller, Form Scroller, And Loading External Text Files - Urgent
Hi everybody!
Does anybody know how to do the following things in Flash MX?
1.Make a scroller with text + images in it;
2.Make a scroller with text + a form in it;
3.I followed the tutorial entitled "Scrolling Dynamically Loaded Text", but the text that I tried to load has over 160 lines, and I can only scroll down to about half way of the total lines. Why is that?
4.I also tried to load xml files using the code <?xml version="1.0" encoding="utf-8"?> on the first line of each xml file, but the ', &, and " " don't work.
Can anybody help me, please? This is urgent!
Thanks in advance!
animind
Image+text Scroller, Form Scroller, And Loading External Text Files - Urgent
Hi everybody!
Does anybody know how to do the following things in Flash MX?
1.Make a scroller with text + images in it;
2.Make a scroller with text + a form in it;
3.I followed the tutorial entitled "Scrolling Dynamically Loaded Text", but the text that I tried to load has over 160 lines, and I can only scroll down to about half way of the total lines. Why is that?
4.I also tried to load xml files using the code <?xml version="1.0" encoding="utf-8"?> on the first line of each xml file, but the ', &, and " " don't work.
Can anybody help me, please? This is urgent!
Thanks in advance!
animind
Elastic...
how can i make a square works like the example in these page: http://www.in2media.com/enter.cfm
give elastic properties to a square when it grows up..
Elastic MC
Can someone tell me the script to make a MovieClip bounce "in and out" NOT "Side to side"? Also after about 2-5 bounces make it stop?
Thanks!
Elastic
Hi can anybody help with this AS. I'm trying to attach another MC to the top ball of this elastic. So that you can drag this other MC, and the top ball together. I can't seem to get it.
elastic.fla
Need/how To - Elastic Nav
I am designing my site using a vertical primary nav (see attached jpeg).
Straight forward it seems, but I want it to have an elastic element to it like the ones in the following link:
http://www.flashcomponents.com/detai...f&id=444&link=
Mine would probably be the 'Vertical Sample 1'
Can anyone provide me with an FLA or tell me exactly how I need to do it.
Thanks.
Elastic Nav
Hey actionscripters,
Any1 has a script example or example file to gimme a general idea how to create a nav effect similar to this:
http://www.rbk.com/DGK/
Jace
Elastic Box
Hi
I have seen this animation trick a couple of times now.. what it is, is a box - usually just an outline that expands form a small box to a large one. When it gets to its full size it retracts and then expands like its elasticated. Know what I mean? How is this done? There must be some script for it right?
Can you help?
Thanks
Elastic Box
I know this is probably easy but does anyone know how to do a elastic effect where a box enlarges to a certain height like 640 by 480 but instead of just enlarging to that size it bounces back a little before it gets there, like a rubber effect, or like a magnify effect, its hard to explain, I hope someone here understands me. Thanks!
Elastic Box
Hi
I have seen this animation trick a couple of times now.. what it is, is a box - usually just an outline that expands form a small box to a large one. When it gets to its full size it retracts and then expands like its elasticated. Know what I mean? How is this done? There must be some script for it right?
Can you help?
Thanks
Elastic MC
Can someone tell me the script to make a MovieClip bounce "in and out" NOT "Side to side"? Also after about 2-5 bounces make it stop?
Thanks!
Elastic 3D?
Hi all,
I'm looking to create a simple fun element in Flash that is similar to this, but is also elastic and you can drag each sphere and when you let it go, it elasticises back to into position.
I'm sure I've seen a tutorial for this around, but can anyone tell me where it is or how this can be done?
Thanks.
[AS] Elastic
Last edited by abgen : 2006-07-20 at 02:12.
As I build up to a general purpose 2D engine, I've decided to do elasticity. I might make collisions plastic at some point, and I will be doing some nifty collision detection as part of my PhD (probably)... till then, here's the code for some simple elasticity:
*EDIT*
Removed the code and placed it in downloadable form: http://www.anygivenfriday.com/downloads/elastic.zip
Again you can see the results at: http://www.anygivenfriday.com/elastic/
Cheers
Paul
Need/how To - Elastic Nav
I am designing my site using a vertical primary nav (see jpeg link below).
Straight forward it seems, but I want it to have an elastic element to it like the ones in the following link:
http://www.flashcomponents.com/deta...d=444&link=
Mine would probably be the 'Vertical Sample 1'
Can anyone provide me with an FLA or tell me exactly how I need to do it.
Thanks.
http://www.flashkit.com/board/attach...postid=2916542
Elastic Script Help
I'm hoping someone can point me in the right direction for some kind of tutorial for an elastic script menu.
The only site examples of what I want to do that I know of are http://www.tomato.co.uk & http://www.chdatlanta.com
I think an online magazine used the idea before, but I don't remember what the URL is.
Any help appreciated.
Elastic Menu
I have a menu which uses the math elasticity actionscript (for lack of a better description). The menu works fine except I cannot get the options to stay down to click on. My main timeline has a button with the following actionscript:
on (rollOver) {
_root.menu._visible = !_root.menu._visible;_root.menu._y += _root.dy;
}
on (rollOut) {
_root.menu._visible = 0;
}
This same frame has the following actionscript:
// Spring constant
spring = .80;
// Damping constant
damp = 0.9;
// Bump displacement
dx = 100;
dy = 100;
// velocity multiplyer
_root.menu._visible = 0;
stop ();
This goes to the mc called menu which bounces and springs on mouseover. If I take out the on rollOut in the button on the main timeline, the menu stays down of course, but won't go back up when you roll off the menu.
Does anyone have a solution? Thanks in advance for your help.
Elastic Effect
How do you create an elastic line. so that when u like on a certain point on it it stretches like elastic?
|