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








I Want The Control Bar To Move When The User Moves His Mouse Over A Certain Place


I have been trying to figure this out for a loooong time and I'm still having issues.

I have an FLV. I also have a control bar that controls the FLV. I want the control bar to move when the user moves his mouse over a certain place and then for it to go off when the mouse over is off.
the problem is, when I put the mouse over that specific place, the buttons in the control bar no longer work...What am I doing wrong?!??arggh

attached is an fla if my explanation wasn't clear.




ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 10-11-2008, 11:05 AM


View Complete Forum Thread with Replies

Sponsored Links:

When The Mouse Moves Toward The Target Its _alpha Decreases, Increases When You Move
I don't know if this can be done.

Say you have an object in your movie with an instance name of "tri", that when the mouse pointer moves towards "tri" it's _alpha decreases and when the mouse moves away its _alpha returns.

If you know how this can be done please guide me to the answer.

-Thanks

View Replies !    View Related
I Want To Have An Mc Move Left And Right Depending On Where The User's Mouse Goes.
Basically, I have a photo gallery, on a long horizontal strip. I want the user to navigate this strip by simply moving their mouse to the right to make it move right, and moving their mouse to the left to make it move left.

I know that there is a way to do this where you track the mouse whereever it is on the stage...but I'd only like it to be only active when it is over this particular strip.

Also, each thumbnail on this strip has a rollover effect. I would like to have that roll over effect stay active...

Any help would be appreciated.

Thanks.

View Replies !    View Related
Allow The User To Hold Mouse Down And To Move A Movie Clip
hello,

what is the code that allows a user to hold mouse down on a movie clip and then movie the object around?

just like drag and drop...

regards
rob
www.robdewell.co.uk

View Replies !    View Related
Control Movieclip By Mouse Move
Does anybody know how to do it?
I've seen it on this site:

http://www.janvision.com/yulia/splash.htm

When you move the mose right or left, the movieclip goes forward or backward.

View Replies !    View Related
Control A Flash Movie With The Mouse To Move Left And Right
Dear all,

How to create a flash movie that controlled by the mouse to move left (play backward) and to right (play forward)

Thanks!!!

View Replies !    View Related
Scroller Moves Out Of Place
I changed the scroller image on my flash website and then when I go to preview the .SWF it looks fine, but the second you click on the scroller it moves over to the right a little bit and stays there. Can anyone tell me how to fix this? This is my ActionScript just incase its something to do with that:
Code:

scroller.handle.onPress = function() {
   this.startDrag(false,0,0,0,233);
}

scroller.handle.onRelease = scroller.handle.onReleaseOutside = scroller.handle.onRollOut = function() {
   stopDrag();
}

home_whole.home._y = scroller.handle._y * -2.5;

Or if its not actionscript, let me know what it could be.

Thanks :)

View Replies !    View Related
Image Moves When Mouse Moves?
Hi,

I'm trying to work on a code so when the mouse moves left or right, the background image on a flash movie or multiple images will scroll the opposite way. However, Ive never coded anything regarding mouse movement (that I can remember) because I'm not too fluent in using mouse listeners. Id appreciate if someone could whip up a code like this that I can learn from.

Pixel movement rate (speed) and direction control would be really nice here. Its an easy code I'm sure, I just dont know how mouse listeners work (if this is what you have to use).

Thanks in advance!

View Replies !    View Related
Kool Moves User
CAn some please help me with the product Kool Moves. I am having a problem with the text. I cannot seem to get it to a larger size, once I upload it to Homestead's Site Builder. The text remains small. I have to really enlarge the media window in order to get the desired size of the text with the affect, but then I can't seem to get anything else on the page without it being blocked out. I have tried everything to get the proper size. HELP!

View Replies !    View Related
User Moves The Image ?
Im trying to create a thing where there is a picture of say someones head and then a collection of noses and mouths etc. that can be moved by the user onto the face (like the eggplant example in flash 5), I couldn't find a tutorial for it on your site.
Help would be greatly appreciated,
Thanks
Tom

View Replies !    View Related
Allowing The User To Move Move An Object (graphic Asset)
I'm working on a Flash presentation that will be an instructional tutorial. I'm teaching users how to navigate a map and I'd like to have them move a ruler or legend to measure distances between two points. Can anyone direct me to a reference source that can help me set this up?

I'm a fairly new Flash user but very eager to learn this technique.

Thanks,

Jerry Marino

View Replies !    View Related
How Do I Create A Movieclip To Play If Mouse Is Unactive, And Stops When Mouse Moves?
I am in the process of creting a world map navigation for a global ite portal.

In the map a user can hover over different continents to zoom in on specific countries then click on that country's to goto its specific website.

However I think the world map looks a little un-user friendly so was looking at playing a quick tutorial movie (a mouse cursor, moving over a continent and highlighting it) when the mouse is not being moved, then stops when the user moves the mouse.

This feature a little reminisant of when sonic the hedgehog used to tap his foot if you didnt use your joypad for a while.

I would also like to start the movie (after he preloader ive used) with the tutorial playing, so the user can understand the way it works straight away.

I am a novice at action scripting, so all help would be appreciated!

Thanks

M

View Replies !    View Related
How Do I Create A Movieclip To Play If Mouse Is Unactive, And Stops When Mouse Moves?
I am in the process of creting a world map navigation for a global ite portal.

In the map a user can hover over different continents to zoom in on specific countries then click on that country's to goto its specific website.

However I think the world map looks a little un-user friendly so was looking at playing a quick tutorial movie (a mouse cursor, moving over a continent and highlighting it) when the mouse is not being moved, then stops when the user moves the mouse.

This feature a little reminisant of when sonic the hedgehog used to tap his foot if you didnt use your joypad for a while.

I would also like to start the movie (after he preloader ive used) with the tutorial playing, so the user can understand the way it works straight away.

I am a novice at action scripting, so all help would be appreciated!

Thanks

M

View Replies !    View Related
Tweening? I Only Want PART Of Something To Move, Yet All Of It Moves Down?
I have a box, and I want only the BOTTOM LINE to expand about 150 pixels below, but the entire box moves down, along with the top of it, which I don't want it to. I'm using motion tweening, in a total of 5 frames.

Pre-thanks to any help.

View Replies !    View Related
Href In Move Clip Which Moves
Hi,

This has go me totally beat. I've got a dynamic text field which has it's value set by.

contact_mc.contact_txt.htmlText = "CONTACT<br>T 613 9429 1411 F 613 9421 6506<br><a href="mailto:enquiries@carbonplus.com.au">ENQUIRIES@CARBONPLUS.COM.AU</a>";

The contact_mc moves upon mouse over to reveal it but the href within the clip does not work.

I'm assuming it has something to do with the movie clip being an active area itself and the mouse over handlers getting screwed up but I can't figure out a way round it.

Any help would be really appreciated.

View Replies !    View Related
Scroller That Moves According To Mouse Movement Not Mouse Location.
I am trying to recreate the effect seen here:

Express Top Ten

alright here's the request:

I have found many scroller tutes most of which use buttons to control them. What I need or think I need is a tute or file to refer to, that uses a mouseover effect to move the movieclip with respect to how much the mouse has moved and still uses easing.

I have found files that make the movieclip move according to the mouse position on the stage, but i need it to move in according to how far it just moved.

feel free to email me with any questions.

thanks in advance,
chris
email me

View Replies !    View Related
How Do I Make A Button That Moves Away From The Mouse When The Mouse Goes Near It?
Hi, all I want to do is have a button that evades the mouse, moving around the screen so the user can't click it.

Thanks

View Replies !    View Related
HELP Object Moves Left, When Hits A Wall, How Do I Make Him Turn Around And Move That
Hey guys,

I am not a compleat noob at actionscripting but I have a problem here..very tricky and flash always ends up terminating the script during gamplay as it just does not work the way I think it should.

Anyway. I will give you an example of what I am doing:

I am making a game like Security 2. 2D overhead view where you are an agent going from room to room collecting objects and compleating objectives.

So far I have managed to create 1 unit..and duplicate that to make many more enemys which makes things very easy.

Now, I have the enemy spawn randomly around the map..max units are 7 and they will auto move to the left. Code looks like this:

