Help with a complex hover caption (i think) :)

I am working with the hover caption code from here.

I am trying to make a hover caption with a small amount of text appear when you first hover the button, then then upon clicking,… a larger amount of text appears in the hover caption, and when you click again,. it goes back to it’s original state.

just to make things a little easier,. here is the file that iam working from with an example and description (sort of). thank you -me

that was an interesting solution, i have tried similar things with my movie. I tried making the button reference the root level on rollover. I was able to get the box to appear, but not the text. hmmm
you solution however didnt work with my set up, so i went ahead and made the captiontest mirror the setup of my movie.
Now maybe the solution is to re-organize my whole movie,… (eeek!)
But maybe there is a better way i can make this happen with AS.

I know I have bothered you a lot with this, and i thank you tremendously for all of your help so far.

-me :tb:

should have posted the file!

-me :tb:

Not sure I understand. I worked with the file you gave me (#4) and got the text and box to appear on rollover. What is it you want exactly to happen? :h:

one thing i notice on this file,…
is when all of the movie clips that are active on the stage, get grouped into one movieclip, flash has a hard time telling it where to go, beyond one MC, and then to a button.
could that be the mistake?
since the code is telling it that it is looking for a button, and it is not finding any buttons. Becuse the directions if has been given dont include buttongs,… but MCs with a button at the end of the line…

i hope that makes sense.

hmmmm

wondering.

oh! i didnt see your reply! sorry…

well i tried you solution, and yes it worked on the captiontest4, but i dont know why it wouldnt work on my movie i am working on. So i came to a conclusion that i probably need to re-look at how that captiontest is set up, and make sure that it mirrors the movie i am working on. There were a few differences. so i tried to create those differences in captiontest5. and sure enough, it did not work.

it is like looking for your keys in a dark house.


i did how ever get this code here to make a box appear! but without the text, and with out resizing.

on (rollOver) {
_root.x = 1;
_root.tt1.words = “Keepers of the Eastern Door People of the Flint (Kanienkahagen)”;
}
on (rollOut) {
_root.x = 0;
_root.tt1.words = " ";
}

I am going to keep playing with it.
I feel like i have the organization of MC’s set up in such a way that it is causing a conflict. hmmm

i guess this is what it is all about. right? everybody has to go through this.

-me :tb:

Definitely everyone goes through this! :stuck_out_tongue:

But it doesn’t matter if you have a button within a movie clip within a movie clip within a movie clip . . . Flash doesn’t care what combo of items you have as long as you target it correctly through paths. If you tell someone you live in Brooklyn it’s gonna take them a long time to find you. If you tell someone you live on India St. in Brooklyn then that helps narrow it down but they’re still knocking on every door. If you tell someone that you live at 715 India St in Brooklyn then blammo they are in your living room in moments. So Flash needs to be told that you want to attach the hover caption to the button that is called “A” that is inside movie clip “B” that is inside movie clip “C”; hence C.B.A.hover(“this is my caption”)

Okay now you are introducing additional complexity by using tweens and having multiple frames. The easiest way to tell Flash what you want it to do is to apply the code to the object directly, instead of having an address on the main timeline. This is what I did in captiontest4 - I told Flash to run the function on rollover after the button was loaded.

Hope that makes sense.

:hr:

Oh yeah! that completely makes sense! thank you so much! Yes i get the targeting aspect to it completely. I thought i was doing something right with that. i could just feel it. Where i was feeling that i had gone wrong was indeed in the way i was using the frames. I did notice that it functioned differently using one frame vs. two or more. This leads me to ask why??

Well right now, i am going to go back to your captiontest4 and take a close look at that, and try to figure out why it isnt workin,… and also if i can rearrange my movie so that things dont have to be so burried. (this isnt the easiest first endeavor into Flash, i have bit off more than i can chew)
I guess it is all part of the process. :slight_smile: i will let you know what i come up with.

You know what i would love, or what i think anybody who is starting out in Flash would just love… A whole bunch of good analogys to the way Flash “thinks” or “communicates with it self.” I want to see how and where it is making these decisions, and why and how it communicates with itself. i am beginning to see more of these things. It is good to feel that return from learning. thank you for you help so far.

Oh, and i loved you analogy about directions. It is a perfect description! More importantly though, is the address that you gave. I interviewed for a job 2 doors down from that address yeaterday. I was questioning taking the job, for trivial reasons. But, there is a power to coincidence, at least in me, and you have made me think differently about taking the job. thank you for adding the small things to a conversation! they can have the biggest effects in the long run.

-me :tb:

That is so cool! You know I don’t really know much about Brooklyn, except that I have various family members that live/have lived there. I noticed you live in Brooklyn and the only street I could remember was India St where my cousin used to live. But I had no idea what the numbers were!

So are you gonna take the job? What kind of job is it? Hope it doesn’t turn out to be a crappy oen 'cause then you’ll hate me and never use Flash again@ :pa:

:stuck_out_tongue:

So are you gonna take the job? What kind of job is it? Hope it doesn’t turn out to be a crappy oen 'cause then you’ll hate me and never use Flash again@ :pa:

I might take the job, regardless if it turns out to be a crazy experience. (need $$$) It is a bronze casting foundry position. I would making molds and sculptures all day, so not so bad. just messy sweaty, long commute, hazardous to health and the boss is nuts. :slight_smile: It wouldnt be so bad, but it is not exactly what i want to be doing,… but having the littlest sign pointing in that direction, is hard to avoid. I am taking it moment to moment. i guess to more open i am to it, the more i will learn. (same with flash)

Going back to what you said earlier…

Okay now you are introducing additional complexity by using tweens and having multiple frames.

I am guessing that in order to get any better at Flash, i need to get from the point of using tweens and long streches of frames and layers to orchestrate my movie, to commanding those elements via AS.
(This is my next venture)

However,… i was thinking that your set up on captiontest4 wouldnt work for me… i dont know why. i had tested it out and wasnt getting results. But eventually i cleaned things up a bit and found it was easier to see.
YAY! it works!
thank you!
:tb:

i hope to talk soon!

-jeremy

Glad you got it to work, good luck with the job! :hr:

one more question for you…

in the main body of code, what is the part of it that tells the BOX to be opaque? and can that be adjusted to a different level of opacity?

thank you

-me

But of course! :slight_smile:

Open up the Actions panel. Click once on the movie clip “box” to select it. There is some actionscript on it that says:


onClipEvent (enterFrame) {
	if (_root.x==1) {
		this._alpha = 50;
	} else {
		this._alpha = 0;
	}
}

Change the 50 to whatever you want.

:hr:

Hey there Lunatic.

I was wondering if you had a second… I wanted to know how i can add one bit in the code to change the FONT and color of the text in the hover captions. I have been working with a number of bits that arent working,… and i think i might be placin them in the wrong spots.

-me :tb:

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 you are around… i would appreciate any bit of knowledge in this area.

thank you - me :tb:

there is no code in there that specifies which font to use. so i tried writting one. I just think it is interesting,… i can go in there,. and delete the line of code that determines the SIZE,… and the FONT(which i added) and there will be no change in the actual font of the hover caption. I am wondering if it is using some sort of Default font… however,… i go into preferences… and change the default font,… and STILL no change.

hmmmmmmmm
it is pulling this font from somewhere.

:tb:

Hi silence,

I’m in Rome at the moment, with sporadic internet access and no Flash :frowning: (trying to contain my withdrawal symptoms :stuck_out_tongue: ) so I can’t really try to puzzle this out at the moment. Interesting that you couldn’t get it to work though. Maybe its different for your setup? I’ll have a look at it when I return if you are still interested. I’ll be back around Thursday.

ciao!
lunatic

“font” and “size” are properties of the TextFormat object, not the Textfield…
Try this one:

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.text = refuge;
		box.caption.autoSize = "left";
		myFormat = new TextFormat();
		myFormat.size = 10;
		myFormat.font = "Tahoma";
		box.caption.setTextFormat(myFormat);
		box.test.resize();
	};
};

scotty(-:

:stuck_out_tongue_winking_eye:

:stuck_out_tongue:

:love:

@lunatic, have fun there=)
[size=1](and be carefull with those crazy pills in Italy;) )[/size]

scotty(-: