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








Scroll Stop


AS sumos! Can anybody tell me or show me how this kind of scroller is made. It stoppes by every singel project and has a relly nice counter Plz

http://www.ottobonigroup.com/

Thanks & Regards
- Chris




KirupaForum > Flash > Flash 8 (and earlier)
Posted on: 09-14-2006, 12:02 PM


View Complete Forum Thread with Replies

Sponsored Links:

Scroll Stop
Hey Guys, I used the slide tutorial from flashkit for my menu. Works great ,but I want something to be added.
If the user puts the mouse_cursor OUTSIDE the menu it should stop scrolling.
How can I do this?Can you help me out with the code?
I tried actionscript board but nobody seems te reply..I really need this...

I putted the slidecontroller down here!

thanx


code:

frame1:
______
speed =40;
slut = getProperty ( strip, _width);
setProperty ("strip", _visible, 0);
duplicateMovieClip ("strip", "strip1", 1);
duplicateMovieClip ("strip", "strip2", 2);
duplicateMovieClip ("strip", "strip3", 3);
gotoAndPlay (2);
_____</frame1>

<frame2>:
_______
startDrag ("drag", true);
_______
</frame2>

<frame3>
_______
xposition = getProperty("strip1", _x);
setProperty ("strip1", _x, Number(xposition)+Number(((getProperty("drag", _x)/(150-speed))*-1)));
setProperty ("strip2", _x, Number(Number(xposition)+Number(((getProperty("dra g", _x)/(150-speed))*-1)))+Number(slut));
setProperty ("strip3", _x, Number(xposition)+Number(((getProperty("drag", _x)/(150-speed))*-1))-slut);
// limits for slide
if (Number(getProperty("strip1", _x))<Number(-slut)) {
setProperty ("strip1", _x, 0);
setProperty ("strip2", _x, slut);
setProperty ("strip3", _x, -slut);
}
if (Number(getProperty("strip1", _x))>Number(slut)) {
setProperty ("strip1", _x, 0);
setProperty ("strip2", _x, slut);
setProperty ("strip3", _x, -slut);
}
__________
</frame3>

<frame4>:
_________
xposition = getProperty("strip1", _x);
setProperty ("strip1", _x, Number(xposition)+Number(((getProperty("drag", _x)/(150-speed))*-1)));
setProperty ("strip2", _x, Number(xposition)+Number(((getProperty("drag", _x)/(150-speed))*-1))-slut);
setProperty ("strip3", _x, Number(Number(xposition)+Number(((getProperty("dra g", _x)/(150-speed))*-1)))+Number(slut));
// limits for slide - minus slut
if (Number(getProperty("strip1", _x))<Number(-slut)) {
setProperty ("strip1", _x, 0);
setProperty ("strip2", _x, slut);
setProperty ("strip3", _x, -slut);
}
if (Number(getProperty("strip1", _x))>Number(slut)) {
setProperty ("strip1", _x, 0);
setProperty ("strip2", _x, slut);
setProperty ("strip3", _x, -slut);
}

gotoAndPlay (3);
_______
</frame4>

<frame5>"
_______
stopDrag ();
_____
</frame5>

View Replies !    View Related
Scroll And Stop
OK, I'm not sure exactly how to search on this, so I'm just going to explain what I'm looking for, and see if anyone knows of a good example or feels really charitable, and would like to give assistance

Here's what I'm looking for:

I have a list of projects ordered into different divisions. I would like the projects to continuously scroll vertically across the screen until the user mouses-over, or click on, a button that corresponds to a project division. When the user selects a division, the list of projects would scroll to the select division set of projects, and stop. Then the user could select a project from the current division set, and the project would be shown.

Was that explained properly? I hope so.

Any and all help would be appreciated!

Thanks,
Ryan

View Replies !    View Related
How To Stop Scroll?
Hello!
I need help.
I have a problem with the text-box scroller.
I dont know how to stop the scroll.
I mean how to stop scroll when the text ends.
Please dwnld my FLA and look what i'm talking about.
The text box is scrolling to infinity, and i want it to stop when the text ends.
I cannnot brak thru.

Please help me.

View Replies !    View Related
Scroll And Stop
Is it possible to make a swf that the text is taken from a .txt file?

I would like to place a news scroller on my website but not a javascript one because they are just plain awful, only flash can do it justice.

Basically the news article scrolls up, stops when it gets to the top for a few seconds to let someone read it, then scrolls up and off. The next article then comes in the same manner etc.

Is this possible and even broader, are there any tutorials to show me how to do it? I know very little flash as I only started learning a few days ago.

Thanks folks, any help very much appreciated

View Replies !    View Related
Stop Scroll When Up
Hi...
i used the continuous thumbnail gallery to scroll from right to left the images...
now i would like to stopp the scoll when u are on the images...can some guru help me?...
This my code:
cliparray = [];
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
url = [];
link = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
url[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
link[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
thumbnails_fn(i);
}

} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
/////////////////////////////////////
p = 0;
this.createEmptyMovieClip("tscroller", 1000);
scroll_speed = 5;
var tot = 0;
tscroller.onEnterFrame = function() {
if ((_root._ymouse>=thumbnail_mc._y) && (_root._ymouse<=thumbnail_mc._y+thumbnail_mc._heig ht)) {
if (_root._xmouse>=_x) {
for (var obj in cliparray) {
cliparray[obj]._x -= scroll_speed;
}
if (cliparray[0]._x<-cliparray[0]._width) {
cliparray[0]._x = cliparray[cliparray.length-1]._x+cliparray[cliparray.length-1]._width+500;
var j = cliparray.splice(0, 1);
cliparray = cliparray.concat(j);
}
} else if (_root._xmouse<=_x) {
for (var obj in cliparray) {
cliparray[obj]._x += scroll_speed;
}
if (cliparray[cliparray.length-1]._x>hit_right._x) {
cliparray[cliparray.length-1]._x = cliparray[0]._x-(cliparray[cliparray.length-1]._width+500);
var j = cliparray.splice(cliparray.length-1, 1);
cliparray = j.concat(cliparray);
}
}
}
};
function thumbnails_fn(k) {
var yy = thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
cliparray.push(yy);
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._x = 500+(target_mc._width+500)*k;
target_mc.pictureValue = k;
tot += target_mc._x;
target_mc.onRelease = function() {
p = this.pictureValue+0;
getURL(link[p], "_blank");
};
target_mc.onRollOver = function() {
this._alpha = 60;
thumbNailScroller();
};
target_mc.onRollOut = function() {
this._alpha = 100;
};

};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(url[k], "thumbnail_mc.t"+k);
}