this._x = random(600)+100;
this._y = random(480);
this.speed = random(3)+1;

now..I want it so when they meet a wall, they will rotate 180 degrees and move the other way...and t hen onec they hit another wall..they will rotate again and move that way!

this code is long here..works perfectly atm...it spawns the units..tells them to move at a random speed and spawn randomly...if you can..please show me how to make it so..hey will turn and move the other way!!

onClipEvent (load) {
function reset() {
if (this._name == "enemy") {
this._visible = false;
} else {
this._visible = true;
}
this._x = random(600)+100;
this._y = random(480);
this.speed = random(3)+1;
}
this.reset();
}
onClipEvent (enterFrame) {
this._x -= this.speed;
if (this._x<-50) {
this.reset();
}
}
onClipEvent (load) {
power = 3;
radius = 6;
}
onClipEvent (enterFrame) {
while (_root.wall.hitTest(_x-radius, _y, true)) {
_x++;
}
while (_root.wall.hitTest(_x+radius, _y, true)) {
_x--;
}
if ((_root.enemy.hitTest(_x, _y+radius, true)) or (_root.enemy.hitTest(_x, _y-radius, true)) or (_root.enemy.hitTest(_x+radius, _y, true)) or (_root.enemy.hitTest(_x-radius, _y, true))) {
_x = 1000;
_y = 1000;
}
}


Thank you for listening and I hope you can give me a hand.

View Replies !    View Related
Move Back To Original Place?
Hi, i have been messing about with a few drop and drag mc at the moment, but i cant figure out how to make the object i drag, if it is let go outside the desired area.....for it to move back to its origin...
but i dont mean just dissapear and pop up in the origin..i mean like have it slowly move back into its place...
how the heck do i do that?
thanks guys!

View Replies !    View Related
Move An Object From One Specific Place To Another
hello, i have to use flash for an assignment. basically, I am using flash cs3 but with actionscript 2

ok, all I want to be able to do it move an object from one specific place to another.

http://img515.imageshack.us/img515/2442/mmc1un8.th.jpg

i want to move the item (curtain) that is selected, to the left to reveal the movie screen. im going to do the same for the right half of the curtain.

thanks!

View Replies !    View Related
Buttons Move Into Place - But What Script
This is certainly a question for the scripters here at kirupa -

On the following site: http://www.subvitamine.com

if you go to say the services page you will see four buttons appear, communications, interactive etc. now if you click on the interactive button for example, the other buttons move into place and of course this applies to all the other buttons. Great effect and i'd always wondered how it is done. I can see that the movement on the site is done with easing actionscript and I can manage that ok, but getting the buttons to move around like that is great. Anyone have a sample fla or a tutorial to point me at would be great.

Thank you.

View Replies !    View Related
Buttons Move Into Place - But What Script
This is certainly a question for the scripters here at kirupa -

On the following site: http://www.subvitamine.com

if you go to say the services page you will see four buttons appear, communications, interactive etc. now if you click on the interactive button for example, the other buttons move into place and of course this applies to all the other buttons. Great effect and i'd always wondered how it is done. I can see that the movement on the site is done with easing actionscript and I can manage that ok, but getting the buttons to move around like that is great. Anyone have a sample fla or a tutorial to point me at would be great.

Thank you.

View Replies !    View Related
Alt Tag That Moves With The Mouse. Help Please
How do I add an alt tag that MOVES with the mouse.

I want to place this alt tag on my invisible button.

Please help. Thanking you in advance.

View Replies !    View Related
MC Moves With Mouse
Hello-

How do I do like they do here:

http://www.exopolis.com/site/

When you move your mouse over the logos they moves around. Is there a .fla I can download to look at? Or can someone hlp me? I am a newbie

Thanks!

View Replies !    View Related
MC Moves With Mouse
Hello-

How do I do like they do here:

http://www.exopolis.com/site/

When you move your mouse over the logos they moves around. Is there a .fla I can download to look at? Or can someone hlp me? I am a newbie

Thanks!

View Replies !    View Related
MC Moves With Mouse
Hello-

How do I do like they do here:

http://www.exopolis.com/site/

When you move your mouse over the logos they moves around. Is there a .fla I can download to look at? Or can someone hlp me? I am a newbie

