Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Easing Text Box...



Hey all,
Have you seen those 'easing' text boxes on some web sites?
I would like to know if theres a tutorail on the net on how to make them before a take a shot at making it my self.
i googled it but nothing really came up...
my text will by dynamicailly loaded so i would think i'd use the maxscroll paramter to get me the max end of the text field that link a scroll bar's x axis to proportionally scroll the text box. am i on the right track.



KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 05-26-2004, 03:08 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Easing Text
can anyone point me to a good tutorial on how to ease text in a scroll pane, or scroll bar

Easing Text Box...
Hey all,
Have you seen those 'easing' text boxes on some web sites?
I would like to know if theres a tutorail on the net on how to make them before a take a shot at making it my self.
i googled it but nothing really came up...
my text will by dynamicailly loaded so i would think i'd use the maxscroll paramter to get me the max end of the text field that link a scroll bar's x axis to proportionally scroll the text box. am i on the right track.

Easing Text Area
i want to make a text area that moves with easing, i will be using pixel fonts so it needs to move on whole pixel coordinates. At the moment i'm using a scrollbar to move it but this could just as easily be buttons. I know that i need to place the text area inside an mc and target this mc but beyond that i'm stumpted, any help would be much appreciated.

Easing Text In Scrollbar
I saw nice Easing text in scrollbar in lot of flash sites.
Exist some tutorial for this?
Do you know what i mean?
If no I will found some example.

Easing Text Window
can someone show me how to make a scrolling text box like this one:

http://free.onebyonedesign.com/

I have one that loads text through actionscript and the arrows work and all, but I would really like the scrollbar as well as the easing effect. Thanks.

Easing Text Scroller
Hi Guys. Hope someone can help.
I've been using the same easing text scroller on my projects for a few months now and it works fine, but I've just noticed (after looking at other sites) that the one I'm using isn't very smooth. but when I scroll I find that the text changes between clear and fuzzy, even if I use pixel fonts? I can understand why but I've been looking at some which dont go fuzzy at all.

Does anyone know any tips for a good easing scroller that keeps the text clear or point me to a tutorial/fla file?

Is it something in the script to say only move in integres so that the text stays clear??

Thanks guys. Phil

Dynamic Text In Easing
When I use an easing menu I can't use dynamic text to improve my font. When I use it dynamic it's gone . The easing still works but there isn't any text on it. That isn't a problem if the entire site had static text. But i've used only dynamic text and then it looks crummy. Is there a way to still use dynamic text in my easing?

Easing Text In Scrollbar
I saw nice Easing text in scrollbar in lot of flash sites.
Exist some tutorial for this?
Do you know what i mean?
If no I will found some example.