And here the exemple
http://portale.nethouse.it/download/test/movie3.html


thanx

View Replies !    View Related
Stop The Scroll Of The Background
I have a scrolling map that starts scrolling when my hero gets near the edge of the screen and then the code scrolls the map in the same direction - problem is it stops scrolling when you get off the key but if u turn around and start to head off the other way it stills scrolls for a second until you get out of the 'hit' area.

this is some of the code:

onClipEvent (load) {
planespeed = 12;
speed = 8;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
if (_x<525) {
_x = _x+planespeed;
} else {
_root.thingscroll._x = _root.thingscroll._x-speed;

}
}
if (Key.isDown(Key.LEFT)) {
if (_x>125) {
_x = _x-planespeed;
} else {
_root.thingscroll._x = _root.thingscroll._x+speed;
}
}
if (Key.isDown(Key.UP)) {
if (_y>100) {
_y = _y-planespeed;
} else {
_root.thingscroll._y = _root.thingscroll._y+speed;
}
}
if (Key.isDown(Key.DOWN)) {
if (_y<450) {
_y = _y+planespeed;
} else {
_root.thingscroll._y = _root.thingscroll._y-speed;
}
}
}
onClipEvent(enterFrame){
//detect the key and set variable "direct"
if (Key.isDown(Key.RIGHT)) {
_root.direct = "right";
}
if (Key.isDown(Key.LEFT)) {
_root.direct = "left";
}
if (Key.isDown(Key.UP)) {
_root.direct = "up";
}
if (Key.isDown(Key.DOWN)) {
_root.direct = "down";
}
//rotate according to direct

if (_root.direct == "right" and _rotation != 90){
_rotation = 90;
}
else if (_root.direct == "left" and _rotation != -90){
_rotation = -90;
}
else if (_root.direct == "up" and _rotation != 0){
_rotation = 0;
}
else if (_root.direct == "down" and _rotation != 180){
_rotation = 180;
}
}

Any help appreciated...

View Replies !    View Related
Mouse Scroll Stop
Ok I have made a mouse scroll mc which has 30 attached squares which will hold photos. The amount of the squares will change according to the amount of photos there is. I have got it all working except I don't know how I can get it to stop when it is scrolling all the way to the left. It should stop when the last thumbnail is at the right hand side of the stage. Because the thumbnails are been created dynamically the leftStop variable will change according to the amount of squares that have been attached. I hope this makes sense. Can anyone help me with this.
Here is a LINK

Code:
photo_max = 30;
createEmptyMovieClip("timeline", 1);
for (var i = 0; i < photo_max; i++) {
t = timeline.attachMovie("thumb", "thumb"+i+"_mc", i);
t._x = 30+i*45;
t._y = 30;
t.num.text=i+1;
}
//=========== MOUSE CHECKER ======================
triggerLevel = 66;
createEmptyMovieClip("mouseChecker", 100);
mouseChecker.onMouseMove = function() {
if (_root._ymouse < triggerLevel) {
timeline.onEnterFrame = timelineMove;
} else {
delete timeline.onEnterFrame;
}
};

Code:
spd = .05;
function timelineMove() {
//leftStop=?????
rightStop = 0;
centerX = Stage.width/2;
timeline._x += (centerX-_root._xmouse)*spd;
if (timeline._x>=rightStop) {
timeline._x = rightStop;
}
//if (timeline._x<=leftStop) {
//timeline._x = leftStop;
//}
}
DOWNLOAD FLA

View Replies !    View Related
How To Stop Scroll On RollOver
Hi I've set up a movieclip that scrolls across the stage and resets itself at a certain point to make it look like it's a continuous loop... i'm trying to get it to stop when the mouse rolls over one of the buttons inside, and then start up again when the mouse rolls out...anyone have an idea how to do this? Here's an example of what I mean, except they used javascript to code the scroll.

http://www.corbis.com/

View Replies !    View Related
Scroll Bar Stop And Does Not Continue
Im Using MX 2004, and im learning using a template from a free source, however when working on a scroll portion of the site, i needed to increase the sive of the verticle scrollong, I have made it longer on the stage and figure this would do the job, nonetheless when i test it goes half way and stops. Any help would be appreciated.

Thanks A million

View Replies !    View Related
Stop Occurrence Of Scroll Bar
I used the following actionscript for a scroll bar to appear on a dynamic text field. Unfortunately, the scroll bar continues to appear on every frame proceeding the frame where the text field is displayed. What is the method to eliminate the occurrence of the scroll bar?
/**
Requires:
- UIScrollBar component in library
*/
// Create text field.
this.createTextField("myText", 10, 10, 20, 200, 100);
myText.wordWrap = true;
this.createClassObject(mx.controls.UIScrollBar, "my_sb", 20);
// Set the target text field for the scroll bar.
my_sb.setScrollTarget(myText);
// Size it to match the text field.
my_sb.setSize(16, myText._height);
// Move it next to the text field.
my_sb.move(myText._x + myText._width, myText._y);
// Load text to display and define onData handler.
var my_lv:LoadVars = new LoadVars();
my_lv.onData = function(src:String) {
if (src != undefined) {
myText.text = src;
} else {
myText.text = "Error loading text.";
}
};