Thanks!

View Replies !    View Related
User Text Field That Shows Up In Another Place
Can anyone help me with this. I need for the user to type a word into a dynamic text field and for that word to show up in another text field as they type. Can anyone please help. Sample script would be much appreciated. Thanks.

View Replies !    View Related
Images Move Left To Right, Fast And Slow On Mouse Move...
I'm looking for a tutorial or example of the effect when you have images all next to each other horizontally and when you roll the mouse oneway they move in the opposite direction and when the mouse is centerd on screen they slow down... Anyone have an example or tutorial of this?

View Replies !    View Related
Images Move Left To Right, Fast And Slow On Mouse Move...
I'm looking for a tutorial or example of the effect when you have images all next to each other horizontally and when you roll the mouse oneway they move in the opposite direction and when the mouse is centerd on screen they slow down... Anyone have an example or tutorial of this?

View Replies !    View Related
Images Move Left To Right, Fast And Slow On Mouse Move...
I'm looking for a tutorial or example of the effect when you have images all next to each other horizontally and when you roll the mouse oneway they move in the opposite direction and when the mouse is centerd on screen they slow down... Anyone have an example or tutorial of this?

View Replies !    View Related
Images Move Left To Right, Fast And Slow On Mouse Move...
I'm looking for a tutorial or example of the effect when you have images all next to each other horizontally and when you roll the mouse oneway they move in the opposite direction and when the mouse is centerd on screen they slow down... Anyone have an example or tutorial of this?

View Replies !    View Related
How To Make A Clip Move Towards A Place On The Stage
I want to create a graphic adventure and I´d like to know how can I tell a character to move towards the pointer once it´s clicked (for example: when you want your character to go to a place in a room, and you click anywhere and the character goes towards that place.)

Any ideas??

View Replies !    View Related
Infinite Menu Stop And Move In Place Help
I know there alot of Infinite menu threads, but I didn't find any that addresses my issue.

I am trying to stop an infinite menu and have it go to the exact place each time a photo is clicked. I think the problem is coming when its close to the "looping" point, and a button is clicked the menu starts looping non-stop.

This is what I have so far: test_9

This is an idea of what I am trying to do: http://www.octopusaccessories.dk/

Any help or pointing in the right direction would help, thanks!

doug

View Replies !    View Related
Button And Texts Move Out Of Place In Different Browsers
hi everyone,

i am working on a site with a dropdown menu and i'm having a problem.

the dropdown links work perfectly on my mac using safari but when i view it on my pc using mozilla the buttons and the text don't align properly.

i have the buttons on one layer and the text on another layerthey are aligned when in flash; but either the text is shifting down or the buttons are shifting up when i view it in mozilla.

helppp

View Replies !    View Related
Set Variable When The Mouse Moves?
can someone explain me how that i can set a variable when i move my mouse.

View Replies !    View Related
Record Mouse Moves
hiya,
i installed an extension from macromedia called vcr which was supposed to enable you to record mouse moves and replay them - this would be perfect for the help i am trying to build. Problem is that the extension doesn't work
anyone know of this ext or know of something else to use?
any help appreciated

View Replies !    View Related
MC In A Btn To Keep Playing When Mouse Moves Over It?
Ok very simple scenario here!

All ive done is put a movieclip into a button in the over state so of course when the user moves their mouse cursor onto the title (this is what the flash is for) it starts playing.

Only problem is when they move their cursor off of the title the movie clip stops playing

All i want to do is have it play in its entirety even if the user no longer has their cursor on the actual title

I am new to flash so i guess its a bit of an obvious question but any help appreciated muchly

View Replies !    View Related
Sound When Mouse Moves?
I need the keys on the home page of this web site www.locksmithmusic.com to make a jingling noise whenever the user moves the mouse/keys. I'm guessing that it uses the onMouseMove command, but I don't know how to apply it -- or even if that's the right command to use. Any help?

Thank you so much.
Summarah

View Replies !    View Related
On Mouse Over Fly Moves Away From Cursor
what i want is when the mouse over occurs on the fly movie clip(or whatever) the fly sets a course for a random place within the overall movie and moves towards it, where it waits until another mouse over occurs.

