HOVER CAPTION
I went through the hover caption tutorial and everything is awesome except when another button is selected the hover does not drag anymore and just shows up static, most of the time it is in a complete different location than specified... any ideas as to why this could be happening.
Thanks...
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 05-25-2005, 06:23 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Hover Caption?
Just wondering, can u have moce then one movie follow the mouse?
Anyway....
PHP Code:
startDrag(_root.caption, true);
startDrag(_root.captiontr, true);
I am trying to get more then 1 different style hover caption over a button using the tutorial found on this site..any help would be nice..thxs.
Help With Hover Caption (yep, Again)
Sorry to post another thread regarding the Hover caption tutorial.
I've followed it word for word and it works perfectly...You click on a button > you go to the next scene. Perfectly until I return back to the main scene with the hover caption (main menu scene) and the hover caption follows the mouse everywhere (whether you are on a button or not).
I've attached the file because I dont think Im explaining myself too well.
Hovering over the square shows "about me" hover caption. Clicking on it takes you to the 'about me scene'. To return to the main menu click on the 'menu' button. Notice the orange caption box is following the mouse? That is my problem.
Its probably simple but any help appreciated. Cheers.
Help Hover Caption
I tried to add hover caption feature on Scotty's photo gallery but somehow the caption cannot appear on the very top layer. Can someone advise me how to correct it?
Hover Caption
For anyone wanting to help with a hover caption, see the link below and try completing the tutorial. I think there's a problem with it. It reads the caption off the code and not the design. you'll see. if you have a solution, i'd be interested to know.
http://www.kirupa.com/developer/mx20...r_captions.htm
Thanks!
Detch
Hover Caption Help
i went through the tutorial (was successful) and some forums, but couldn't find what i needed.
i have a somewhat messy .fla file as it is. but i wanted to add hover captions to four buttons. these four buttons are inside a movie clip in scene 1. i've tried several ways of adding the action for hover captions, but can't get it to work.
do i need to have all the buttons on one layer? or...do they need to be put in scene 1 instead of inside the movie clip?
if anyone could help i would REALLLLLY appreciate it!!!
thanks!
Hover Caption
I'm using this hover caption on my site:
http://www.kirupa.com/developer/mx/captions.htm
But I would like to have the hover caption appear for only a short amount of time (2 seconds?). Any tips to do this? Cause I don't know where to start/search (:
Here's the main part of the code:
Code:
onClipEvent (enterFrame) {
if (_root.x==1) {
this._alpha = 50;
} else {
this._alpha = 0;
}
}
Thanks!
Hover Caption Help
I'm following the tutorial from this website:
http://kirupa.com/developer/mx2004/hover_captions.htm
The problem I'm having is that the button used to trigger the movie clip (the caption text) is inside another movie clip. On movie load, and after rolling over the test button, the message shows briefly but no where close to the actual word "test". On a rollout and subsequenent rollover, the caption doesn't appear at all. I'm stumped as the problem.
If anyone would be willing to take a look at this sample file I have provided, I would greatly appreciate it.
http://midwestwebdesign.net/example.zip
Help With Hover Caption (yep, Again)
Sorry to post another thread regarding the Hover caption tutorial.
I've followed it word for word and it works perfectly...You click on a button > you go to the next scene. Perfectly until I return back to the main scene with the hover caption (main menu scene) and the hover caption follows the mouse everywhere (whether you are on a button or not).
I've attached the file because I dont think Im explaining myself too well.
Hovering over the square shows "about me" hover caption. Clicking on it takes you to the 'about me scene'. To return to the main menu click on the 'menu' button. Notice the orange caption box is following the mouse? That is my problem.
Its probably simple but any help appreciated. Cheers.
Hover Caption?
Hi,
I have a site I built with an empty mc which calls upon other mc. One is a gallery with some thumbs near the bottom. I put a script on the thumbs which display hover captions when rolled over. WHen I test the mc by itself, they work fine. When I play the main movie, and call upon the gallery, the whole gallery or mc moves with the mouse.
Here is the code I placed on the buttons in the gallery for the hovers.
action frame - startDrag(_root.caption, true);
buttons - on (rollOver) {
_root.x = 1;
_root.caption.words = "Bones";
}
on (rollOut) {
_root.x = 0;
_root.caption.words = " ";
}
Probably something simple, but I'm stumped.
Thanks
Jr. Texas flasher
A Flash Hover Caption
HELLO
here is the site http://www.changthai.org/test/netcones12.html
and the problem is centering the damn thing. But only for a certain element. I have centered it all , but there is one segment that is giving me the hurting big time.
it is the "client" clip (in its own centered mc, like the others) i have done a simple hovver / captioning over these two images, and the whole clip is thrown off kilter when the screen is resized.
what should i do ? squint some more at the screen, or just hope no one bothers to minimize their screen when on that particular scene ???
DJ
EDIT : I know its the captions that are twotting with the centering. but i dont want to go without them. i used the tute from kirupa to put them together.
Hover Caption Problem
Hey i am having trouble figuring out how come the yellow word bar stays on the stage when i play my movie and why when you hover over the button the rectangle gets real short? Thanks.
Specify Hover Caption Font?
Code:
Button.prototype.hover = function(refuge) {
this.onRollOver = function() {
_root.x = 1;
box.createTextField("caption", 1, box.test._x+2, box.test._y+2, 300, 50);
box.caption.type = "dynamic";
box.caption.multiline = true;
box.caption.wordWrap = true;
box.caption.size = 10;
box.caption.font = "Tahoma";
box.caption.text = refuge;
box.caption.autoSize = "left";
box.test.resize();
};
Hey there.
I have been playing around with this a bit.... and have been trying to get the hover captions to have a different font... and eventually a different color - possibly even bolded ? so i entered in the
box.caption.font = "Tahoma";
line of code,... and it didnt seem to work. I also noticed that altering the SIZE line had no effect as well.
I am trying to get this wrapped up by tomorrow, so if anyone out there has any answers to this,.. i would really appreciate it!
thank you - me
Two Hover Caption Problems
I have just tried the hover caption tutorial using my own image and caption. I have two problems:
1. The caption box is always visible when it should only be visible when the mouse is over the image of the horse.
2. The words in the caption box do not stay visible while the mouse is over the image; the words only appear for a second then disappear.
I have attached the .fla file.
Any help you can provide would be greatly appreciated by this relatively new Flash user. Thanks in advance!
Silly Hover Caption...
Hey,
Just wondering if anyone can help me with a bug in my new site. I used the hover caption tutorial from Kirupa on a few pages and they work fine, unless you use a scroll bar on the same page, and then the "hover" no longer hovers over the area it should, but near the top of the page. Anyway, maybe someone has encountered this before - take a peek, www.balanceimages.org on the drop down menu, click on "images", hover over the "i" and then click it, then use the scroll bar in the popup, and finally my friends, close the popup and then try the hover caption again...
Whew, thanks,
Apertureboy
Hover Caption Is Sticky
hello,
I am using hover captions for my content boxes inside my site and for some reason Im having difficulties with rollOver and rollOut on a dragable button and its driving me nuts. basically whats happening is I have 3 buttons on each menu 1)Drag <which is causing a problem 2)maximize/minimize <which the caption is sticking on after drag has been clicked 3)close <which the caption is also sticking on drag after drag has been clicked
heres the AS that I have on the 3 buttons and the caption code is the standard kirupa caption code with a couple small tweaks
drag
Code:
on (rollOver) {
_root.pointer.gotoAndStop (3);
_root.x = 1;
_root.news.caption.words = "Drag Me!";
}
on (rollOut) {
_root.pointer.gotoAndStop (1);
_root.x = 0;
_root.news.caption.words = " ";
}
on (press) {
startDrag("_root.news");
_root.pointer.gotoAndStop (4);
_root.news._alpha = 50;
_root.x = 1;
_root.news.caption.words = "Drag Me!";
}
on (release) {
_root.pointer.gotoAndStop (3);
stopDrag();
_root.news._alpha = 100;
_root.x = 0;
_root.news.caption.words = " ";
}
maximize/minimize
Code:
on (rollOver) {
_root.pointer.gotoAndStop (2);
}
on (rollOut) {
_root.pointer.gotoAndStop (1);
}
on (press) {
_root.news.gotoAndStop ("min");
}
on (rollOver) {
_root.x = 1;
_root.news.caption.words = "Minimize";
}
on (rollOut) {
_root.x = 0;
_root.news.caption.words = " ";
}
close
Code:
on (rollOver) {
_root.pointer.gotoAndStop (2);
}
on (rollOut) {
_root.pointer.gotoAndStop (1);
}
on (press) {
_root.news.caption.gotoAndStop ("off");
_root.news.gotoAndStop ("closemax");
}
on (rollOver) {
_root.x = 1;
_root.news.caption.words = "Close";
}
on (rollOut) {
_root.x = 0;
_root.news.caption.words = " ";
}
so does someone feel like checkin it out for me? Ive been messing with it for a couple of days but really cant figure it out and because Im almost done with my site Ive been working on my client login script so this thing is just a big thorn in my side.
thanks ahead of time
Hover Caption Not Working
HI,
I was able to follow the instructions on how to create hover caption in Flash MX, I had no problem. However, when I try on my own Flash document I created (5 times) i cannot get it to work. I follow the steps one by one the same way I did when I did the tutorial but I cannot make it work. Any ideas why?
I am doing the same steps as in: Displaying Hover Captions (http://www.kirupa.com/developer/mx/captions.htm).
Thanks.
Jana
Hover Caption Question
Is it possible to have two different hover caption styles in the same movie?
I followed the tutorial and it works fine. But I want to have one style where the text aligns to the right of the mouse and another that aligns to the left of the mouse.
How do I work this in to the ActionScript?
Thanks.
Animated Hover Caption
hi..
Does anyone know how to create a animated hover caption..I've created one using the tut..but can't seem to work out how to make an animated one..
what I'm looking for is a cation to pop up in an expanding box when roll over and retract when roll out..
any thoughts?
postatomic
Hover Caption Issues
I cannot download the .fla from the hovercaptions tut and started from scratch. I can get the box to follow the mouse and show up on rollover but cannot get the text to do its job. I need a solution or working .fla, or anything else. I named the "words" thing correctly and it still dose not work. Thanks in advance
Pictures In A Hover Caption... HELP
Hello
I just wanna know how to make pictures in a hover caption instead of text... i could be nice if anyone of you guys could send a explanation og a file i can use...
thank you
yoomoo
Extending Hover Caption
i'm referring to the following tutorial.. http://www.kirupa.com/developer/mx/captions.htm
and was wondering if there's any changes to make if i were to load the captions swf externally into another movie, what changes are to be made if i want to achieve this? thx
Using Hover Caption As Buttons.
Hi guys!
I studied through the hover caption tutorial and i was wondering is it possible to use it as a button like the ones below kirupa.com navigation buttons. How do i do it? Thanks in advance
Hover Caption Problems
Hi guys and gals,
Don't know whether anyone has tried out the tutorial for the Hover captions but i created a clip using the captions. All works well except for when i hover over the buttons (they are movie clips), the buttons keep refreshing as if there are layer problems. Its a bit hard to explain but i have posted the swf and the fla on the following link if anyone can help me out with this REALLY annoying problem. Thankyou in advance.
http://www.sexinthecity.com.au/FLA/map.swf
http://www.sexinthecity.com.au/FLA/map.fla
Hover Caption Tutorial Help?
I have got this code to work fine but one small problem...on the rightside of the stage the hover goes away...is there anyway to determine if your close to the rightside edge of the stage reverse the hover to the bottom right corner instead of always using the bottom left corner as the center of the hover...
any help would be greatly appreciated...
thanks
captionFN = function (showCaption, captionText, bName) {
if (showCaption) {
_root.nation.createEmptyMovieClip("hoverCaption", this.getNextHighestDepth());
cap.desc.text = captionText;
cap._width = 8*cap.desc.text.length;
cap._alpha = 95;
//
if ((bName._width+bName._x+cap._width)>Stage.width) {
xo = -2-cap._width;
yo = -17;
} else {
xo = 2;
yo = -17;
}
hoverCaption.onEnterFrame = function() {
cap._x = _root.nation._xmouse+xo;
cap._y = _root.nation._ymouse+yo;
cap._visible = true;
};
} else {
delete hoverCaption.onEnterFrame;
cap._visible = false;
}
};
Hover Caption Issues... Again
Hi,
Although tutorial from http://www.kirupa.com/developer/mx20...r_captions.htm seems to solve common use of captions on hover, I see there are 2 issues left:
1. Tnere are variable trailing spaces after last letter of caption. I was expecting that caption to be equally surrounded with a border. Something like padding: 4pt in HTML table cells.
2. Caption text doesn't support HTML tags, so you can't have caption text on multiple rows, no bold, etc... etc. I tried setting dynamic text field as HTML... but no luck.
And what's even more frustrating, although issue no. 2 was brought into forum discussion, solutions were VERY short-explained making you wonder why such haste in replies...
I hope that now we'll have an upgrade to that tutorial. But till then I am curious who can solve my 2 issues.
Cheers
Hover Caption Multiline
I am trying to use the Flash MX 2004 Hover Caption tutorial to create tool tips for certain parts of my movie. I am struggling to get the text to display multiline. Has anyone tried this or know how to tweak the code? I have tried setting the dynamic text field to multiline but that didn't work. I tried using /r or /n for carriage returns but also had no luck. Even rendering th etext field as HTML an dusing <br> tags didn't seem to do the trick.
This is the relevant actionscript from the tutorial...
b1.onRollOver = function() {
captionFN(true, "A bunch of text here that needs to be displayed on more than one line.", this);
this.onRollOut = function() {
captionFN(false);
};
};
captionFN = function (showCaption, captionText, bName) {
if (showCaption) {
_root.createEmptyMovieClip("hoverCaption", this.getNextHighestDepth());
cap.desc.text = captionText;
cap._width = 7*cap.desc.text.length;
cap._alpha = 75;
//
if ((bName._width+bName._x+cap._width)>Stage.width) {
xo = -2-cap._width;
yo = -17;
} else {
xo = 2;
yo = -17;
}
hoverCaption.onEnterFrame = function() {
cap._x = _root._xmouse+xo;
cap._y = _root._ymouse+yo;
cap._visible = true;
};
} else {
delete hoverCaption.onEnterFrame;
cap._visible = false;
}
};
Problem With Hover Caption
Hi, I finished tutorial about hover captions and everything works fine until I transfer this code to my .fla. I know that it is matter of addressing etc. but I don't know how to do this.
My button (which I want add captions) is inside movie clip. Movie clip is on main timeline. How the addressing should look??
Thx,
Hover Caption Tutorial
Please forgive me for posting another question prior to receiving an answer from my previous one, seems like I'm not doing much other than running into roadblocks today
I really really like the hover captions tutorial on this site & want to use it with what I am working on. My question is can this type of thing be made into a MC? I want to use it in congunction with my interface. However every time I try to make a seperate clip out of it & put a layer underneath of it, I seem to be ending up with a draggable layer.
If I just open the file & put a layer underneath of it I don't seem to have any problem?
I am humbled once again by my meager knowledge! I get to thinking I got it all together then WHAM!
Any suggestions?
Janet
Hover Caption Troubleshoot
Hello:
I'm working on my website following the Hover Caption tutorial on kirupa. I've done hover captions before in the past and I've had no problem. But it was for more simplistic things. The problem is, I've got a hover caption going on the main page of my site but everytime I click on the button with the hover caption to a new page, and from that new page page click back to the main page, the rectangular box containing the captions appear and is stuck on the cursor. Oddly enough, this problem ONLY happens on the button I click WITH the hover caption on it. I tested out my links via the navigation buttons within the site, to ensure everything runs properly, and from the other pages linking back to the main, this problem doesn't occur. I hope this is something small I've missed cus this is giving me a headache..
Thanks for your help if you can -- files are posted here.
Hover Caption Images
hi everyone!
I'm trying to create the effect of a hover caption..you know the effect...
but I want to use images rather than words...any ideas???
cheers
postatomic
Hover Caption Tutorial Help.
Okay, I've used the following tutorial:
http://www.kirupa.com/developer/mx2004/hover_captions.htm
and adapted it to work with my site, but I'm having a strange problem in that it doesn't seem to work for some of the buttons. I've swapped instant names between buttons that work and those that don't, and this makes no difference - the same buttons don't work, and the ones that do work display the caption that should be on the other button, so I'm pretty sure it's nothing to do with the actionscript. I'm completely stumped....
Problem With Hover Caption.
Well... i hope your help..
I have a kirupa's gallery where ...
Code:
galleryDir="images";
phpArray = new Array("j1.JPG","j2.JPG","j3.JPG","j4.JPG","j5.JPG","j6.JPG","j7.JPG","j8.JPG","j9.JPG","j10.JPG","j11.JPG","j12.JPG");
phpArrayTxt= new Array("one","two"......................);
for(i=0;i<phpArray.length; i++)
phpArrayTxt[i]="";
populateGallery(phpArray);
phparray is the total number of images and phparraytxt is the text that show me its details....
But only show me the pics ... the text nop.... some solution about this???
Here's the whole code....
Code:
_root.useHandCursor=false;
init_xgalleryDecor=galleryDecor._x;
init_xsideMenu=sideMenu._x;
galGap=gallery._x-galleryDecor._x;
galHanGap=galleryHandle._x-galleryDecor._x;
gallery.viewing=false;
_root.createEmptyMovieClip("bigCtrl",13001);
gallery.totalHeight=0;
galleryDir="images";
phpArray = new Array("j1.JPG","j2.JPG","j3.JPG","j4.JPG","j5.JPG","j6.JPG","j7.JPG","j8.JPG","j9.JPG","j10.JPG","j11.JPG","j12.JPG");
phpArrayTxt= new Array("hola1","Hola2");
for(i=0;i<phpArray.length;i++)
phpArrayTxt[i]=;
populateGallery(phpArray);
function populateGallery(phpArray)
{
gallery.ready = new Array();
gallery.stack = new Array();
gallery.readyLast = 0;
gallery.picSpace = 100;
gallery.picSpace2 = 8;
gallery.yStart = 10;
for(i=0; i<phpArray.length; i++)
{
gallery.ready[i]=0;
if(i!=0)
gallery.yPos=gallery.picSpace*i;
else
gallery.yPos=gallery.yStart;
mc = gallery.createEmptyMovieClip("jpgHolder"+i,1+i);
ctrl = gallery.createEmptyMovieClip("controller"+i,1000+i);
gallery.stack[i]=mc;
mc._y=gallery.yPos;
mc.loadMovie(galleryDir+"/thumb/"+phpArray[i]);
ctrl.i=i;
ctrl.pct = _root.createEmptyMovieClip("pct"+i,i+12000);
ctrl.pct.lineStyle(1,0x999999,10);
ctrl.pct.moveTo(-61,0);
ctrl.pct.beginFill(0xcccccc,80);
ctrl.pct.lineTo(61,0);
ctrl.pct.lineTo(61,10)
ctrl.pct.lineTo(-61,10);
ctrl.pct.lineTo(-61,0)
ctrl.pct.endFill();
ctrl.onEnterFrame=function()
{
j=gallery["jpgHolder"+this.i];
loadRatio=(j.getBytesLoaded()/j.getBytesTotal())*100;
this.pct._x=gallery._x+62.5;
this.pct._y=j._y;
this.pct._xscale=loadRatio;
if(loadRatio==100)
removeMovieClip(this.pct);
if(j.getBytesLoaded()==j.getBytesTotal() && j._width>0)
{
ratio=j._width/125;
j._xscale=100/ratio;
j._yscale=100/ratio;
gallery.ready[this.i]=j._height;
ha = this.attachMovie("handle","handle",this.getNextHighestDepth());
ha.myMc=j;
ha._alpha=50;
ha._x=-1;
this.myMc=j;
ha.onEnterFrame=function()
{
this._y=this.myMc._y+this.myMc._height/2;
}
ha.up.onPress=function(){ swapUp(this._parent.myMc);}
ha.down.onPress=function(){ swapDown(this._parent.myMc);}
readyFunction();
this.onEnterFrame=function()
{
//trace(this.myMc);
if(this.myMc.mOver==true && this.myMc._alpha > 60)
this.myMc._alpha-=3;
else if(this.myMc._alpha <100)
this.myMc._alpha+=3;
}
j.onRollOver=function(){ this.mOver=true;};
j.onRollOut=function(){ this.mOver=false; };
j.onReleaseOutside=j.onRollOut;
}
}
}
}
MovieClip.prototype.fetchPic=function(i)
{
_root.createEmptyMovieClip("bigJpgHolder",13000);
_root.bigJpgHolder.loadMovie(galleryDir+"/"+phpArray[i]);
l = _root.attachMovie("loader","loader",15000);
l._x = 200;
l._y = 200;
vx=vy=0;
l.onEnterFrame=function()
{
rx=_xmouse-this._x;
ry=_ymouse-this._y;
//Elastic Function
k=.2;
damp=.8;
rx*=k;
ry*=k;
vx+=rx;
vy+=ry;
vx*=damp;
vy*=damp;
l._x+=vx;
l._y+=vy;
}
_root.bigCtrl.onEnterFrame=function()
{
j=_root.bigJpgHolder;
l=_root.loader;
loadRatio=(j.getBytesLoaded()/j.getBytesTotal())*100;
l.loaderPct._xscale=loadRatio;
//Go back on Click <>
var mouseListener:Object = new Object();
mouseListener.onMouseDown = function()
{
easeTo(l,-200,10);
gallery.viewing=true;
easeSide(_root.galleryDecor,init_xgalleryDecor,5,0,false,true);
easeSide(_root.sideMenu,init_xsideMenu,5,0,false,false);
easeTo(_root.bigJpgHolder,Stage.height+50,5);
easeTo(_root.maskJpg,Stage.height+56,5);
for(j=0;j<gallery.ready.length;j++)
_root["txtFrame"+j]._visible=1;
Mouse.removeListener(mouseListener);
}
Mouse.addListener(mouseListener);
//Go back on Click </>
if(j.getBytesLoaded()==j.getBytesTotal() && j._width>0)
{
m=_root.attachMovie("maskJpg","maskJpg",20001);
//Loader Hide
easeTo(l,-100,10);
mh=Stage.height-50;
mw=Stage.width-50;
if(j._height > j._width)
ratio=j._height/mh;
else
ratio=j._width/mw;
j._xscale=100/ratio;
j._yscale=100/ratio;
j._y=(Stage.height/2)-(j._height/2);
j._x=(Stage.width/2)-(j._width/2);
m._x=j._x-6;
m._y=j._y-6;
m._width=j._width+12;
m._height=j._height+12;
delete this.onEnterFrame;
}
}
}
function readyFunction()
{
//pics/total pics
totalLoaded=0;
for(i=0; i < gallery.ready.length;i++)
if(gallery.ready[i]>0)
totalLoaded++;
if(gallery.ready.length == totalLoaded)
_root.sideMenu.numPicsLoad.text="";
else
_root.sideMenu.numPicsLoad.text="Cargando... "+totalLoaded+"de"+gallery.ready.length;
//pics/total pics </>
for(i=gallery.readyLast;gallery.ready[i]>0 && i < gallery.ready.length;i++)
{
mc = gallery["jpgHolder"+i];
mc.i=i;
mc.onPress=function()
{
easeSide(_root.galleryDecor,-200,5,this.i,true,true);
easeSide(_root.sideMenu,Stage.width,5,this.i,true,false);
for(j=0;j<gallery.ready.length;j++)
_root["txtFrame"+j]._visible=0;
}
//text Frame
txtWidth=245;
txtHeight=mc._height-2;
drawer = _root.createEmptyMovieClip("txtFrame"+i,this.getNextHighestDepth());
drawer.lineStyle(1,0x999999,40);
drawer.lineTo(0,0);
drawer.lineTo(txtWidth,0);
drawer.lineTo(txtWidth,txtHeight);
drawer.lineTo(0,txtHeight);
drawer.lineTo(0,0);
drawer.createEmptyTextField
leStyle = new TextFormat();
leStyle.font = "Agency FB";
leStyle.bold = false;
leStyle.size = "12";
leStyle.color = "black";
drawer.createTextField("my_txt", 10, 0, 0, 100, 21);
drawer.my_txt.type="input";
drawer.my_txt.multiline = true;
drawer.my_txt.font = "my font";
drawer.my_txt.text = phpArrayTxt[i];
drawer.my_txt.wordWrap = true;
drawer.my_txt._width = txtWidth-10;
drawer.my_txt._height = txtHeight-10;
drawer.my_txt._x = drawer._x+5;
drawer.my_txt._y = drawer._y+5;
drawer.my_txt.embedFonts=true;
drawer.my_txt.antiAliasType = "advanced";
drawer.my_txt.setTextFormat(leStyle);
drawer._alpha=0;
drawer.focused=0;
drawer.myMc=mc;
drawer.onEnterFrame=function()
{
this._x=this.myMc._x+this.myMc._width+gallery._x+5;
this._y=this.myMc._y-1+gallery._y+2;
if(this.focused && this._alpha<100)
this._alpha+=5;
if(this.focused==false && this._alpha>0)
this._alpha-=5;
}
drawer.onRollOver=function(){this.focused=true;}
drawer.onRollOut=function(){this.focused=false;}
//text Frame </End>
if(i!=0)
{
old = gallery["jpgHolder"+(i-1)];
mc.myTarget = old.myTarget+old._height+gallery.picSpace2;
easeTo(mc,mc.myTarget,5);
}
else
gallery.jpgHolder0.myTarget=gallery.yStart;
gallery.readyLast=i;
t=mc.myTarget+mc._height;
if(t > gallery.totalHeight)
gallery.totalHeight=t;
}
}
function easeTo(mc,target,speed)
{
mc.onEnterFrame=function()
{
this._y+=(target-this._y)/speed;
if(this._y == target)
delete this.onEnterFrame;
}
}
function easeSide(mc,target,speed,i,picLoad,viewTrigger)
{
_root.gallery.viewing=true;
mc.onEnterFrame=function()
{
this._x+=(target-this._x)/speed;
if( (g=target-this._x) > -1 && g<1)
{
if(viewTrigger)
{
_root.gallery.viewing=false;
}
if(picLoad)
fetchPic(i);
delete this.onEnterFrame;
}
}
}
function swapPos(mc1,mc2)
{
if(mc1._y<mc2._y)
{j1=mc1; j2=mc2;}
else
{j2=mc1; j1=mc2;}
j2.myTarget=j1.myTarget;
j1.myTarget+=j2._height+gallery.picSpace2;
easeTo(mc1,mc1.myTarget,5);
easeTo(mc2,mc2.myTarget,5);
}
function swapUp(mc)
{
search=999;
for(i=0;i<gallery.stack.length;i++)
{
if(gallery.stack[i]==mc)
search=i;
}
if(search == 999 || search == 0)return;
swapPos(gallery.stack[search],gallery.stack[search-1]);
tmp=gallery.stack[search];
gallery.stack[search]=gallery.stack[search-1];
gallery.stack[search-1]=tmp;
}
function swapDown(mc)
{
search=999;
for(i=0;i<gallery.stack.length;i++)
{
if(gallery.stack[i]==mc)
search=i;
}
if(search == 999 || search == gallery.stack.length-1)return;
swapPos(gallery.stack[search],gallery.stack[search+1]);
tmp=gallery.stack[search];
gallery.stack[search]=gallery.stack[search+1];
gallery.stack[search+1]=tmp;
}
onEnterFrame=function()
{
min=0
max=gallery.totalHeight*(-1);
max+=Stage.height;
targetH=galleryHandle._y-50;
targetH/=Stage.height-100;
if(gallery.viewing!=true)
{
easeTo(gallery,targetH*max,10);
}
else
{
gallery._x=galGap+galleryDecor._x;
galleryHandle._x=galHanGap+galleryDecor._x;
}
/*if(_ymouse<200 && gallery._y<min)
{
gallery._y+=5;
}
else if(_ymouse>=200 && gallery._y>max)
{
gallery._y-=5;
}*/
}
galleryHandle.onPress=function()
{
gap=this._y-_ymouse;
this.onEnterFrame=function()
{
if(_ymouse+gap>50 && _ymouse+gap<Stage.height-30)
this._y=_ymouse+gap;
}
}
galleryHandle.onRelease=function()
{
delete this.onEnterFrame;
}
galleryHandle.onReleaseOutside=galleryHandle.onRelease;
Mouse Hover Caption
I am attempting to use the 'Hover Captions' tutorial:
http://www.kirupa.com/developer/mx20...r_captions.htm
Can anyone show me how to adapt the code to apply the captions to movie clips rather then buttons?
Also, is it possible to have different styles of captions running in the same flash file?
aly_ve
Hover Caption Style....
Ok, well this is a tricky one (at least it sounds it to me) but I was messing around with hover captions after doing a hover caption tutorial....and I need to know whether it is possible to get your caption to appear in another animation....
the point in this being e.g your menu on the left...instead of dropdown style a small blurb roughly describing the menu option appears on the other side of your site. complex demands but if ANYONE could so much as lend a wisened ear to this I would be very greatful
--jc--
p.s feel free to poke fun at this request, but give a guy some help
Two Hover Caption Problems
I have just tried the hover caption tutorial using my own image and caption. I have two problems:
1. The caption box is always visible when it should only be visible when the mouse is over the image of the horse.
2. The words in the caption box do not stay visible while the mouse is over the image; the words only appear for a second then disappear.
I have attached the .fla file.
Any help you can provide would be greatly appreciated by this relatively new Flash user. Thanks in advance!
Hover Caption Tutorial
Hello,
I have tried the hover caption tutorial for Flash MX and have not been very successful at it. I follow each step but when it comes to the last step to the On (rollOver) it produces the colored rectangle but not the text. So it is only half working. I am working on creating a new site for the library I work at and would appreciate any help or tips I can get. Thank you!
Anna
Hover Caption Is Sticky
hello,
I am using hover captions for my content boxes inside my site and for some reason Im having difficulties with rollOver and rollOut on a dragable button and its driving me nuts. basically whats happening is I have 3 buttons on each menu 1)Drag <which is causing a problem 2)maximize/minimize <which the caption is sticking on after drag has been clicked 3)close <which the caption is also sticking on drag after drag has been clicked
heres the AS that I have on the 3 buttons and the caption code is the standard kirupa caption code with a couple small tweaks
drag
Code:
on (rollOver) {
_root.pointer.gotoAndStop (3);
_root.x = 1;
_root.news.caption.words = "Drag Me!";
}
on (rollOut) {
_root.pointer.gotoAndStop (1);
_root.x = 0;
_root.news.caption.words = " ";
}
on (press) {
startDrag("_root.news");
_root.pointer.gotoAndStop (4);
_root.news._alpha = 50;
_root.x = 1;
_root.news.caption.words = "Drag Me!";
}
on (release) {
_root.pointer.gotoAndStop (3);
stopDrag();
_root.news._alpha = 100;
_root.x = 0;
_root.news.caption.words = " ";
}
maximize/minimize
Code:
on (rollOver) {
_root.pointer.gotoAndStop (2);
}
on (rollOut) {
_root.pointer.gotoAndStop (1);
}
on (press) {
_root.news.gotoAndStop ("min");
}
on (rollOver) {
_root.x = 1;
_root.news.caption.words = "Minimize";
}
on (rollOut) {
_root.x = 0;
_root.news.caption.words = " ";
}
close
Code:
on (rollOver) {
_root.pointer.gotoAndStop (2);
}
on (rollOut) {
_root.pointer.gotoAndStop (1);
}
on (press) {
_root.news.caption.gotoAndStop ("off");
_root.news.gotoAndStop ("closemax");
}
on (rollOver) {
_root.x = 1;
_root.news.caption.words = "Close";
}
on (rollOut) {
_root.x = 0;
_root.news.caption.words = " ";
}
so does someone feel like checkin it out for me? Ive been messing with it for a couple of days but really cant figure it out and because Im almost done with my site Ive been working on my client login script so this thing is just a big thorn in my side.
thanks ahead of time
Hover Caption Not Working
HI,
I was able to follow the instructions on how to create hover caption in Flash MX, I had no problem. However, when I try on my own Flash document I created (5 times) i cannot get it to work. I follow the steps one by one the same way I did when I did the tutorial but I cannot make it work. Any ideas why?
I am doing the same steps as in: Displaying Hover Captions (http://www.kirupa.com/developer/mx/captions.htm).
Thanks.
Jana
Hover Caption Question
Is it possible to have two different hover caption styles in the same movie?
I followed the tutorial and it works fine. But I want to have one style where the text aligns to the right of the mouse and another that aligns to the left of the mouse.
How do I work this in to the ActionScript?
Thanks.
Hover Caption Issues
I cannot download the .fla from the hovercaptions tut and started from scratch. I can get the box to follow the mouse and show up on rollover but cannot get the text to do its job. I need a solution or working .fla, or anything else. I named the "words" thing correctly and it still dose not work. Thanks in advance
Pictures In A Hover Caption... HELP
Hello
I just wanna know how to make pictures in a hover caption instead of text... i could be nice if anyone of you guys could send a explanation og a file i can use...
thank you
yoomoo
Hover Caption Question
I would like to drag 2 different hover captions in one movie.
Like this:
On stage action:
ActionScript Code:
startDrag(_root.caption1, true);
startDrag(_root.caption2, true);
action on mc's to drag:
ActionScript Code:
//caption1
onClipEvent (enterFrame) {
if (_root.caption1==1) {
this._alpha = 100;
} else {
this._alpha = 0;
}
}
ActionScript Code:
//caption2
onClipEvent (enterFrame) {
if (_root.caption2==1) {
this._alpha = 100;
} else {
this._alpha = 0;
}
}
Action on buttons:
ActionScript Code:
//button1
on (rollOver) {
_root.caption1 = 1;
}
on (rollOut) {
_root.caption1 = 0;
}
ActionScript Code:
//button2
on (rollOver) {
_root.caption2 = 1;
}
on (rollOut) {
_root.caption2 = 0;
}
But I'm not getting to drag both captions seperatly from eachother after eachother....
Now only one is dragable depending on wich one is written first on the "On stage code".
Anyone?
Code This Hover Caption/mc Menu?
Zeyko
Ive gone through the tutorial for basic hover captions with success, but this menu system is more complicated.
Can someone help me with understanding the AS necessary?
(or an example fla to pick apart?)
Thanks for any help! :-)
Hover Caption Text Problem
i followed the hover caption tutorial verbatum...i think.
the caption bubble works correctly, but no matter what i do i cant get the text in the caption bubble to appear. can someone help me and tell me what to do. i attached a file of the menu im using.
thanks in advance
aaron
Drag Problems With Hover Caption
when I drag off of the bottom button, my hover caption gets stuck to the place I dropped it and no longer hovers. It will reappear as a rollover but wont hover. Why?
However, if i toggle the ._visible. property of it, it starts working again. How can I disable dragging from a button object?
Question About The Hover Caption Tutorial.
Hello,
I'm wondering is it possible to show a few line of text in a Hover Caption? The tutorial only shows there one line, how can I set it so that it can show multiple line of text? Thanks.
Hover Caption Within Movie Canvas
I followed the hover caption tutorial but sometimes the hover caption goes out of the movie.
How to make it stay inside the movie and a certain distance of the mouse?
Hover Caption & Swapdepths Problem
Hi,
I have a problem with a caption. When i load a picture, the picture goes in front of the caption. I tried a swapdepths between the 2 mc's but it seems not to work. Here's my code :
You can also see the swf online here :http://www.adesign.tonsite.biz/xml_a...ml_galerie.swf
Code:
Function attach_btn() {
//Array of values from xml
tableaux();
_root.createEmptyMovieClip("thumb_mc", 1);
thumb_mc._x = 10;
thumb_mc._y = 10;
nb_ligne=3;
nb_colonne=3;
//attach tooltip 'thumb_mc'
thumb_mc.attachMovie("texte","tooltip_mc",999,{_visible:false});
//attach 'container_image'
_root.attachMovie("container_image","container_mc",10,{_y:10,_x:120});
container_mc.preloader._visible=false;
thumb_mc.tooltip_mc.onEnterFrame = function() {
if (_global.x == 1) {
this._x = Math.round(_root._xmouse);
this._y = Math.round(_root._ymouse);
this._visible = true;
} else {
this._visible = false;
}
};
//attach buttons
nb_images = images_xml.firstChild.childnodes.length;
for (i=0; i<nb_images; i++) {
thumb_mc.attachMovie("Btn", "Btn"+i, i, {_x:35*(i%nb_ligne), _y:35*Math.floor(i/nb_colonne)});
thumb_mc["Btn"+i].i=i;
thumb_mc["Btn"+i].j=tableau_url[i];
//Rollover on the buttons
thumb_mc["Btn"+i].onRollOver=function(){
this.gotoAndPlay("over");
_global.x=1;
thumb_mc.tooltip_mc.caption.text=tableau_texte[this.i];
//Format tooltip
thumb_mc.tooltip_mc.caption.background=true;
thumb_mc.tooltip_mc.caption.backgroundColor="0xFFFFFF";
thumb_mc.tooltip_mc.caption.autoSize=true;
thumb_mc.tooltip_mc.caption.border=true;
thumb_mc.tooltip_mc.caption.bordercolor="0xCCCCCC";
}
//Rollout on the buttons
thumb_mc["Btn"+i].onRollOut=function(){
this.gotoAndPlay("out");
_global.x=0;
}
//click on the buttons
thumb_mc["Btn"+i].onRelease=function(){
container_mc.container._alpha=0;
container_mc.container.loadmovie(this.j);
container_mc.onEnterFrame=function(){
this.container._visible=false;
//loading
charge=this.container.getBytesLoaded()
total=this.container.getBytesTotal()
rapport=Math.round((charge*100)/total);
if(charge==total){
this.preloader._visible=false;
this.preloader.barre._xscale=0;
//center picture
largeur=(this._width/2)-(this.container._width/2);
hauteur=(this._height/2)-(this.container._height/2);
this.container._x=largeur;
this.container._y=hauteur;
this.container._visible=true;
}else{
this.preloader.barre._xscale=rapport;
trace(this.preloader.barre._xscale);
this.container._visible=false;
this.preloader._visible=true;
}
//image fadein
this.container._alpha+=5;
if(this.container._alpha>=100){
this.container._alpha=100;
trace(this.container._alpha);
delete this.onEnterFrame;
}
};
}
//texte ˆ chaque bouton
thumb_mc["Btn"+i].texte=tableau_num[i];
}
}
Hope someone can help me. You'll see that i have also a problem with the pictures loaded. I place the pic ni the middle of the scene, but when i click the button, i can see the picture moving.
Thank's for your help.
Chris
Hover Caption Tutorial Question
Tutorial is great, but I have a question. In the tutorial, the Movie Clip's (that houses the text) instance name is 'caption.' I tried to duplicate the Movie Clip and call it 'caption2.' What's wrong? Can you not have two hover caption styles in the same file?
|