View Replies !    View Related
Scroll.... Stop UseHandCursor()
i want to ask for somthing maybe simple but i don't knw it.
in scroll text (dynamic loaded) it works greate but i want to make if the text in the last line the up button isn't clickble... and if it in the first line the buttom button isn't clickble too...

View Replies !    View Related
Scroll Doesn't Stop :(
I wrote this code for scrolling content:

ActionScript Code:
onClipEvent (mouseDown) {    if (this.hitTest(_root._xmouse, _root._ymouse)) {        var uppressed = true;        updateAfterEvent();    }}onClipEvent (enterFrame) {    if (uppressed) {        if (count != 125) {            _parent._parent.news._y -= 5;            count += 5        }    }    updateAfterEvent();}onClipEvent (mouseUp) {    uppressed = false;    updateAfterEvent();}
and for opposite:
ActionScript Code:
onClipEvent (mouseDown) {    if (this.hitTest(_root._xmouse, _root._ymouse)) {        var dnpressed = true;        updateAfterEvent();    }}onClipEvent (enterFrame) {    if (dnpressed) {        if (count != 0) {            _parent._parent.news._y += 5;            count -= 5        }    }    updateAfterEvent();}onClipEvent (mouseUp) {    dnpressed = false;    updateAfterEvent();}
When I scroll down it works and stops when count reaches 125, but when I scroll up it doesn't stop and scrolling down doesn't work anymore... Any help?..

View Replies !    View Related
Make The Scroll Bar To Stop
Hi
Does anyone know How to make the vertical and horizontal scroll bar of ScrollPane component to stop when i scroll it till the end? Thanks!

View Replies !    View Related
Stop Th Auto Scroll Help
Hello all,

I need some help with removing the auto scroll from this action scripting code and I can not seem to make it stop. Can someone please offer some expert help? See below:


function moveRight()
{
isRight = false;
var _loc1 = thumbBlock;
if (_loc1.targetX == startX - len * spaceX)
{
_loc1._x = _loc1.targetX = startX;
_loc1.targetX = _loc1.targetX - spaceX;
}
else
{
_loc1.targetX = _loc1.targetX - spaceX;
} // end else if
} // End of the function
function moveLeft()
{
isRight = true;
var _loc1 = thumbBlock;
if (_loc1.targetX == startX)
{
_loc1._x = _loc1.targetX = startX - len * spaceX;
_loc1.targetX = _loc1.targetX + spaceX;
}
else
{
_loc1.targetX = _loc1.targetX + spaceX;
} // end else if
} // End of the function
stop ();
stopAllSounds ();
goLink = [];
goLink[0] = "10.html";//Image button linkage 01
goLink[1] = "20.html";//Image button linkage 02
goLink[2] = "30.html";//Image button linkage 03
goLink[3] = "40.html";//Image button linkage 04
goLink[4] = "50.html";//Image button linkage 05
goLink[5] = "60.html";//Image button linkage 06
goLink[6] = "70.html";//Image button linkage 07
startX = 30;//Thumb image location (X)
startY = 25;//Thumb image location (Y)
spaceX = 225;//Thumb image 02 location (row)
showNum = 4;//Number of thumb images displayed per page
imgURL = "image/img";//Thumb image file path
nowSelect = 0;
bigimg.loader.loadMovie("image/img" + nowSelect + ".jpg");//Thumb image file path
len = goLink.length;
isRight = true;
thumbBlock.thumbImg._visible = false;
thumbBlock._x = thumbBlock.targetX = startX;
thumbBlock._y = startY;
thumbBlock.onEnterFrame = function ()
{
this._x = this._x + 2.000000E-001 * (this.targetX - this._x);
};
prevBtn.onRelease = function ()
{
for (var _loc1 = 0; _loc1 < len + showNum; ++_loc1)
{
thumbBlock["thumbImg" + _loc1].gotoAndStop(1);
} // end of for
timer.gotoAndPlay(1);
moveLeft();
};
nextBtn.onRelease = function ()
{
for (var _loc1 = 0; _loc1 < len + showNum; ++_loc1)
{
thumbBlock["thumbImg" + _loc1].gotoAndStop(1);
} // end of for
timer.gotoAndPlay(1);
moveRight();
};
k = 0;
var i = 0;
while (i < len + showNum)
{
var _mc = thumbBlock.thumbImg.duplicateMovieClip("thumbImg" + i, i);
_mc._x = spaceX * i;
_mc._y = 0;
_mc.no = k;
_mc.screen.loadMovie(imgURL + k + ".jpg");
_mc.onRollOver = function ()
{
};
_mc.onRollOver = function ()
{
for (var _loc2 = 0; _loc2 < len + showNum; ++_loc2)
{
this._parent["thumbImg" + _loc2].gotoAndStop(1);
} // end of for
this.gotoAndPlay(2);
nowSelect = this.no;
};
_mc.onRollOut = function ()
{
for (var _loc2 = 0; _loc2 < len + showNum; ++_loc2)
{
this._parent["thumbImg" + _loc2].gotoAndStop(1);
} // end of for
this.gotoAndStop(1);
nowSelect = this.no;
};
_mc.onRelease = function ()
{
getURL(goLink[this.no], "_blank");//Target frame for image button linkages
};
_mc.onEnterFrame = function ()
{
if (this.isOver == true)
{

} // end if
};
if (k == len - 1)
{
k = 0;
}
else
{
++k;
} // end else if
++i;
} // end while
init();


Thanks!!

View Replies !    View Related
Scroll.... Stop UseHandCursor()
i want to ask for somthing maybe simple but i don't knw it.
in scroll text (dynamic loaded) it works greate but i want to make if the text in the last line the up button isn't clickble... and if it in the first line the buttom button isn't clickble too...

View Replies !    View Related
Scroll Doesn't Stop :(
I wrote this code for scrolling content:

ActionScript Code:
onClipEvent (mouseDown) {    if (this.hitTest(_root._xmouse, _root._ymouse)) {        var uppressed = true;        updateAfterEvent();    }}onClipEvent (enterFrame) {    if (uppressed) {        if (count != 125) {            _parent._parent.news._y -= 5;            count += 5        }    }    updateAfterEvent();}onClipEvent (mouseUp) {    uppressed = false;    updateAfterEvent();}
and for opposite:
ActionScript Code:
onClipEvent (mouseDown) {    if (this.hitTest(_root._xmouse, _root._ymouse)) {        var dnpressed = true;        updateAfterEvent();    }}onClipEvent (enterFrame) {    if (dnpressed) {        if (count != 0) {            _parent._parent.news._y += 5;            count -= 5        }    }    updateAfterEvent();}onClipEvent (mouseUp) {    dnpressed = false;    updateAfterEvent();}
When I scroll down it works and stops when count reaches 125, but when I scroll up it doesn't stop and scrolling down doesn't work anymore... Any help?..

View Replies !    View Related
Very Simple Scroll Bar That Won't Stop Scrolling
hey,

I have made a very simple scroll bar (attached). And it works fine. I stops scrolling where i want it to stop. But, when i export my "info.swf" file, the file that has the scroll bar, and load it into another movie, then my scroll bar scrolls continously. I don't know what i am doing wrong.


Baljinder

View Replies !    View Related
Start/Stop Button On Scroll
Hello,

I have an MC which acts as scrolling credits (i.e. at the end of a movie). Its just a motion tween. If a user wants to stop and view a certain credit, I'd like to have a button that starts/stops the scroll. Can anyone help me with the script for this?

Thanks.

I heard that if it's a tween, you can just use the

on (release) {
_root.credits.stop();
}

and then on the play button:

on (release) {
_root.credits.nextFrame();
}

This works for the stop button, but the play button just advances the frame by 1. It won't continue scrolling. Any help.

View Replies !    View Related
Left And Right Scroll To And Stop With Buttons?
I'm pretty new to actionscript and have a problem:

I'm putting together a Web site and in the body I have filmStrip_mc movie clip that I want to scroll (left or right) to a specific point on an onRelease event.

For example; when the 'contact us' button is clicked, the filmStrip_mc movie clip scrolls past 'products', and 'about us', and stops at 'contact'.

I also, of course, want the movie clip to scroll to any previous page selected.

Any help would be GREATLY appreciated.

Thanks

View Replies !    View Related
Stop Horiztonal Scroll On Roll Off
Looking to stop my horizontal scroll from following my mouse when I am not in the area. Is there a way to set boundaries

example:http://www.diorhomme.com/2006/diorhomme.html

This is the current script I am using.

mouseX = _xmouse;
menuX = menu._x;

if (mouseX > 280) {
diff = (mouseX-280)/15;
}
if (mouseX < 220) {
diff = (220-mouseX)/15;
}
if (mouseX <= 250 && menuX <= 56) {
setProperty("menu", _x, menuX+diff);
}
if (mouseX >= 250 && menuX >= -289) {
setProperty("menu", _x, menuX-diff);
}
if (menu._x >= 0) {
menu._x = 0;
} else if (menu._x <= -289) {
menu._x = -289;
}
gotoAndPlay(2);

View Replies !    View Related
Horizontal Scroll Won't Stop Scrolling
I've got a problem with nice horizontal scroll bar (originally from Claudio). It won't stop scrolling! There seems to be no way to set the end x coordinate for it in the as layer.
This would be the perfect thing if only it would stop scrolling empty space at the end
of the images. No matter how many images you have in there it will still have that empty white space at the end of the scroll. HELP ANYONE?

Attached fla.

I'll paypal $10 to the 1st one who will fix this succesfully. This should be an easy fix.

View Replies !    View Related
Scroll Movieclip - Stop At Certain Point
Hi. I figured out the code below to make a movie clip scroll up and down. However, the problem is that it will keep scrolling forever. Does anyone know how I can get it to stop at a minimum and maximum vertical height?


Code:
var scrollUp = function() {
test_mc.onEnterFrame = function() {
this._y -= 5;
}
};
var scrollDown = function() {
test_mc.onEnterFrame = function() {
this._y += 5;
}
};
scrollup_mc.onRollOver = function() {
scrollUp();
};
scrollup_mc.onRollOut = function() {
delete test_mc.onEnterFrame;
};
scrolldown_mc.onRollOver = function() {
scrollDown();
};
scrolldown_mc.onRollOut = function() {
delete test_mc.onEnterFrame;
};

View Replies !    View Related
Masked Horizontal Scroll--how To Stop It From Reseting?
I'm using a pretty basic horizontal scroll with a mask (not yet live) here: http://xlties.com/shop/product_info.php?products_id=53

My question is, how can I have each unique URL open from the scroll area with the selected image centered (rather than resetting)?

Anyway to handle this dynamically? The only way my non-programmer brain thought to fix this was to make unique scrollbar for each product, but there MUST be a better way!

Help!

Thanks in advance.
janap

View Replies !    View Related
Stop Scroll Buttons While Tween Is In Motion
Hi again,

I'm at the last bug of my project! Please help me out on this one...

I'm scrolling a masked MC, which is basically a grid of thumbnails with a few rows. Right now, it works beautifully by scrolling row-to-row if the up/down buttons are pressed only after the tween has finished. However, if I press the up or down buttons in succession before it finishes scrolling, the positions get all messed up because it will start the motion tween from the current y position, which is halfway through a scroll.


Code:
new Tween(holder,"_y",mx.transitions.easing.Strong.easeOut,holder._y, holder._y+scrollAmt,1.5,true);
That is basically the only code in my onRelease function.

I've thought about 2 ways of tackling this problem:

1: to disable the up/down buttons while the tween is taking place.