I understand the principles of this concept but cant get the code to work. Thanks in advance for any help!

View Replies !    View Related
How Do You Get An MC To Detect A Hit When Mouse Moves Over It?
Hello all,I really need to crack this project of mine.
1: What i need is for a movie clip to play when the mouse is moved over it. There will be multiple clips that detect this mouse over and play.

2: Also i need one clip that will start as soon as the mouse moves and follows it with easing/elasticity only in x and not y axis and stops when mouse movement stops. This would be a mask revealing an image behind.

Hopefully this is clear.
Any help on either of these or both would be very much appreciated.

Thanks

Andrew

View Replies !    View Related
Mouse Moves Image
I want it when my mouse moves up or down, left or right the image moves the same. The image is bigger the movie so moving the mouse you can see the image. Can anyone help.

View Replies !    View Related
Camera Moves With Mouse
Hi guys,

Just a quick post with HOPEFULLY a quick and helpful answer. See the background effect on this game which moves the background when the mouse is moved, I would love to know how to make something similar to that. Can you either, Direct me to a tutorial that will teach me how to do this OR do you know the script to do this?

All help is appriciated!

Thankyou!

View Replies !    View Related
MC In A Btn To Keep Playing When Mouse Moves Over It?
Ok very simple scenario here!

All ive done is put a movieclip into a button in the over state so of course when the user moves their mouse cursor onto the title (this is what the flash is for) it starts playing.

Only problem is when they move their cursor off of the title the movie clip stops playing

All i want to do is have it play in its entirety even if the user no longer has their cursor on the actual title

I am new to flash so i guess its a bit of an obvious question but any help appreciated muchly

View Replies !    View Related
[req]camera Moves With Mouse?
Hi. Can anyone help me achieve this?
I need to make the background image move opposite the cursor to make it seem like the camera is moving.
A good example of what I want can be found on this site:
http://www.pleymo.net

Please check it out and help meee.
Cheers.
Shawin.

View Replies !    View Related
Go To Another Frame When Mouse Moves?
Is it possible to send the playhead to example "frame2" when the mouse moves???

Thanks

View Replies !    View Related
MC Moves Away As Mouse Gets Close Help
I suppose the help in the subject is an understatement.

What I'm looking to do is have a MC on the stage. As the mouse gets close to it, it moves away - idealy in the opposite direction. Eventually it would hit a limit and bounce back to it's original position. Kinda like the way 2 magnets would repel each other.

I've seen this effect before on other sites (none of which I can find currently )…

I realize that it's just going to be some trig/algebra and the tracking of the x/y of the mouse. Perhaps an onEnterFrame action on the MC.

I can figure out the distance the mouse is from the MC (the square root of ((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)) ) - but then then dealing with angles and stuff starts to hurt my brain.

I went to art school… can anyone help? (Or if you can point me to a tutorial or something… I searched, but I couldn't find anything that didn't involve FOLLOWING the mouse.)


Thanks,
Chenzo

View Replies !    View Related
Function To Control The Scroll Speed At Which A Thumbnail Rolling Bar Moves
The thumbnail scroll bar starts speeding slow and than it gets faster and faster. I would like to slow down this speed.

I need to slow down the speed at which the thumbnail rolling bar moves from left to right. The slideshow I have includes a thumbnail brownsing bar. The speed at which the thumbnails move at the begining is just fine but as the user scrolls down further it starts to move the thumbnails way to fast.

Can someone take a look a the Controller I am using which is attached and let me know what I am missing?
I am attaching the code I am using and also here is the link to the slideshow

THank you so much

Fernanda InchaustiWorking slideshow







Attach Code

/*
---------------------------------------------------------
Classe Controlador
---------------------------------------------------------
Controla tudo o que ocorre no slide show...
---------------------------------------------------------
*/

class Controlador {

// atributos

var nPics:Number;
var nThumbs:Number;
var picsLoaded:Number;
var thumbsLoaded:Number;
var picAtual:Number;
var thumbAtual:Number;
var dirImg:String;
var dirThumbs:String;
var modoShow:Boolean;
var razaoPorc:Number;
var scrollLimite:Number;
var base:MovieClip;
var clipAtual:MovieClip;
var showPlaying:Boolean;
var movendoThumbs:Boolean;

// métodos

function Controlador(clip:MovieClip) {

nPics = 45;
dirImg = "images/fullsize/";
dirThumbs = "images/thumbnails/";

nThumbs = 0;
picsLoaded = 0;
thumbsLoaded = 0;
razaoPorc = 100 / nPics;
base = clip;
modoShow = true;
showPlaying = false;
}

function iniciar() : Void {
var a, b : Number;
var txt, txtFoto : String;
var objThumb : Object;

ocultarTudo();

base.listaThumbs.thumb1.ativo = false;
base.listaThumbs.thumb1.numero = 1;
base.foto1.numero = 1;
base.foto1.pronto = false;

// cria os espaços para cada foto e thumbnail
for(a = 2; a <= nPics; a++) {
b = a - 1;
txt = "thumb" + a;
txtFoto = "foto" + a;

base.listaThumbs.thumb1.duplicateMovieClip(txt, b);
base.foto1.duplicateMovieClip(txtFoto, b);

base.listaThumbs[txt].ativo = false;
base.listaThumbs[txt].numero = a;
base[txtFoto].numero = a;
base[txtFoto].pronto = false;
}

base.loadingPics._visible =
base.loadingThumbs._visible = true;

// ajuste de profundidades
base.fade.swapDepths(nPics);
base.btPlay.swapDepths(nPics + 1);
base.loadingPics.swapDepths(nPics + 2);
base.loadingOnePic.swapDepths(nPics + 3);

picAtual =
thumbAtual = 1;
clipAtual = base.foto1;
base.infoSlides.slideTotal.text = nPics;

carregarFoto(1);
carregarThumbs();
}

function ocultarTudo() : Void {
var a : Number;

base.btNext._visible =
base.btPrevious._visible =
base.btPlay._visible =
base.infoSlides._visible =
base.loadingPics._visible =
base.loadingThumbs._visible =
base.listaThumbs._visible =
base.loadingOnePic._visible = false;
for(a = 1; a <= nPics; a++) {
base["foto" + a]._visible = false;
}
}

function carregarThumbs() : Void {
var a : Number;

for(a = 1; a <= nPics; a++) {
base.listaThumbs["thumb" + a].img.loadMovie(dirThumbs + a + ".jpg");
}
}

function avisarThumbCarregado(clip:MovieClip) : Void {
thumbsLoaded++;
base.loadingThumbs.barra._xscale = thumbsLoaded * razaoPorc;
base.loadingThumbs.barra._alpha = 100;
if(thumbsLoaded >= nPics) {
base.loadingThumbs.barra._visible = false;
posicionarThumbs();
}
}

function posicionarThumbs() : Void {
var anterior, atual : MovieClip;
var a : Number;

anterior = base.listaThumbs.thumb1;
ajustarBordaThumb(anterior);
anterior.img._alpha = 60;
for(a = 2; a <= nPics; a++) {
atual = base.listaThumbs["thumb" + a];
atual._x = anterior._x + anterior._width;
atual.img._alpha = 60;
ajustarBordaThumb(atual);
anterior = atual;
}
base.listaThumbs._visible = true;
base.loadingThumbs._visible = false;
scrollLimite = (base.listaThumbs._width > 600) ? 600 - base.listaThumbs._width : 4;
base.listaThumbs.ret = this;
base.listaThumbs.onEnterFrame = function () {
if(_root._ymouse > 435 && _root._ymouse < 600) {
if(_root._xmouse < 300) {
this.ret.moverThumbsDir(10 - _root._xmouse * 10 / 300);
} else if(_root._xmouse > 300) {
this.ret.moverThumbsEsq(_root._xmouse * 10 / 300 - 10);
}
this.ret.movendoThumbs = true;
} else {
this.ret.movendoThumbs = false;
}
}
}

function ajustarBordaThumb(clip:MovieClip) : Void {
var x, y : Number;

clip.borda._visible = false;
// desenha a borda
x = clip.img._width + 4;
y = clip.img._height + 4;
clip.borda.lineStyle(0, 0xFFFFFF, 100);
clip.borda.lineTo(x, 0);
clip.borda.moveTo(x, 0);
clip.borda.lineTo(x, y);
clip.borda.moveTo(x, y);
clip.borda.lineTo(-1, y);
clip.borda.moveTo(-1, y);
clip.borda.lineTo(-1, -1);
// ajusta a área de link
clip.link._width = clip.img._width;
clip.link._height = clip.img._height;
}

function moverThumbsEsq(passo) : Void {
if(base.listaThumbs._x > scrollLimite) {
base.listaThumbs._x -= passo;
}
}

function moverThumbsDir(passo) : Void {
if(base.listaThumbs._x < 4) {
base.listaThumbs._x += passo;
}
}

function selecionarFoto(num:Number) : Void {
clipAtual._visible = false;
picAtual = num;
clipAtual = base["foto" + picAtual];
exibirFotoAtual();
atualizarInfo();
atualizarBotoes();
}

function atualizarAtivoThumb() : Void {
var a : Number;
var txt : String;

// desativando o thumb anteriormente selecionado
txt = "thumb" + thumbAtual;
base.listaThumbs[txt].img._alpha = 60;
base.listaThumbs[txt].borda._visible = false;
base.listaThumbs[txt].ativo = false;
base.listaThumbs[txt].link._visible = true;

// ativando o thumb selecionado
txt = "thumb" + picAtual;
base.listaThumbs[txt].img._alpha = 100;
base.listaThumbs[txt].borda._visible = true;
base.listaThumbs[txt].ativo = true;
base.listaThumbs[txt].link._visible = false;
thumbAtual = picAtual;
// reposicionando os thumbs para que o ativo fique visível
if(!movendoThumbs) {
centralizarThumbAtivo();
}
}

function centralizarThumbAtivo() : Void {
var pos : Number;
var thumb : MovieClip;

thumb = base.listaThumbs["thumb" + thumbAtual];
pos = base.listaThumbs._x + thumb._x + thumb._width;
if(pos < 0 || pos > 600) {
base.listaThumbs._x = Math.max(Math.min(0, base.listaThumbs._x + 350 - pos), scrollLimite);
}
}


function carregarFoto(indice:Number) : Void {
base["foto" + indice].img.loadMovie(dirImg + indice + ".jpg");
}

function contarFotoCarregada(indice:Number) : Void {
var txt : String;
var prox : Number;

txt = "foto" + indice;
picsLoaded++;
base[txt].pronto = true;
base[txt]._visible = false;
atualizarLoadingFotos();
centralizarFoto(indice);
prox = proximaFotoNaoCarregada(indice);
//trace("indice = " + indice + " prox = " + prox);
if(picsLoaded < nPics) {
carregarFoto(prox);
}
if(modoShow && !showPlaying && prox > 0) {// se está no modo slide show e as 4 próximas fotos já estão no cache, dá o play
if(prox - picAtual > 3) {
continuarShow();
}
} else if(indice == picAtual && !modoShow) {// se não está no modo slide show e está carregando a foto que se deseja visualizar, exibe imediatamente
exibirFotoAtual();
}
}

function proximaFotoNaoCarregada(indice:Number) : Number {
var a, cont : Number;

a = indice;
for(cont = 0; cont < nPics; cont++) {
if(!base["foto" + a].pronto) {
return a;
}
a = (a == nPics) ? 1 : a + 1;
}
return 0;
}

function atualizarLoadingFotos() : Void {
base.loadingPics.barra._xscale = picsLoaded * razaoPorc;
base.loadingPics.barra._alpha = 100;
base.loadingPics.nPic.text = picsLoaded + " / " + nPics;
}

function centralizarFoto(num:Number) : Void {
var clip : MovieClip;

clip = base["foto" + num];
clip._x = 300 - (clip._width / 2);
clip._y = 230 - (clip._height / 2);
}

function continuarShow() : Void {
modoShow = true;
showPlaying = true;
fadeinFotoAtual();
atualizarInfo();
atualizarBotoes();
}

function atualizarInfo() : Void {
base.infoSlides.slideAtual.text = picAtual;
base.infoSlides._visible = true;
if(base.listaThumbs._visible) {
atualizarAtivoThumb();
}
}

function atualizarBotoes() : Void {
base.btPrevious._visible = (picAtual > 1);
base.btNext._visible = (picAtual < 110);
}

function proximaFoto() : Void {
clipAtual._visible = false;
picAtual = (picAtual == nPics) ? 1 : picAtual + 1;
clipAtual = base["foto" + picAtual];
exibirFotoAtual();
atualizarInfo();
atualizarBotoes();
}

function fotoAnterior() : Void {
clipAtual._visible = false;
if(picAtual > 1) {
picAtual--;
}
clipAtual = base["foto" + picAtual];
exibirFotoAtual();
atualizarInfo();
atualizarBotoes();
}

function exibirFotoAtual() : Void {
if(modoShow) {
if(clipAtual.pronto) {
fadeinFotoAtual();
} else {
base.fade.gotoAndPlay(1);
showPlaying = false;
base.loadingPics._visible = true;
base.btPlay._visible = false;
carregarFoto(picAtual);
}
} else {
if(clipAtual.pronto) {
base.fade.gotoAndStop("parado");
clipAtual._visible = true;
base.loadingOnePic._visible = false;
base.btPlay._visible = true;
} else {
base.loadingOnePic._visible = true;
base.btPlay._visible = false;
carregarFoto(picAtual);
}
}
}

function fadeinFotoAtual() : Void {
base.fade.gotoAndPlay("fadeIN");
clipAtual._visible = true;
base.loadingPics._visible = false;
base.btPlay._visible = true;
}

function alternarModo() : Void {
if(modoShow) {
modoShow = false;
showPlaying = false;
base.btPlay.texto.text = "PLAY SLIDE SHOW";
exibirFotoAtual();
} else {
modoShow = true;
showPlaying = false;
base.btPlay.texto.text = "PAUSE SLIDE SHOW";
proximaFoto();
}
}

}

View Replies !    View Related
Move Movie Clips On Mouse Move (opposite)
Hi.

Does anybody have idea how this thing work (the cirlcles moves)?

http://www.templatemonster.com/flash...tes/15650.html

As well as the button gets closer to mouse when near the buttons.

I cant seem to find here .


Thanks very much.

View Replies !    View Related
180 Degree Pan On Mouse Over - Stop In Place On Mouse Out
I want to do something similar to these except I would like to have left and right arrow buttons that pan on rollOver and stop in place on rollOut.

http://www.kirupa.com/developer/flas..._image_pan.htm
http://www.flashloaded.com/flashcomp.../360panviewer/

I was able to get it to pan on mouseover correctly, but mouseout seems to moving the mc to -3830. Here's my code

//code on panning_mc
onClipEvent(load){
_root.targetx = -3830; //Startposition
}
onClipEvent(enterFrame){
diff = _root.targetx - this._x;
this._x += diff/50;
}

//code on left button
on(rollOver){
_root.targetx = 50;
}
on(rollOut){
_root.targetx = panoramic_mc._x;
}

//code on right button
on(rollOver){
_root.targetx = -50;
}
on(rollOut){
_root.targetx = panoramic_mc._x;
}

Can anyone help?

View Replies !    View Related
Making A Clip Move On A Random Path, But End In The Same Place
Maybe someone can help -- still a little new at actionscript:

I have a movie clip that needs to zip along some sort of a path, but end up in the same place by frame X every time. Right now, I've drawn a random-looking path, and have it motion tweened along it, which looks fine the first time, but gets old (and the tweening is slowing stuff down).

Is there any way in actionscript to make something move randomly, but end up in the same place and the end frame?

Any help is appreciated... thanks.

View Replies !    View Related
Mouse Over Moves When Text Is From A .txt File
WHY!!!
this is what i am loading into my button from a .txt(see below)
when ther is no <a href> the mouse over is cool but when i add the <a href> it makes the over state move or not work????

&MN_01btn1= <a href="http://www.someurl.com">. SOUTHERN CALIFORNIA FACILITIES</a>&

View Replies !    View Related
Floating Mouse Over That Moves Within The Button
Can't find a tut, is there someone that can give me a start


floating mouse over that moves within the button

Like a little flag

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