Dynamic Text 'easing'
i would really like to learn how to make scrollable text 'ease' up and down. an example would be the news section of the 2210 media site (http://www.2210media.com/main/flash.html). if anyone could point me in the direction of a tutorial, that would be great. also, would it require a special text scroller to be created? just curious...

thanks!

trig

Scripted Easing Text
I'm looking for a way to program some sliding text - slides to the center of the stage, pauses for a second then slides down off-stage while a new line of text slides to the center of the stage. Rinse and repeat. I would like to loop a certain number of these text clips indefintely.

Here's what I have so far - using the Tween class and setInterval but I'm open to any slick scripted solution. The more over the text movement and timing of the clips the better. Note that there's a 3 second delay before the text enters the stage:

http://www.tornedgedesign.com/_test/...ease_text.html

Work files:
http://www.tornedgedesign.com/_test/kirupa/ease.zip

Dynamic Text In Easing
When I use an easing menu I can't use dynamic text to improve my font. When I use it dynamic it's gone . The easing still works but there isn't any text on it. That isn't a problem if the entire site had static text. But i've used only dynamic text and then it looks crummy. Is there a way to still use dynamic text in my easing?

Text Scroll With Easing
Hi guys!

Guys need you help (Action script masters) i have a flash project with text scroll,
and the clients wants no ordinary text scroll, they wanted a text scroll with easing, just like what www.zfort.com has,( for those flash gurus-how do you handle this one) ive been searching for a week now, from flash kit to kirupa, but havent find one. guys hope you could help me out here!!, a source file would be great so i could figure out how its done.

thanks a lot!!!!!

Easing Text Field
Hey

Trying to create my own text scroller using my own code so i completely understand whats going on. Problem is my logic is messed up so need for someone to look at my code and tell me where the wholes are in the logic.

The problem i am having is when i make a call to the eastTo function, where i am trying to ease the text field to a new resting position, the behavior gets really messed. It works correctly the first time you release the button, but then breaks after that. Well it works the first time if you don't scroll up for too long. I think the issue is that the y position of the target text field goes from being a positive value on the stage to a negative value which throws off the logic in the easTo function.

here is the FLA file
http://www.imagesbystone.com/custom_scroller.zip

and Here is the code i have created so far.

btw aboutText is the instance name of my text MovieClip

any help is very much appreciated
////////////////////////////////////////////////////////////////////////////////////////////
var interval:Number;
var interval2:Number;


btn_1.onPress = function() {
interval = setInterval(scrollDown, 3, aboutText);
updateAfterEvent();
}

btn_1.onRelease = function() {
clearInterval(interval);
var nPosition:Number =-( _root.aboutText._y+50);
interval2=setInterval(easeTo, 3, nPosition, aboutText);
updateAfterEvent();
//trace(nPosition);
trace(_root.aboutText._y);
}


//This function moves the target text field down
function scrollDown( mText:MovieClip ){
if(mText._y<= -710 ) {
clearInterval(interval);
}
else
mText._y = mText._y -1;
}

//This Function slows the target text field down once the user released the scroll button
function easeTo(nPosition:Number, mText:MovieClip)
{
if( mText._y<= nPosition ) {
clearInterval(interval2);

}
else
mText._y = mText._y +(nPosition - mText._y)/100 ; //this equation finds the distance between the target text and nPosition
}

Scrolling Text With Easing?
Does anyone know how to scroll text with easing? I am looking for a tutorial that will show me how to do it.

Text+easing = Blured Text
I want to make horizontal easing that depends on stagewidth. I have made all coding and it works fine, but text in easing MC becomes sometimes slightly blured. I use pixel fonts and the start position is a round number: x.0 y.0
Is there any way to put some variable that makes corrections, like in some scrollers? Maybe it’s impossible because when someone resizes browser window it isn’t on round number, or it is?

How Do I Create A Text Scroller With Easing?
Okay, I can create a text scroller, but how do I implement easing?

thanks

Can Someone Please Show Me How To Do A Text Scroller With Easing?
Please help, been looking for this for weeks...

Easing Text Prototype Problem
Hello there,
I want to use a prototype for easing text on a text field.
So far the one I'm using works fine until I add another movieclip and I use the same prototype.
Here is my code,
Any ideas why this is happening?
Thanks

ActionScript Code:
loadVarsText = new LoadVars();
loadVarsText.load("news.txt");
loadVarsText.onLoad = function(success) {
    if (success) {
        trace ("Done loading news");
        newsmain.scroller.html = true;
        //trace("* " + this.news.toString());
        newsmain.scroller.htmlText = this.news;
        newsmain.scroller.autoSize = "left";
        trace("Text height: " + newsmain.scroller._height);
        trace("Mask Height: " + mask_mc._height);
        if(newsmain.scroller._height <= mask_mc._height){
            up_btn._visible = false;
            newsdragger._visible = false;
            bar._visible = false;
            down_btn._visible = false;
        }
        trace("TEXTFIELD HEIGHT: " + newsmain.scroller._height);
        trace("CLIP HEIGHT: " + newsmain._height);
        offset = newsmain._height - newsmain.scroller._height;
        trace("OFFSET: " + _level0.thumbsnews_mc.offset);
        bottom = (newsmain._y+mask_mc._height-newsmain._height-space)+offset;
    } else {
        trace ("not loaded");
    }
};

stop();

fscommand("allowscale", "false");
bar.useHandCursor = newsdragger.useHandCursor=false;

space = 20;
friction = 0.9;
speed = 5;

y = newsdragger._y;
top = newsmain._y;
bottom = newsmain._y + mask_mc._height - newsmain._height - space;

newsdragger.onPress = function() {
    drag = true;
    trace(this._parent._name); //thumbsnews_mc
    trace(this._name); //newsdragger
    this.startDrag(false, this._x, this._parent.y, this._x, this._parent.y+this._parent.bar._height-this._height);
    newsdragger.scrollEase();
};

newsdragger.onMouseUp = function() {
    this.stopDrag();
    drag = false;
};

bar.onPress = function() {
    drag = true;
    if (this._parent._ymouse>this._y+this._height-this._parent.newsdragger._height) {
        this._parent.newsdragger._y = this._parent._ymouse;
        this._parent.newsdragger._y = this._y+this._height-this._parent.newsdragger._height;
    } else {
        this._parent.newsdragger._y = this._parent._ymouse;
    }
    newsdragger.scrollEase();
};

bar.onMouseUp = function() {
    drag = false;
};

moveDragger = function (d) {
    if ((newsdragger._y>=y+bar._height-newsdragger._height && d == 1) || (newsdragger._y<=y && d == -1)) {
        clearInterval(myInterval);
    } else {
        newsdragger._y += d;
        newsdragger.scrollEase();
        updateAfterEvent();
    }
};

up_btn.onPress = function() {
        myInterval = setInterval(moveDragger, 20, -1);
};

down_btn.onPress = function() {
        myInterval = setInterval(moveDragger, 20, 1);
};

up_btn.onMouseUp = down_btn.onMouseUp=function () {
        clearInterval(myInterval);
};

up_btn.onRollOver = function() {
        this.gotoAndPlay("over");
};

up_btn.onRollOut = function() {
        this.gotoAndPlay("out");
};

down_btn.onRollOver = up_btn.onRollOver;
down_btn.onRollOut = up_btn.onRollOut;
up_btn.onPress = function() {
        this.gotoAndPlay("down");
        myInterval = setInterval(moveDragger, 20, -1);
};

down_btn.onPress = function() {
        this.gotoAndPlay("down");
        myInterval = setInterval(moveDragger, 20, 1);
};

MovieClip.prototype.scrollEase = function() {
    this.onEnterFrame = function() {
        if (Math.abs(dy) == 0 && drag == false) {
            delete this.onEnterFrame;
        }
        //trace("news** " + this._name);
        r = (this._y-y)/(bar._height-this._height);
        dy = Math.round((((top-(top-bottom)*r)-newsmain._y)/speed)*friction);
        newsmain._y += dy;
       // trace(newsmain._y);
    };
};

Adding Easing To Text Slider
Can anyone advise on on how to add easing to my text slider?

here's my code:


ActionScript Code:
var myTextLoader:URLLoader = new URLLoader();
myTextLoader.dataFormat=URLLoaderDataFormat.VARIABLES;

myTextLoader.addEventListener(Event.COMPLETE, onLoaded);

function onLoaded(e:Event):void {
scrollText.text = e.target.data.main;


}

myTextLoader.load(new URLRequest("main.txt"));

//scrolling

scrollBar.addEventListener(MouseEvent.MOUSE_DOWN, dragSlider);
stage.addEventListener(MouseEvent.MOUSE_UP, dropSlider);

var bounds:Rectangle = new Rectangle(scrollBar.x, scrollBar.y,0,70);
var dragging:Boolean = false;
function dragSlider(event:MouseEvent):void
{
scrollBar.startDrag(false,bounds);
dragging = true;
}
function dropSlider(event:MouseEvent):void
{
scrollBar.stopDrag();
dragging = false;
}
function checkSlider(event:Event):void
{
//if(dragging){trace("scroll");}
scrollText.scrollV = Math.round ((scrollBar.y - bounds.y)* scrollText.maxScrollV/70)
}
stage.addEventListener(Event.ENTER_FRAME, checkSlider);
function textScrolled(event:Event):void
{
scrollBar.y = bounds.y + (scrollText.scrollV * 70/scrollText.maxScrollV);


}
scrollText.addEventListener(Event.SCROLL, textScrolled);

Text Easing In Without Mouse Clicking
looked at the tutorial in for text easing on mouse click i took out the mouse click funcion. now what do i do now? need some understanding. I take out the mouseclick function



Code:
onClipEvent (load) {
_x = 600.4;
_y = 535.4;
speed = 5;
}
onClipEvent (enterFrame) {
_x += (endX-_x)/speed;
_y += (endY-_y)/speed;
}
now it starts out aht onClipEvent(load)
but it ends up in 0.0 / 0.0

I dont understand how i would change the OnClipEvent (enterFrame) code to make it move where i want to go.

Mc Resize Via Text Input With Easing
Okies,
Thanks before to tha legends who helped me with an easy problem.

I have a movieclip (flooring) that resizes via text input. Now i want to add easing to that.

I have posted a fla with both easing and text input examples...

any takers??

Thanks....

External Easing Dynamic Text In AS 3.0
I'm new to AS 3.0 Can somebody walk me through how to create the bottom right scrolling text (easing, scrollbar) on this site:

http://www.flash-creations.com/notes...scrolltext.php

All help greatly appreciated!

Dynamic Scrolling Text W/Easing
Hello all:

I have been trying a number of different ways to go about trying to get a textbox to ease as one scrolls up and down. The best thing I have come up w/so far is to have a dynamic text box w/a mask and create your own scrollbar. Is there a better way to go about this? Any examples out there?

Thanks,

- John -

Scrolling Text With Easing Having Links?
Can links be place inside a scroll that uses easing?

Dynamic Text With Easing Effect?
Hello there,
can anybody show me how to make scroller with easing effect and dynamicly loaded text. I've tried to do it maybe 2-3 days, but ...nothing happens. If anybody have idea, or ready to use code and there is no problem to post it here... please, post it.
10x a lot

Text Scroller With Easing And Wheel Usability
Hello
Trawling through the many scroller / text box tutes out there, I have found a couple of good ones :
here

and here

but what i would love to read is a tutorial that offers both easing capability with the option of having the wheel move the text as well.

any guides out there for this ? (I will only be using static text)

DJ

Modify Code To Scroll Text With Easing
Using the new mx transtions and tweens, how can I alter this code to allow for scrolling with easing?

code:
// Needed functions **********************************************

// Rule of three
rot = function (a, b, x) {
return ((x * b) / a);
};

if (forceUpdate) {
// This creates a function that checks the textfield value and updates accordingly.
// This is needed because flash doesn't fire the onChanged() event when the textfield
// is changed by a loadvariables command.
// It's a bit ugly, but it's the only way
var cc = this.createEmptyMovieClip("stupidController", 31337);
cc.oldTx = tx.htmlText;
cc.onEnterFrame = function() {
if (this._parent.tx.htmlText != this.oldTx) {
// new text loaded/modified
this._parent.update();
};
};
}

// Resets the deal: reads the maximum number of visible lines
reset = function() {
tx.scroll = 1;
}

// Update: called when the scroll has to be redraw
update = function() {
if (!foreground.dragando) {
if (tx.maxscroll > 1) {
var totalLines = tx.bottomScroll - tx.scroll;
// Enables
_alpha = 100;
if (tx.scroll > tx.maxscroll) tx.scroll = tx.maxscroll; // fixes a weird error of not updating .scroll when a part of the text is deleted from the end of the string
foreground._height = rot(tx.maxscroll+totalLines,totalLines+1, background._height);
if (useFgHeight) foreground._height = fgHeight;
foreground._y = rot(tx.maxscroll-1,tx.scroll-1,background._height-foreground._height);
foreground.onRollOver = background.onRollover = function() {
// The foreground should do nothing on rollover. This block is used
// to turn the movieclip into a "button", sort of.
}
foreground.useHandCursor = useHand;
background.useHandCursor = useHand;
} else {
// Disables
_alpha = disAlpha;
foreground._y = 0;
foreground._height = background._height;
delete (foreground.onRollover);
delete (background.onRollover);
foreground.useHandCursor = false;
background.useHandCursor = false;
}
}
}


// Scroller functions *********************************************
foreground.onLoad = function () {
this.dragando = false;
this.offset = 0;
};

foreground.onMouseDown = function () {
// Checks if a drag should start
if (this.hitTest (_root._xmouse, _root._ymouse, false)) {
this.dragando = true;
this.offset = this._y - _parent._ymouse;
}
};

foreground.onMouseUp = function () {
// Ends drag, if any
this.dragando = false;
};


foreground.onMouseMove = function () {
// Move and update, if being dragged
if (this.dragando) {
this._y = _parent._ymouse + this.offset;
if (this._y < 0) this._y = 0;
if ((this._y + this._height) > this._parent.background._height) this._y = this._parent.background._height - this._height;
tx.scroll = Math.round(rot(this._parent.background._height-this._height, this._y, tx.maxscroll-1))+1;
}
}


// Background functions *********************************************
background.onMouseDown = function () {
// Verifies if the background has been clicked
var totalLines = tx.bottomScroll - tx.scroll;
if (this.hitTest (_root._xmouse, _root._ymouse, false) && !this._parent.foreground.hitTest (_root._xmouse, _root._ymouse, false)) {
if (this._parent._ymouse < this._parent.foreground._y) {
// Big scroll up
this.contador = 0;
this.onEnterFrame = function () {
if (this.contador % 5 == 0)tx.scroll -= totalLines;
this.contador++;
if (this._parent._ymouse >= this._parent.foreground._y) delete (this.onEnterFrame);
}
} else if (this._parent._ymouse > this._parent.foreground._y+this._parent.foreground ._height) {
// Big scroll down
this.contador = 0;
this.onEnterFrame = function () {
if (this.contador % 5 == 0)tx.scroll += totalLines;
this.contador++;
if (this._parent._ymouse <= this._parent.foreground._y+this._parent.foreground ._height) delete (this.onEnterFrame);
}
}
}
};

background.onMouseUp = function () {
delete (this.onEnterFrame);
};

// Mousewheel functions *********************************************

this.onEnterFrame = function() {
// Checks to see if it's inside this textfield's bounding box

// I can't use a object watch event because there might be different
// textfields on the same screen - an object property can't have
// two different watchers.
var mx = tx._parent._xmouse;
var my = tx._parent._ymouse;
if (mx >= tx._x && mx <= tx._x + tx._width && my >= tx._y && my <= tx._y + tx._height) {
// It's IN

// Mouse wheel movement is expressed in ticks, which are bigger
// than simple line movements - they depend on the current mouse
// wheel speed set on the user's system. This calculation is done
// to reach a reasonable rate of line movement according to the
// user's mouse wheel movement.
ticksPerLine = 60;
if ((_level0.__wheelDelta + 0) != 0) {
tx.scroll -= (_level0.__wheelDelta/ticksPerLine);
_level0.__wheelDelta = 0;
}
}
};

// Initializes ************************************************** ****

// Shortcuts
tx = _parent[textfield_name];

// Reset size to 1:1
background._height = this._height;
this._yscale = 100;

// Sets colors
clr = new Color(foreground);
clr.setRGB (fgColor);
foreground._alpha = fgAlpha;

clr = new Color(background);
clr.setRGB (bgColor);
background._alpha = bgAlpha;

delete (clr);


// Sets text update functions and initializes
tx.reset = reset;
tx.reset();
tx.onChanged = tx.onScroller = update;
tx.onChanged();

// End: sit down and wait ******************************************

stop();

Dynamic Text Fields In Easing Menu?
I'm trying to use the following menu

Easing Menu Tutorial.

Implementation was not a problem.
However, i'm also trying to add dynamic text boxes to each "stage". It seems like the text box works fine, scroll bars even show. However, i cannot seem to see the text. I can select it, however it remains invisible.

I've really no idea where to start on this. I tried to play around with static/dynamic texts. Static works fine. But i need it to be dynamic, since i want to load external text files for the content.

Thanks!!

Input Text Not Selectable With Masked Easing
'dynamic input text' is not selectable within a scrollable mask, can someone explain or a work around would be appreciated. i have attached my fla file for your review.

thanks.

i put this post in flash mx, but it really belongs to actionscript 2.0 forum.

Movie Clip Text Scroll With Easing
Hi everyone, im curious how other site did their text scroller with easing, sample is what www.zfort.com/ has on their text scrollers. is there anyone here who could help me make one? or a tutoral sites for movie clip text scroller. thanks in advance!!!!

Horizontal External Text Scroller With Easing?
Does anyone know a tutorial or source for a Horizontal External Text Scroller preferably with easing?

Input Text Not Selectable With Masked Easing
can't seem to get an answer from another forum so i thought i would try it here.

'dynamic input text' is not selectable within a scrollable mask, can someone explain or a work around would be appreciated. i have attached my fla file for your review.

thanks.

How To Load Dynamic Text In Easing Scroller
hey guys, i downloaded one of the easing scrolls from the kirupa forum and i need some help on how to load dynamic text into the scrollbar. can anyone give me some ideas on how the script would be modified. i tried to modify the xml with the scroll but by screen turns black and the text/scrollbar don’t work. appreaciate any help. i attached the file here what i downloaded.


Code:
//THIS IS IN THE ROLAGEM AS FILE

import mx.utils.Delegate;
class Rolagem {
// VARIABLES
// ---
// MCs to be used
private var btnUp:MovieClip;
private var btnDown:MovieClip;
private var dragger:MovieClip;
private var scrollbg:MovieClip;
private var contentMain:MovieClip;
private var contentMask:MovieClip;
// Settings variables
private var moveSpeed:Number = 1;
private var easingSpeed:Number = 7;
private var scrollWheelSpeed:Number = 20;
// General use variables
private var mouseListener:Object;
private var left:Number;
private var top:Number;
private var right:Number;
private var bottom:Number;
private var scrollable:Number;
private var initContentPos:Number;
private var scrollHeight:Number;
private var easing:Number;
// CONSTRUCTOR
// ---
public function Rolagem(easing:Number, btnUp:MovieClip, btnDown:MovieClip, dragger:MovieClip, scrollbg:MovieClip, contentMain:MovieClip, contentMask:MovieClip) {
this.btnUp = btnUp;
this.btnDown = btnDown;
this.dragger = dragger;
this.scrollbg = scrollbg;
this.contentMain = contentMain;
this.contentMask = contentMask;
this.easing = easing;
this.scrollHeight = this.scrollbg._height;
// how much of the movie can be scrolled
this.scrollable = this.contentMain._height - this.contentMask._height;
this.initContentPos = this.contentMain._y;
// the drag positions that are possible for the dragger
this.left = this.scrollbg._x;
this.top = this.scrollbg._y;
this.right = this.scrollbg._x;
this.bottom = this.scrollbg._height - this.dragger._height + this.scrollbg._y;
this.contentMain.setMask(this.contentMask);
// before we do anything make sure the content is even scrollable, if it isn't hide everything and return
if (this.scrollable < 0) {
this.dragger._visible = false;
this.btnUp.enabled = false;
this.btnUp._alpha = 50;
this.btnDown._alpha = 50;
this.scrollbg._alpha = 50;
this.btnDown.enabled = false;
return;
}
this.scrollbg.useHandCursor = this.dragger.useHandCursor = false;
this.scrollbg.onPress = Delegate.create(this, scrollPress);
this.dragger.onPress = Delegate.create(this, dragPress);
this.dragger.onMouseUp = Delegate.create(this, dragMouseUp);
this.btnUp.onPress = Delegate.create(this, btnUpPress);
this.btnUp.onDragOut =
this.btnUp.onRelease = Delegate.create(this, btnUpDeleteEnterFrame); //Delegate.create(this, btnUpDragOut);
this.btnDown.onPress = Delegate.create(this, btnDownPress);
this.btnDown.onDragOut =
this.btnDown.onRelease = Delegate.create(this, btnDownDeleteEnterFrame); //Delegate.create(this, btnDownDragOut);
this.contentMain.onEnterFrame = Delegate.create(this, contentEnterFrame);
// Registering the listener
this.mouseListener = new Object();
Mouse.addListener(this.mouseListener);
this.mouseListener.onMouseWheel = Delegate.create(this, mouseWheel);
updateContentPos();
}
// onEnterFrame of the content
private function contentEnterFrame():Void {
if (!this.easing || this.easing == undefined) {
this.contentMain._y = this.contentMain.newY;
} else {
this.contentMain._y += Math.round((this.contentMain.newY - this.contentMain._y) / this.easingSpeed);
}
}
// Updates the contents position
private function updateContentPos():Void {
var percent_scrolled:Number = (this.dragger._y - this.top) / (this.scrollHeight - this.dragger._height);
// instead of setting the _y property directly, we simple set newY
// that way we can adjust how we handle the new Y coordinate we'd like to move to
this.contentMain.newY = Math.round(this.initContentPos - (percent_scrolled * this.scrollable));
}
// Dragger actions
private function dragPress():Void {
startDrag(this.dragger, false, this.left, this.top, this.right, this.bottom);
this.dragger.onMouseMove = Delegate.create(this, dragMouseMove);
}
private function dragMouseMove():Void {
updateContentPos();
updateAfterEvent();
}
private function dragMouseUp():Void {
this.dragger.stopDrag();
delete this.dragger.onMouseMove;
}
// Background of the Dragger actions
private function scrollPress():Void {
if (this.scrollbg._parent._ymouse > this.scrollbg._y + this.scrollbg._height - this.dragger._height) {
this.dragger._y = this.scrollbg._parent._ymouse;
this.dragger._y = this.scrollbg._y + this.scrollbg._height - this.dragger._height;
} else {
this.dragger._y = this.scrollbg._parent._ymouse;
}
updateContentPos();
}
// Up Arrow actions
private function btnUpPress():Void {
this.btnUp.onEnterFrame = Delegate.create(this, btnUpEnterFrame);
}
private function btnUpEnterFrame():Void {
this.dragger._y = Math.max(this.top, this.dragger._y - this.moveSpeed);
updateContentPos();
}
private function btnUpDeleteEnterFrame():Void {
delete this.btnUp.onEnterFrame;
}
// Down Arrow actions
private function btnDownPress():Void {
this.btnDown.onEnterFrame = Delegate.create(this, btnDownEnterFrame);
}
private function btnDownEnterFrame():Void {
this.dragger._y = Math.min(this.bottom, this.dragger._y + this.moveSpeed);
updateContentPos();
}
private function btnDownDeleteEnterFrame():Void {
delete this.btnDown.onEnterFrame;
}
// Mouse Wheel
private function mouseWheel(delta:Number):Void {
var d:Number;
if (delta > 1)
delta = 1;
if (delta < -1)
delta = -1;
d = -delta * this.scrollWheelSpeed;
trace(d);
if (d > 0)
this.dragger._y = Math.min(this.bottom, this.dragger._y + d);
if (d < 0)
this.dragger._y = Math.max(this.top, this.dragger._y + d);
updateContentPos();
}
}

Code:
//THIS IS IN THE FLA FILE
var rolagem:Rolagem = new Rolagem(10, mc_sobe, mc_desce, mc_rolagem, bg_rolagem, mc_conteudo, mc_mascara);

Flash 8 Scroll Text With Easing Using A Slider
(the same as on junkerjorg website!)

Does anyone know a good tutorial?

I was following this tutorial quite nicely

http://flash-creations.com/notes/act...scrolltext.php

untill the end where it is clearly missing a large portion of code so you can pay him to get the files. or am i being stupid?

I need to know how to make my slider move only up and down, at the moment you can move it wher you like, and how t actualy get it to controll the text.

here is the code i have so far, scrollbar5 is the name of my scroller descrip5 is the name of the textfield

many thanks in advance

// variable to store height of textfield after text added

var textheight:Number;

// variables for calculating scrollbar/textfield relationships
// position of scrollbar when at bottom:

var scrollbarbottom:Number = scrollbar5._y + (mask4._height - scrollbar5._height);

// range of scrollbar is from mask._y to scrollbarbottom:
var scrollbarrange:Number = scrollbarbottom - mask4._y;

// Scrolls descrip5 to follow scrollbar
function scrollOnMouseMove() {
this.startDrag(false, this._x, mask4._y, this._x, scrollbarbottom);
this.onMouseMove = function() {
descrip5._y = mask4._y - (textheight - mask4._height) * ((this._y-mask4._y) / scrollbarrange);
}
}

function stopScrollOnMouseMove() {
this.stopDrag();
delete this.onMouseMove;
}

function init() {
descrip5.htmlText = "<b>thisisjustsomesmapletextt";
}
// in init function:
descrip5.autoSize = "left";
// can use same textheight variable calculated for example 4
scrollbar5.onPress = scrollOnMouseMove;
scrollbar5.onRelease = scrollbar5.onReleaseOutside = stopScrollOnMouseMove;

init();

Horizontal Scroll Text With Easing Using A Slider
I found this really cool scroller on one of the threads. I'm novice flash designer and don't know anything about action scripting. but i did get it to work with my own content. Now I wish I could get a horizon scrollbar that scroll the content horizontally. Can someone help me please?

thanks so much guys!

Geng

Movie Clip Text Scroll With Easing
Hi everyone, im curious how other site did their text scroller with easing, sample is what www.zfort.com/ has on their text scrollers. is there anyone here who could help me make one? or a tutoral sites for movie clip text scroller. thanks in advance!!!!

Scrolling Dynamic Loaded Text With Easing?
Hi there!

I'm quite new to flash.
I'm looking for a possibility to scroll a dynamic loaded text.
A simple scrolling is no problem. But i wanted to do a scrolling like some scrollers with static content, with deceleration and acceleration.

Hope you know what i mean, because my english is not the best.

tia

mosed

Easing Scroller Dynamically Loading Text And Pics
I've seen how to load only text into a text scroller dynamically, and I've also seen Claudios version of an easing scroller with text and graphics yet it doesn't load externally.
Any way to make a scroller that'll load text and graphics with easing externally? Like using xml or something. Anyone know of any examples around? I'd just like to have a scroller that I could update regularly with text and graphics without having to go into flash all the time.

Loading Dynamic Text In Easing Scroller - Problem
sorry for the double post, i posted the message in the wrong section ... QUESTION: i downloaded one of the easing scrolls from the kirupa forum and i need some help on how to load dynamic text into the scrollbar. can anyone give me some ideas on how the script would be modified. i tried to modify the xml with the scroll but by screen turns black and the text/scrollbar don’t work. appreaciate any help. I attached the file here what i downloaded.


Code:
THIS CODE IS IN THE AS FILE

import mx.utils.Delegate;
class Rolagem {
// VARIABLES
// ---
// MCs to be used
private var btnUp:MovieClip;
private var btnDown:MovieClip;
private var dragger:MovieClip;
private var scrollbg:MovieClip;
private var contentMain:MovieClip;
private var contentMask:MovieClip;
// Settings variables
private var moveSpeed:Number = 1;
private var easingSpeed:Number = 7;
private var scrollWheelSpeed:Number = 20;
// General use variables
private var mouseListener:Object;
private var left:Number;
private var top:Number;
private var right:Number;
private var bottom:Number;
private var scrollable:Number;
private var initContentPos:Number;
private var scrollHeight:Number;
private var easing:Number;
// CONSTRUCTOR
// ---
public function Rolagem(easing:Number, btnUp:MovieClip, btnDown:MovieClip, dragger:MovieClip, scrollbg:MovieClip, contentMain:MovieClip, contentMask:MovieClip) {
this.btnUp = btnUp;
this.btnDown = btnDown;
this.dragger = dragger;
this.scrollbg = scrollbg;
this.contentMain = contentMain;
this.contentMask = contentMask;
this.easing = easing;
this.scrollHeight = this.scrollbg._height;
// how much of the movie can be scrolled
this.scrollable = this.contentMain._height - this.contentMask._height;
this.initContentPos = this.contentMain._y;
// the drag positions that are possible for the dragger
this.left = this.scrollbg._x;
this.top = this.scrollbg._y;
this.right = this.scrollbg._x;
this.bottom = this.scrollbg._height - this.dragger._height + this.scrollbg._y;
this.contentMain.setMask(this.contentMask);
// before we do anything make sure the content is even scrollable, if it isn't hide everything and return
if (this.scrollable < 0) {
this.dragger._visible = false;
this.btnUp.enabled = false;
this.btnUp._alpha = 50;
this.btnDown._alpha = 50;
this.scrollbg._alpha = 50;
this.btnDown.enabled = false;
return;
}
this.scrollbg.useHandCursor = this.dragger.useHandCursor = false;
this.scrollbg.onPress = Delegate.create(this, scrollPress);
this.dragger.onPress = Delegate.create(this, dragPress);
this.dragger.onMouseUp = Delegate.create(this, dragMouseUp);
this.btnUp.onPress = Delegate.create(this, btnUpPress);
this.btnUp.onDragOut =
this.btnUp.onRelease = Delegate.create(this, btnUpDeleteEnterFrame); //Delegate.create(this, btnUpDragOut);
this.btnDown.onPress = Delegate.create(this, btnDownPress);
this.btnDown.onDragOut =
this.btnDown.onRelease = Delegate.create(this, btnDownDeleteEnterFrame); //Delegate.create(this, btnDownDragOut);
this.contentMain.onEnterFrame = Delegate.create(this, contentEnterFrame);
// Registering the listener
this.mouseListener = new Object();
Mouse.addListener(this.mouseListener);
this.mouseListener.onMouseWheel = Delegate.create(this, mouseWheel);
updateContentPos();
}
// onEnterFrame of the content
private function contentEnterFrame():Void {
if (!this.easing || this.easing == undefined) {
this.contentMain._y = this.contentMain.newY;
} else {
this.contentMain._y += Math.round((this.contentMain.newY - this.contentMain._y) / this.easingSpeed);
}
}
// Updates the contents position
private function updateContentPos():Void {
var percent_scrolled:Number = (this.dragger._y - this.top) / (this.scrollHeight - this.dragger._height);
// instead of setting the _y property directly, we simple set newY
// that way we can adjust how we handle the new Y coordinate we'd like to move to
this.contentMain.newY = Math.round(this.initContentPos - (percent_scrolled * this.scrollable));
}
// Dragger actions
private function dragPress():Void {
startDrag(this.dragger, false, this.left, this.top, this.right, this.bottom);
this.dragger.onMouseMove = Delegate.create(this, dragMouseMove);
}
private function dragMouseMove():Void {
updateContentPos();
updateAfterEvent();
}
private function dragMouseUp():Void {
this.dragger.stopDrag();
delete this.dragger.onMouseMove;
}
// Background of the Dragger actions
private function scrollPress():Void {
if (this.scrollbg._parent._ymouse > this.scrollbg._y + this.scrollbg._height - this.dragger._height) {
this.dragger._y = this.scrollbg._parent._ymouse;
this.dragger._y = this.scrollbg._y + this.scrollbg._height - this.dragger._height;
} else {
this.dragger._y = this.scrollbg._parent._ymouse;
}
updateContentPos();
}
// Up Arrow actions
private function btnUpPress():Void {
this.btnUp.onEnterFrame = Delegate.create(this, btnUpEnterFrame);
}
private function btnUpEnterFrame():Void {
this.dragger._y = Math.max(this.top, this.dragger._y - this.moveSpeed);
updateContentPos();
}
private function btnUpDeleteEnterFrame():Void {
delete this.btnUp.onEnterFrame;
}
// Down Arrow actions
private function btnDownPress():Void {
this.btnDown.onEnterFrame = Delegate.create(this, btnDownEnterFrame);
}
private function btnDownEnterFrame():Void {
this.dragger._y = Math.min(this.bottom, this.dragger._y + this.moveSpeed);
updateContentPos();
}
private function btnDownDeleteEnterFrame():Void {
delete this.btnDown.onEnterFrame;
}
// Mouse Wheel
private function mouseWheel(delta:Number):Void {
var d:Number;
if (delta > 1)
delta = 1;
if (delta < -1)
delta = -1;
d = -delta * this.scrollWheelSpeed;
trace(d);
if (d > 0)
this.dragger._y = Math.min(this.bottom, this.dragger._y + d);
if (d < 0)
this.dragger._y = Math.max(this.top, this.dragger._y + d);
updateContentPos();
}
}

Code:
THIS CODE IS IN THE FLA

var rolagem:Rolagem = new Rolagem(10, mc_sobe, mc_desce, mc_rolagem, bg_rolagem, mc_conteudo, mc_mascara);

Replacing Dynamic Text In Clips With Easing Tween Sequence
I am trying to create dynamically movieclips that will have a sequence easing tween.Every movieclip will have a textfiled with dynamic text that will be replaced. Now I thought that creating only one movieclip and then replecing the text in textfield would be easier, however I'm stuck here. When I add the second tween, the onMotionFinished thing seems to be ignored.
Any idea?

Code:

import mx.transitions.Tween;
import br.transitions.TweenSequence;
import mx.transitions.easing.*;
var mc = this.createEmptyMovieClip("mc", this.getNextHighestDepth());
labelFormat = new TextFormat();
labelFormat.font = "Verdana";
labelFormat.size = 24;
labelFormat.color = 0x000000;
labelFormat.bold = true;
labelFormat.leftMargin = 0;
labelFormat.rightMargin = 0;
labelFormat.indent = 0;
labelFormat.leading = 0;
labelFormat.align = "left";

TextField.prototype.buildLabel = function(tempText) {
this.border = false;
this.selectable = false;
this.text = tempText;
this.maxChars = "2";
this.setTextFormat(labelFormat);
};
mc.createTextField("mytext", 1, 20, 20, 550, 100);
mytext.multiline = true;
mytext.wordWrap = true;
mc.mytext.buildLabel("text1", 50);

var ts:TweenSequence = new TweenSequence();
ts.type = "sequential";
var Tween1:Object = new Tween(this.mc, "_x", Slide.easeOut, this.mc._x, this.mc._x + 300, 2, true);
ts.addTween(Tween1, 1);
Tween1.onMotionFinished = function() {
delay = setInterval(wait, 10000);}
//calling delay
function wait(){
clearInterval(delay);
//delayed action
Tween1.continueTo(550, 3);
};

var Tween2:Object = new Tween(this.mc, "_x", Slide.easeOut, this.mc._x, this.mc._x + 200, 2, true);
mc.mytext.buildLabel("text2", 50);
ts.addTween(Tween2, 2);
Tween2.onMotionFinished = function() {
delay = setInterval(wait, 10000);}
//calling delay
function wait(){
clearInterval(delay);
//delayed action
Tween2.continueTo(550, 3);
Tween2.onMotionFinished = function() {
mc.mytext.buildLabel("text3", 50);
}
};
ts.start();

Frame Based Easing, Into Time Based Easing (in Actionscript)
i have code to move something from placeA-placeB based on time...then i also have a code to move something from placeA-placeB with easing, but its based on frames...can someone supply me with an easing formula based on time?

Easing Out AND Easing In Using Math?
Hello,
I'm familiar with how to ease something in using motion math. Easing out would not be that bad either. But how would I script something easing in half way, then easing out the second half? It would start slow, gradually move faster, then slow to a stop at the end. - almost like a sine wave I guess?

Any thoughts? I appreciate any feedback.

Easing
I would like to Ease some symbols/images into my movie - I am not getting the hang of it. They are still appearing "instantly" - I need a more gradual appearance. Help?! thanks
UFO (and Rush) rocks!

Easing In And Out
Simple Question:

I have an object that moves to the right then stops. I want to ease the movement out then ease it in. I can't seem to figure out how to ease the movement on both ends. Setting the ease numbers in motion tweening won't allow for an ease on both ends. I can't believe this isn't possible, so how can I control the ease from the first keyframe and the last?

Thank You,

Bob

Easing....need A Lil Help
Not too sure why this process seems so complicated,but I am having some problems with easing. Lets say I have two keyframes and on one keyframe the easing is set at 0 and the other side of the keyframe its set to -50(slow down), shouldnt the movement of an object set between the keyframes slow down as the frames progress? Nothing seems to happen? Do youhave to have more than two keyframes set up to do this? All i want is a simple smooth slowdown of motion or speedup of motion to make my animations not look so linear. I have also included three keyframes....one set at 0 easing, then 25 easing, and then 50 easing....and still no sign of speeding up....just plain linear movement. Could someone please educate me on how this easing is done??

Easing...please Help
Not too sure why this process seems so complicated,but I am having some problems with easing. Lets say I have two keyframes and on one keyframe the easing is set at 0 and the other side of the keyframe its set to -50(slow down), shouldnt the movement of an object set between the keyframes slow down as the frames progress? Nothing seems to happen? Do youhave to have more than two keyframes set up to do this? All i want is a simple smooth slowdown of motion or speedup of motion to make my animations not look so linear. I have also included three keyframes....one set at 0 easing, then 25 easing, and then 50 easing....and still no sign of speeding up....just plain linear movement. Could someone please educate me on how this easing is done??

Easing
CAN SOMEONE HELP OUT. HOW DO YOU PUT SIMPLE EASING TO A MC?

Easing?
Hi,

Can anyone recommend a good tutorial on easing? I want my transitions to have a more natural look. Any suggestions?

Cheers,
Jen

AS Easing Help
I have about 15 movie clips in a movie that i want to scale with ease. Ive tried doing this a number of different ways. all of which have woked but they severely slow down the perfomance of my site.

ideally i would like to use penners equations

I want to have a function on the first frame of the main timeline

i.e


PHP Code:



#include "easing_equations.as"
/////////////////////////////////////

function doScale() {
    callback_txt.text = "";
    //
    var w = parseFloat(destw_txt.text);
    var h = parseFloat(desth_txt.text);
    var dur = parseFloat(dur_txt.text);

    square_mc.scaleClip("easeInOutCubic", w, h, dur);
    //callback event invoked when tweening is done
    square_mc.onScaleDone = function() {
        delete this.onEnterFrame;
    //    callback_txt.text = "callback - scaling done";
    };
}




then call the function like this:

PHP Code:



square_mc.scaleClip("easeOutCubic", 300, 150, 30);




but i want to have it delete this.onEnterframe
when the scale is complete.

can anybody help set up this function properly so it doesnt bog down the processor?

Copyright © 2005-08 www.BigResource.com, All rights reserved