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








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...




FlashKit > Flash Help > Flash ActionScript
Posted on: 05-08-2002, 09:48 PM


View Complete Forum Thread with Replies

Sponsored Links:

How Do You Stop Your Background Sound?
Through out my projector, from the intro up to the menu select screen I have a mp3 playing. When my user chooses his/her selection I want the sound to stop. I am aware that I have to use the

soundObj.stop("soundID")

script but i'm not sure how to use it? where do I attach that script? and do I need to replace soundID with the name mp3 being played?

help apprecated!

View Replies !    View Related
Scroll Background Is It Possible?
I have created a large graphic that extends beyond the stage. I want this graphic to scroll across my stage. But, if I put in a regular motion tween it will then show up when i complie the movie, is there a way to scroll my graphic?
Thanks
Turtle

View Replies !    View Related
Scroll Background
Am a new Flash user and am trying to find a way to change the background of the scroll component. It's white by default and am trying to change it to 8B9877. Someone please help.
The J

View Replies !    View Related
Stop Scrolling Background And Zoom On MC
Hello, I am working on this page http://www.netimagegroup.com/images...nto/index1.html and what I would like to do is put a button on the movie clips that scroll. When the button is clicked the image zooms to the middle part of the page.

I know I need to use _xscale and _yscale and reposition the _x and _y when the button is pressed. When the user then wants to continue they can click another button and return the image to original position.

What I don't know how to do is stop the entire series of images (which are individual files) from scrolling. I want them all to come to a stop.

I am using ActionScript tweening. Here is my ActionScript in frame 1

imagename = "";
image1.onLoad = function() {
// this sets the initial x position of our clip
this._x = 20;
};
image1.onEnterFrame = function() {
if (this._x<-210) {
this._x = 810;
} else {
this._x = this._x-1;
}
};
image2.onEnterFrame = function() {
// this sets the initial x position of our clip
this._x = 241;
};
image2.onEnterFrame = function() {
if (this._x<-210) {
this._x = 810;
} else {
this._x = this._x-1;
}
};
image3.onEnterFrame = function() {
// this sets the initial x position of our clip
this._x = 474;
};
image3.onEnterFrame = function() {
if (this._x<-210) {
this._x = 810;
} else {
this._x = this._x-1;
}
};
image4.onEnterFrame = function() {
// this sets the initial x position of our clip
this._x = 703;
};
image4.onEnterFrame = function() {
if (this._x<-210) {
this._x = 810;
} else {
this._x = this._x-1;
}
};
image5.onEnterFrame = function() {
// this sets the initial x position of our clip
this._x = 860;
};
image5.onEnterFrame = function() {
if (this._x<-210) {
this._x = 810;
} else {
this._x = this._x-1;
}
};

Thanks for your help.

View Replies !    View Related
Start And Stop A Scrolling Background
hello everybody,

I'm having a problem with controlling a scrollable background. It's a vertical background that moves up and down with the mouse direction. in the bg are mc's where you can stop. if you click on an mc the bg locks on that position.
the mc animates and there is a button that you can click on when you want to move on
I can't get the bg to unlock when you want to leave the mc and move on to the next one.

I used the following code for the scrollable bg:

-----------------------------------

onClipEvent (enterFrame) {
if (_root.mainVar == 0) {
homeY = (-_root._ymouse*4.4)+1;
} else {
homeY = (-_root.mainVar*4.4)+1;
}
thisY = _y;
diffY = homeY-thisY;
if (_root.mainVar == 0) {
moveY = diffY/50;
} else {
moveY = diffY/50;
}
_y = thisY+moveY;
}

--------------------------------------------

and this one for locking the bg;

--------------------------------------------

on (release) {
_root.mainVar = 360.5;


}

-----------------------------


I hope someone can help me.

Thanks

View Replies !    View Related
How To Stop Progressive FLV From Loading In The Background?
I have a serious bandwidth problem with a site that has a couple of progressive flv files playing. I just found out that flv files didn't used to stop loading on the background even after netstream is closed, at least on some platforms had problems with this issue.

Does anyone have any recent information about this?

The two situations with the videoplayer that I am curious about:
user changes video file, by pressing a "next"-button on the videoplayer swf, but the first flv file keeps also loading on the background. In other words, the swf videoplayer is now showing the second flv, but the internet connection is used for loading two files, though the other one was already closed in the videoplayer swf, with a netstream.close...

in the other situation the user goes away from the html page that contains the swf videoplayer and I am now asking, if anyone knows what happens to netstream in this case, does the flv keep loading still? I have read some old posts from other forums, including macromedias livedocs, saying that the flvs should stop loading, but in many cases haven't.

Any help would be much appreciated!!

cheers.

View Replies !    View Related
How To Have A FLV File Stop At End On A Background Image
I am trying to have a .flv file playback in its entirety, then when it stops, end on a background image and stop there. This is being used for a main header for a site.

Any suggestions on how to set this up?

View Replies !    View Related
FLV Player - Can It Stop A Background Loop?
Hello -

I have a looping MP3 as my site's background music. The client would like to include a YouTube video on the homepage. Is there a way to make the video stop the background loop when the user hits "Play"? What about using an embedded FLV player?

Thanks in advance.

View Replies !    View Related
Multiple Background Scroll
Anyone know how to do a multiple scrolling background effect?

example here http://www.dirtyvegas.com/

Cheers

View Replies !    View Related
>>Scroll Background On Mouse Over>>
Hiya Flashers all!

I'm new here(and to scripting) and was wondering whether anyone could point me in the direction of actionscripting (MX2004) the effect seen on Gary Willis's Flash site at http://www.garywillis.com (the b/g scolling)

I found this code on another forum and tried it but it isn't smooth and doesn't bounce like Gary's !

pic_mc.onEnterFrame = function ()
{
picx = pic_mc._x;
//define picx as the x coordinate of the picture
mousex = _root._xmouse;
//define mousex as the x coordinate of the mouse
if (picx <= mousex) {
pic_mc._x += 1;
//if the mouse is to the right of the pictures centre, move the picture to the right
}
if (picx >= mousex) {
pic_mc._x -= 1;
//if the mouse is to the left of the pictures centre, move the picture to the left
}
};

Any help pleez ?

peace. T

View Replies !    View Related
Scroll Pane W/ Background Gap
i have a Set of scroll panes that load into a main window. the problem is that every time i load then all the scroll panes have a small gap at the bottom where the gray backdrop stops and the default stage shows... normal i would just change the stage color but becuase all of the scroll panes are semitrancparent i cant do that. So what i want to know how do i set the exact size of how much a scroll pane can scroll?

LowTech Design

View Replies !    View Related
Scroll Background Image?
My background image (945 px wide) is larger than my Flash window (620 px wide). When a user moves the cursor left or right, I want the background image to move in that direction but only as far as the edge of the image and when the cursor stops moving so should the image. I will also have hot spots in various places that will be clickable. I tried this code (see below), but it doesn't quite do what I need. For one thing it continues to scroll beyond the left and right edge of the background image. Another problem is that the image keeps moving even though the cursor stopped, which make it near impossible to click on my hotspots.








Attach Code

function accelScroller(myTarget) {
myMiddle = Stage.width/2;
this.onEnterFrame = function() {
moveDist = myMiddle-_root._xmouse;
myTarget._x += moveDist/10;
//border check
if (myTarget._x>Stage.width) {
myTarget._x = 0;
} else if (myTarget._x<0) {
myTarget._x = Stage.width;
}
}
}
accelScroller(mcInstanceName);

View Replies !    View Related
Multiple Background Scroll
Anyone know how to do a multiple scrolling background effect?

example here http://www.dirtyvegas.com/

Cheers

View Replies !    View Related
Background Scroll Like On Incomplet
Hi, I'm trying to figure out same example of background scrolling as here:

http://incomplet.gskinner.com/