2: to NOT have the tween start from the current y position since that is the root of the problem. But I think this is impossible due to the nature of the purpose of the function.

Either ways, I'm not sure how to implement them. Therefore, I urge you to help me out please.

Thank you for your time!

View Replies !    View Related
Stop Scroll Bar Component From Having Selectable Text
I want the text to not be able to be selected because when you click the down button a few time it selects everything automatically. The example of what i'm talking about can be seen at http://www.mikes-music.com/mm.html

I was trying to use the selectable=false property

_root.screen_animation_mc.myText.selectable=false;


and also checked to see if the component had the selectable property so I could set it to false, but it does not.

Any help would be great,

Thanks

View Replies !    View Related
Stop Scroll Buttons While Tween Is In Motion
Hi again,

I'm at the last bug of my project! Please help me out on this one...

I'm scrolling a masked MC, which is basically a grid of thumbnails with a few rows. Right now, it works beautifully by scrolling row-to-row if the up/down buttons are pressed only after the tween has finished. However, if I press the up or down buttons in succession before it finishes scrolling, the positions get all messed up because it will start the motion tween from the current y position, which is halfway through a scroll.


Code:
new Tween(holder,"_y",mx.transitions.easing.Strong.easeOut,holder._y, holder._y+scrollAmt,1.5,true);
That is basically the only code in my onRelease function.

I've thought about 2 ways of tackling this problem:

1: to disable the up/down buttons while the tween is taking place.

2: to NOT have the tween start from the current y position since that is the root of the problem. But I think this is impossible due to the nature of the purpose of the function.

Either ways, I'm not sure how to implement them. Therefore, I urge you to help me out please.

Thank you for your time

View Replies !    View Related
Follow Mouse Scroll > Stop At Edge
Follow Mouse ScrollCan anyone lead me to a horizontal scrolling image that follows the mouse, and stops at the outermost edge of a designated frame? Thank you for all the help.

MikeZ

View Replies !    View Related
Stop Scroll Panel When Mouse Stops.
Hey All,
I am making a scroll panel which scrolls perfect. I was wondering if there is a way to make the panel stop moving when the mouse stops moving? If anyone could point me in the right direction that would be great.
Thanks

F

http://www.francomichienzi.com/test4

Code:

stop();
small_pictures.onRollOver = panelOver;
function panelOver() {
   this.onEnterFrame = scrollPanel;
   delete this.onRollOver;
}
var b = stroke.getBounds(_root);
function scrollPanel() {
   var xdist = _xmouse-480;
   _root.small_pictures._x += Math.round(-xdist/40);
   if (_xmouse<b.xMin || _xmouse>b.xMax || _ymouse<b.yMin || _ymouse>b.yMax) {
      this.onRollOver = panelOver;
      delete this.onEnterFrame;
   }
   if (small_pictures._x>=40) {
      // This value is always the same.
      small_pictures._x = 40;
   }
   if (small_pictures._x<=-560) {
      //  This value will change depending on the number of small pictures.
      small_pictures._x = -560;
      //  Look below for correct values.
   }
}

View Replies !    View Related
Swf Stop Resize On Original Swf Size- Scroll Shows Up
I have one problem, i am not Sure how to define it to search for it on google, i'm sure that is a lot of answer on the internet, but i will try here...

How to stop resizeing my fullsrean swf movie when the size of the browser reach the original size of swf, after that if i resize browser to be smaller scroll will bi show up....

example.... http://www.rolex.com/en/

my AS2 code is

Code:
//start Stage re-size code
Stage.align = "TL";
Stage.scaleMode = "noScale";
// ---> Create a new listener object
var stageListener:Object = new Object();
// ---> Define the resize function...
stageListener.onResize = function() {
// ---> first, get the new dimensions of the stage....
var stageWidth:Number = Math.round(Stage.width);
var stageHeight:Number = Math.round(Stage.height);
trace("Stage size is now " + Stage.width + " by " + Stage.height);
// ---> now, set the footer BG w & h to the stage dimensions...
footerBG_mc._width = stageWidth;
//footerBG_mc._height = stageHeight;
footerBG_mc._x = 2;
footerBG_mc._y = stageHeight-25;
// ---> now, set the footer links to the stage dimensions...
footerLinks_mc._x = (stageWidth/2) - (footerLinks_mc._width/2) ;
footerLinks_mc._y = stageHeight-18;
// ---> now, set the background clip alignment to match stage...
wallPaper_mc._x = (stageWidth/2) - (wallPaper_mc._width/2);
//wallPaper_mc._y = stageHeight/2;

// ---> now, size the outLine_mc to the stage dimensions...
//outLine_mc._height = stageHeight-2;
//outLine_mc._width = stageWidth;
outLine_mc._x = (stageWidth/2) - (outLine_mc._width/2);
//outLine_mc._y = (stageHeight/2) - (wallPaper_mc._height/2);

};
// ---> Apply the listener...
Stage.addListener(stageListener);
// ---> Run the function...
stageListener.onResize();