I don't want the screen to scroll all the time, only when the user moves the mouse closer to the edges. Anyone has an example of that?

Thank you.

View Replies !    View Related
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
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

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
Make Background Music Stop With Button
I have an entire site in Flash MX and all is perfect except one thing...the sound.

When the intro starts some background music starts, and it loops 999 times so that it continues to play throughout all the scenes. I want the user to be able to press a button to stop and a button to start the sound when they get tired of it or want to restart it. I have created the buttons, but have no idea how to get the actions to work. (I want to make sure the sound starts off playing on the intro..not to be turned on by the button..and that part works just fine)

My sound starts on the main timeline of the first scene by dragging it onto the stage and looping 999 times. There is no "linkage" set. I want to place the buttons on every scene. My sound name is 'background'. I have not set variables or anything, dont know if i need this. I have tried everything but the right thing. I need HELP! Thanks....I can send file if you need it.

View Replies !    View Related
How Do I Stop Flash From Showing A White Background?
My Flash movie has a black background.
On my webpage... for a split second before the move lads... a white background is shown.
How do I stop this?
How do I get it to show black from the begining?

I wasn't sure what terms to search for, for this problem.

Thanks.


OM

View Replies !    View Related
Do You Know How The User The Option To Stop Background Audio?
there is background audio playing in a loop in my project. how can i give the user the option to turn it off?

View Replies !    View Related
Stop Background Scrolling On Popup Load
Hi everyone,

I need your help,

Before saying anything let me describe a little about what I have done. Its an online project assignment. I created a shop where they have lots of sports related products in it and they can click on those products to bring the pop up window which have the real image and information about it. The shop is all vector cartoons. The shop is long in width so it has one scroller dependent upon the mouse movement. If the mouse moves from middle to left it will move left and vice versa.

Now the problem is when we click the product to bring the pop up and when we move the mouse on that pop up (as the pop up is interactive/has links) the shop in the back ground moves too. It makes my animations and rollovers very slow which I hate. Please provide me some solution so that I can stop the movement in the back when the popup loads and when we unload or cross it, the background starts moving again.

That's all about it, please reply me with some scripting help so that I can finish it. It the last week for submission with this only problem I don't want stuck just because of it. Come'on I m sure you can help me.


Thanks
Madhav ojha

View Replies !    View Related
Start And Stop Background Music With One Button
I'm working on a small problem, but I can't solve it!
I'd like to have a button or even a picture called music
which should stop and play the background sound. To stop is no problem,
but to start it again if the sound has stoped, is quiet difficult!
How can I start the sound again?
Could anyone give me a hit, how to program that?

Thank's a lot for helping me!

View Replies !    View Related
How To Stop Panning Background When Mouse Stops Mo
Hello all,

I have a background that pans left and right depending on which way the mouse is moved. Is there a way that when the mouse has stopped moving that the panning also stops, then restarts when the mouse starts moving again?? Thanks in advance.

View Replies !    View Related
How To Change The Background Of A Scroll Pane
Can anyone tell me how to change the background color of a scroll pane so that it matches the rest of my background? I tried using the "color: advanced" settings in the properties, but I can't seem to figure it out. Thanks.

View Replies !    View Related
Scroll Pane Background Color
How can I change the background color of a scroll pane movie instance? I only want what is inside of the pane to have that color. Thanks.

View Replies !    View Related
Mouse Scroll Duplicating Background
I have a problem with a duplicating background in a mouse scroll, any suggestions as how I could stop it from appearing and also is there a way of stopping the scroll at either end instead of having to use the duplicate command?

Any resolutions would be very helpful.

Thanks

View Replies !    View Related
Scroll Data And Background Color
I have a main container.

I import dynamically info to read.

Now, if this info is too long for the container, then the scroll bar to the right becomes active.

The scroll and text have about 1/2 inch margin on either side.
Main background of container is dark gray.
Background of part containing text is white.

To offset difference, an mc was created to put as the background before the text is loaded.


Code:
public function displayContent():Void
{
this.content_mc = this.attachMovie( "contentContainer", "content_mc", this.getNextHighestDepth(), { _x:37, _y:140 } );
var contentScrollbar_mc:MovieClip = this.attachMovie( "ultimateScroller", "contentScrollbar_mc", this.getNextHighestDepth(), { _x:this.content_mc._width+this.content_mc._x, _y:140 } );
contentScrollbar_mc.size = 415;
contentScrollbar_mc.scrollTarget = this.content_mc;
contentScrollbar_mc.useMask = true;
contentScrollbar_mc.scrollToTop();
this.content_mc.format = this.fonts;
}
The contentContainer is loaded, this it the white background.

Problem is, it's height is not enough if the text is too much and a lot of scrolling occurs to read. Eventually, it ends and goes back to the dark grey background.

Is there a better way to set the bg as white and not worry about loading the contentContainer?

Thanks,

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
Adding Background Music, Stop And Playing At Certain Times
Okay, when I start my movie, I want the background music to play, but when I go to the next scene I want it to stop and play a different song. I am using actionscript, I exported my song using the linkage thing, so I want to use actionscript also because I will be creating play and stop buttons. If you have any suggestions on those too you can post them Thanks to anybody that can help!

View Replies !    View Related
[CS3] Making Background Music Stop When Going To Another Frame (another Page)
I'm trying to get a sound to stop playing when I click on a button (my home button) that brings me to another frame (the home page). I have very little action scripting (3.0) on here. Just some frame labels and stop actions on their own layers. Basically, i have a page (my bio
page) with some motion tweens and a home button that fades in. I already have it set up so that when you click on the home button, it goes to the home page. However, the background music does not stop and it continues to play, overlapping the different home page background music. The background music is on it's own layer. Ive been through about 5 different tutorials so far and they have all failed miserably.

i tried adding a "stop all sound" script to the same script that says when i click on the home button, to bring me back to the home page....so the sound only stops when i click on the icon. however, it stops all sounds everywhere and the home page background music does not play anymore.

So my question is...do you have any ideas on how to make the background music stop when a button is clicked, so that when you jump to another frame on the timeline (new page), the music won't continue playing and will allow the other background music to play?


thanks for any help. this is an art final due friday and its been driving me nuts all day.

View Replies !    View Related
How To Stop Panning Background When Mouse Stops Moving
Hello all,

I have a background that pans left and right depending on which way the mouse is moved. Is there a way that when the mouse has stopped moving that the panning also stops, then restarts when the mouse starts moving again?? Thanks in advance.

View Replies !    View Related
HELP: Scroll Text And Images On Background Image
[Repost in appropriate forum]

Hi there,

I'm a complete newbie to Flash MX, but learning fast...
I've been seraching through previous posts - but I haven't been able to find and answer.

I wish to be able to scroll text and images within a scrollpane box on top of the main background image/jpg of the movie and have the scrollpane box transparent. I've tried it with text and a scrollbar and it works good (see example). It seems that when you make the MC with the text and images you want to display, it retains the white background when you view it.

I've attached a little example test url to show what I'm talking about, it shows both the scrollpane (on the Left) that is not transparent with the background and the scrollbar on the right that is.... This is the effect that I'm trying to accomplish. I also have a shadow and a semi-transperent box on which I placed the scroll boxes, might be a bit hard to see with the backgound pic on this example.

If their is an entirely different way to get the same effect, I would like if you would share it.

Any help appriciated
many thanks,
JD

Here is my example..!

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
How Do I Stop All Sounds In The Middle Of A Scene And Start Another Music Background
Hi All

I am working with Flash 4.0

I am trying to stop all sound on a keyframe in the middle of a scene and start a second sound a keyframe later. I can get the second one started but the first one doesn't stop.

I have set the property on the keyframe to stop all sounds, but the sound doesn't stop.

Any ideas?

I can get the sound to stop when I click a button to go to the next scene but not in the middle of the scene.

Thanks

Digital Editor

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