//--------------------//
Mouse.hide();
var followMe:Object= new Object()
followMe.onMouseMove=function(){
newMouse._x=_xmouse;
newMouse._y=_ymouse;
}
Mouse.addListener(followMe)
and on the HTML page is


Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<style type="text/css">
#center { position: absolute; top: 50%; width: 100%; height: 1px; overflow: visible }
#main { position: absolute; left: 50%; width: 100%; margin-left: -50%; height: 600px; top: -300px; background-color:"#cccccc"}
body {
overflow-x:visible;
background-color: #333333;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
</style>
<title>Centered</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="swfobject.js"></script>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>

</head>
<body>
<div id="center" >
<div id="main">
<img src="950x10.jpg" alt="" />
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','100%','height','600','src','main','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','main' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="950" height="600">
<param name="movie" value="main.swf" />
<param name="quality" value="high" />
<embed src="main.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="950" height="600"></embed>
</object></noscript>

</div>
</div>
</body>
</html>
my page
http://www.dupli.co.yu/index22.html

View Replies !    View Related
How To "scroll" A Movie Clip Left / Right And Stop At The End
Hi

I'm trying to develop a "scrolling" menu system that uses buttons to scroll left and right on a mouse down command - not really scrolling, just moving left and right behind a mask. (easy enough, right). But first problem is that it will of course scroll on infinitely, so Can anyone out there please advise how to get the "scrolling" left and menu to be constrained by the movieclip's own size / position on stage

Second how can I get it to continuously "scroll" when the mouse is pressed and HELD down

Thank's for any help...there are23 virgins waiting for you in Heaven.. or something.

View Replies !    View Related
Stop Actionscript Function At A Specific Frame (stop Looping)
I want to stop an effect at a specific frame but I dunno how.
Do I have to put something in the code?
I'm confused.
Or just tell me how to stop it from looping.
Edit:
Is it possible to attach this to a movie clip? Then i can stop it or use onEnterFrame and then escape();
I actually have no idea what I am talking about. /Edit

Here is one of the code I borrowed:

MovieClip.prototype.placeInSpace = function(id) {
var ratio = this.focaldistance / Math.sqrt(this[id].z * this[id].z);
this[id]._x = this[id].x * ratio;
this[id]._y = this[id].y * ratio;
this[id]._xscale = this[id]._yscale = 1000 / this[id].z;
}
MovieClip.prototype.randomPlace = function(id) {
var radius = this.rmin + (this.rmax - this.rmin) * Math.random();
var polar = 2 * Math.PI * Math.random();
this[id].x = radius * Math.cos(polar);
this[id].y = radius * Math.sin(polar);
this[id].z = this.zmin + (this.zmax - this.zmin) * Math.random();
}

Here's the other code cause I can use two in my movie:
function mover() {
// Move the particle over time
this._y += this.speed;
this._yscale += 10;
this.speed++;
if (this._y>500) {
this._y = 0;
this.speed = Math.random()*10;
this._yscale = 100;
}
}
function starField(x, y, n) {
// Generate a starfield of specified dimensions with n stars
for (var i = 0; i<n; i++) {
var star = this.createEmptyMovieClip("star"+i, i);
var dot = star.createEmptyMovieClip("dot", 0);
star._rotation = Math.random()*360;
star._x = x;
star._y = y;
dot.lineStyle(0, 0xFFFFFF, 100);
dot.moveTo(0, 10);
dot.lineTo(0, 15);
dot.onEnterFrame = mover;
dot.speed = Math.random()*10;
}
}
starField(275, 200, 100);

View Replies !    View Related
[F8] Movie Plays > Stop > Reverse > Stop > Play
I am fairly new to involved action scripting. I have successfully scoured flashkit threads for years to get my answers but this one has been driving me crazy for the past couple days. I have tried numerous solutions but none of them do exactly what I am trying to do.

I am creating an online portfolio that I want to control with two buttons that will play forward on release and stop at every piece unless the user is pressing and holding down - I also would like the scrolling animation to play in reverse on press and stop at every piece unless press and hold which happens to be skateboards in this section. I am posting the .fla for this section. This is what I have been able to accomplish so far. I moved everything into the main timeline from a movie clip because I could not get that to work at all. Should I move it back to movie clip? I also want it to stop at the first board.

here is the code I was able to peice together that just plays continously without stops.

Empty movie clip on second frame.

PHP Code:




onClipEvent (enterFrame)
{
    if (_root.goBack)
    {
        _root.prevFrame();
    }
    else
    {
        _root.nextFrame();
    }
    _root.frameNo = "Frame : " + _root._currentFrame;
}







Forward button.

PHP Code:




on (press)
{
    _root.goBack = false;
}







Reverse Button.

PHP Code:




on (press)
{
    _root.goBack = true;
}







I have only done basic stops; goToAndPLay, getURL and such I am a little out of my league here but I started the ball rolling and would like to make this work as I intended. Any help making this do anything close to what I am describing would be much appreciated

View Replies !    View Related
How To Make The Wings Of A Fly Stop When The Flash Movie Stop?
Hello,

I made a simple "Fly Flying" flash animation. The wings of the fly are moving up and down while the fly is flying from one location to the other. My problem is:

The wings of the fly are still moving up and down when the fly is landed on the ground. I tried to add a stop(); action script at the last frame. However the wings are still moving even the movie is stopped.

How can I make the wings stop moving when the flash movie is stop? Please download and take a look at my flash file (fly_flying.fla):

http://space.uwants.com/batch.download.php?aid=313219

Thanks and best regards

Alex

View Replies !    View Related
Scroll Bar Show Up If Needed And Only Scroll To Dynamic Text Input Bottom... HOW
I have attached a copy of my scroll bar that i am currently using how can i make the scroll bar not show up unless needed (really not all that important but would be nice.)

The important thing is that i can setup a dynamic text box inside my item_holder movie clip but my scroller always scrolls to the bottom of the scroll box not matter if inside my scroll box i have on line of text loaded dynamicly or i have 100. So if i have 1 line of text and a large dynamic text box the scroll bar will scroll to the bottom of the scroll box even though it only has one line. See attachment and see if anyone can help. Thanks in advance. Brian

View Replies !    View Related
Scroll Text > Button > Load Txt File > Reset Scroll Bar...?
Hi i am looking for a tutorial or an explanation of how you can load an external text file into a text field and have...let's say 3 buttons that load the .txt files...when they are loaded...i want the scroll bar to be reset to the top of the text field/box....

any help...welcome...

ta...tiger...

View Replies !    View Related
Linking Text Buttons In Scroll To Image Outside Scroll Area
Hi,
I am desperately hitting my head against a brick wall - so please help me!

I have created a flash area that is divided up with an image on top and a scroll area under.

I am trying to get the text buttons in the scroll area to each change the image above and cant seem to get it to work because of the masking.

I have tried heaps and heaps of different ways and am going crazy!

PLEASE HELP ME!!!!


thanks,
kova

View Replies !    View Related
How Can I Stop Flash From Looping And Stop On The Last Frame
I am having a problem with looping. I created a flash file and published it. I only want it to play through once and stop on the last frame. I can't get it to stop, it keeps looping through and playing the movie.

I have tried to add a layer that has some script in it with a start and a last tag on frame 1 and frame 310 there is 315 frames total.

the action script was
<code>
// this was in the first frame
ifFrameLoaded ("last") {
gotoAndPlay("start");
}

//this was in the second frame
gotoAndPlay(1);

//this was in the last frame 315
stop ();
</code>

your help is greatly appreciated.

skj

View Replies !    View Related
Cannot Stop Movie Clip - This.stop() Confusion
Hello,

In my pong game when someone scores a goal I want the ball to pause in the middle of the screen, wait xx seconds and then randomly move.


Code:
// Return to kick off position
this.stop();
this._y = 325;
this._x = 275;
a = 0;
var myInterval = setInterval(this, "wait", 30*1000);
This calls function wait that simply uses this.play(); to allow the ball to move again.(See below)


Code:
onClipEvent (load) {
this.wait = function() {
this.play();
clearInterval(myInterval);
};
}
However I cant EVER get the ball symbol to stop no matter what I do.

Ive included all the code attached to the clipevent for the ball below.
Im thinking it must be due to the nested loops or somethings, very very confused


Code:
onClipEvent (load) {
this.wait = function() {
this.play();
clearInterval(myInterval);
};
}
onClipEvent (enterFrame) {
//Kick Off, play whistle and select random direction from 4 diagonals
if (a == 0) {
_root.kickoffwhistle.start();
//Use variable to ensure random numbers are generated only once per game
var randNumber1:Number = Math.pow(-1, Math.floor(Math.random()*2));
//-1 ^1 or ^2 = 1 or -1
var randNumber2:Number = Math.pow(-1, Math.floor(Math.random()*2));
//move it on the y axis at -1 or 1 & //move it on the x axis at -1 or 1
this._y += this.randNumber1;
this._x += this.randNumber2;
++a;
//set a trigger to increment so only actioned once.
}
if (randNumber1>0) {
this._y += this.yspeed;
//move it on the y axis at the set speed
} else {
this._y -= this.yspeed;
//move it on the y axis at the set speed
}
if (randNumber2>0) {
this._x += this.xspeed;
//move it on the x axis at the set speed
} else {
this._x -= this.xspeed;
//move it on the x axis at the set speed
}
// Ball(this) collides with PL1 and ball travelling upwards then deflect off randomly {
if (this.hitTest(_root.P1footballman) && this.yspeed<0) {
// Define boundaries for collision detection
var pl1bounds:Object = _root.P1footballman.getpl1bounds(_root);
this._x = Math.round(Math.random()*(pl1bounds.xMax-pl1bounds.xMin))+pl1bounds.xMin;
//Revert direction of ball by using formula below
this.yspeed = this.yspeed*-1;
//Randomly play miss sound effect if ball in goal area
if (this._x>133 && this._x<450) {
var result = Math.round(Math.random()*2);
if (result == 0) {
_root.MissedGoal.start();
}
}
//play football kick & header sound
_root.footballkickorheader.start();
}
if (this.hitTest(_root.cpu) && this.yspeed>0) {
var cpubounds:Object = _root.P1footballman.getcpubounds(_root);
this._x = Math.round(Math.random()*(cpubounds.xMax-pl1bounds.xMin))+cpubounds.xMin;
this.yspeed = this.yspeed*-1;
if (this._x>133 && this._x<450) {
var result = Math.round(Math.random()*2);
if (result == 0) {
_root.MissedGoal.start();
}
}
//play football kick & header sound
_root.footballkickorheader.start();
}
//Roatation properties of the ball
i = getProperty(this, _rotation);
setProperty(this, _rotation, i+5);
//Rotate ball i degees per frame
_this.rotation = i;
//Player Scores routine
//If ball object is beyond defined CPU goal area
if (this._y<75 && this._x>133 && this._x<450) {
_root.goalcry.start();
_root.P1footballman.score++;
//add1 to the cpu score
_root.playertxt = 'PLY: '+_root.P1footballman.score;
//Play start whistle for KICKOFF
_root.kickoffwhistle.start();
//Return to kick off position
this._y = 315;
this._x = 275;
a = 0;
//Stop ball in correct position
this.stop();
//5 seconds then calls function "wait" to use this.play() to move ball
var myInterval = setInterval(this, "wait", 5*1000);
}
//CPU Scores routine
//If ball object is beyond defined Player goal area
if (this._y>470 && this._x>133 && this._x<450) {
_root.goalcry.start();
_root.cpu.score++;
//add1 to the cpu score
_root.cputxt = 'CPU: '+_root.cpu.score;
//Play start whistle for KICKOFF
_root.kickoffwhistle.start();
// Return to kick off position
this.stop();
this._y = 325;
this._x = 275;
a = 0;
var myInterval = setInterval(this, "wait", 30*1000);
}
if (this._x>620 || this._x<5) {
this.xspeed = this.xspeed*-1;
//if it hits an edge inverse the xspeed
_root.bounce.start();
//Play bounce side effect
}
if (this._y>470 || this._y<75) {
this.yspeed = this.yspeed*-1;
//if it hits the top or bottom of pitch inverse the yspeed
_root.bounce.start();
//Play bounce side effect
}
}

View Replies !    View Related
Make The Browser Scroll Bar Scroll A Flash Text Box?
Is there anyway that javascript can detect when and which scroll bar button is clicked? I want to use javascript to make the browser scrollbar scroll a flash textbox.

View Replies !    View Related
Change Vert Scroll Script To Horiz Scroll
I found this tutorial for a scrollbar. It works great for vertical scrolling (ex:http://www.matthewterry.net/safetyguide.html click any section), but I want to change it to scroll horizontally, for another project.

Can someone help me change it to affect horizontal scrolling?

On the content's movie:

onClipEvent(load){
goY = this._y;
myY = this._y;
ySpeed = 0;
clicked = false;
delay = 2;
barDis = 380;
barPercent = 0;
}
onClipEvent(enterFrame){
if(math.round(myY) != math.round(goY) || clicked == true){
barPercent = (_parent.scroller.scrolllever._y/barDis)*100;goY = 116.7 - ((340/100)*barPercent);
myY = this.setonescroll._y;
ySpeed = (myY-goY)/delay;
this.setonescroll._y -= ySpeed;
}
}

On the scroller:

on(press){
startDrag(this,0,0,0,0,_parent._parent.setone.barD is);
_parent._parent.setone.clicked = true;
}
on(release, releaseOutside){
stopDrag();
_parent._parent.setone.clicked = true;
}

Thanks,
Matt

View Replies !    View Related
Please Help Me Place The Arrows Of My ScrollPane Scroll Bar Together On One End Of The Scroll Track
I have a scrollpane component with a movie clip of some thumbnail images.

I just want to have its scrollbar arrows together on one end of the track (or together ANYwhere) instead of having them at opposite ends of the scroll track.

I have been able to customize the appearance of the scrollpane and its scrollbar using the HaloTheme library, but that approach has so far been of no use in getting the arrows together.

I cannot tell you how deeply any help will be appreciated. I will probably sob and mewl with gratitude, the way I imagine someone lost in a vast rain forest for many weeks mewls when rescued. I am desperate. I am going insane. Please, please help me.

View Replies !    View Related
Modifying Position Of Scroll Arrows In Scroll Pane
Does anyone out there know how to modify the code of the standard Flash component scroll pane to allow you to place the arrows anywhere you want on the page? I was able to go in and assign x and y coordinates for them, but they seem to be linked to the bounding box somehow and whenever I raise or lower them the box follows suit, which ends up cutting of the content inside the box...

I didn't post any code because there is so **** much of it and I can't figure out where it is that the position of the arrows is linked to the position of that ****ed box (this is what I suspect the problem is, but please tell me if you know different!)!!!

HELP!!!!

View Replies !    View Related
Modifying Position Of Scroll Arrows In Scroll Pane
Does anyone out there know how to modify the code of the standard Flash component scroll pane to allow you to place the arrows anywhere you want on the page? I was able to go in and assign x and y coordinates for them, but they seem to be linked to the bounding box somehow and whenever I raise or lower them the box follows suit, which ends up cutting of the content inside the box...

I didn't post any code because there is so **** much of it and I can't figure out where it is that the position of the arrows is linked to the position of that ****ed box (this is what I suspect the problem is, but please tell me if you know different!)!!!

HELP!!!!

View Replies !    View Related
Scroll Bar Component Doesn't Scroll When Dynamic Txt Is Used?
I have a dynamic text box with the Flash UI component "Scroll Bar" attached to it. It works and scrolls fine when you enter text directelly into the dynamic box but when you use the loadVariables command to load an external txt file into it, it fails to scroll the text?
Is there a way to get it to scroll?

thx Bk9

View Replies !    View Related
Text + Image Scroll Function With Scroll Bar. Help
Hi, tring to create a scrollable text window that can also include different text colours, styles, links and images. I have tried a few tutorials but they only seem to work with dynamic text without different colours, styles, links and images. is there an easier solution i can use..

Please help

View Replies !    View Related
Scroll Page Scroll Bars/boarder
anyone have idea how to change the scrollpane scroll bars in 2004 and how to get wride of the border?

View Replies !    View Related
Scroll Gallery [doesn't Scroll After Particular Point]
Hello guys,

I have got this script from one of the opensource files on flashkit and want to use it for one of my requirements. Basically all I want to do is, scroll images vertically based on mouse movement. I've done that already but the issue is that when I have over 10-15 images, it doesn't scroll as there is no place left for the mouse to go further down. If you have a look at the attached file, you'll know what exactly I am talking about. Ideally, if mouse is held downwards, the images should keep scrolling untill it reaches it's end.

Can anybody have a look at the fla and help me out.

Cheers,
D

View Replies !    View Related
Scroll Wheel - Control Page Scroll?
Alrightly... So I have a flash file that is 750 x 1000 px and is embedded into an html page. Since it's height is a 1000px in order to see the whole flash file one needs to scroll down on the page. This is fine except that when people are working with the flash file (have clicked on it) and then want to use the scroll wheel it won't scroll the html page..

I realize this is because in flash you can assign your own properties to the scroll wheel. But is there a way to have the scroll wheel perform it's normal function of scrolling the html page?

I'm not sure if there is an easy way or if I would have to write some code for flash to call javascript to scroll the page? I know people must have run into this problem before and probably have some good solutions.

Thanks in advance

View Replies !    View Related
Scroll Text With Image In Scroll Panel ? Help
Hi,

I m trying scroll pannnel to show image and dynamic text both in scroll panne but when i select dymanic text in text option it comes outer from scroll pannel but static text is coming.

I need help to show dynamic text also in scroll pannel.

Thanks

View Replies !    View Related
Changing Quality On Scroll :: Scroll Plane
Hi There,

Does anyone know a easy way of getting the flash movie to change quality when a scroll plane is scrolling... I have loads of content in the plane and need to set the quality to low whilst scolling to improve performance....

at the moment I have this code.

Code:
var dragQual:Object = new Object();
dragQual.scroll = function(eventObj){
_quality = "LOW"
}
tDragObject.addEventListener("scroll", dragQual);
but it only sets the quality to low, once the user has finnished scolling I want the quality to go back to best....

Any Ideas?

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved