• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How do I get an additional text on rollover?

New Here ,
Apr 18, 2012 Apr 18, 2012

Copy link to clipboard

Copied

Hi guys,

So I'm looking to get an extra text to show when hovering over a thumbnail.

Situation: I have a thumbnail linking to a page (frame in timeline) with a YouTube video on it. So I want the title of the video to show up under the thumbnail upon rollover.

What I use: Flash CS5 & Actionscript 3

Anyone know how to get this done?

TOPICS
ActionScript

Views

2.8K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Apr 19, 2012 Apr 19, 2012

What the trace does is tells you that the mouseover occured. I have no idea why they add that, but you can remove it all.  In place of it you could put the code to assign the text to the textfield...   yourtextfield.text = "whatever text you want to show";

Votes

Translate

Translate
LEGEND ,
Apr 18, 2012 Apr 18, 2012

Copy link to clipboard

Copied

Assign a ROLL_OVER MouseEvent listener and have its event handler function display text in wahetver textfield you intend to use for it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 19, 2012 Apr 19, 2012

Copy link to clipboard

Copied

Allright so I went back into my handy code snippets panel and added a mouse over event and in my actions frame window it says to start my own custom code.

Is this what you mean and if so what would be the code for me to insert?

Also, after where my code goes it says: trace("Moused over"); ... What does this do and should I replace "Moused over" with the instance name of my tekst box?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 19, 2012 Apr 19, 2012

Copy link to clipboard

Copied

What the trace does is tells you that the mouseover occured. I have no idea why they add that, but you can remove it all.  In place of it you could put the code to assign the text to the textfield...   yourtextfield.text = "whatever text you want to show";

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 19, 2012 Apr 19, 2012

Copy link to clipboard

Copied

You seem to desire a simple GUI method of doing this. Unfortunately that's not the case.

You need to associate and extract the information from the object you roll over in order to replace it.

In other words, when you see a Green Saleen Mustang, your eyeballs extract "Green" by looking at it. But that's only because the owner painted it like that.

You need to find a way to associate the infromation with the object that it belongs to. So you need to associate the information with the image/video that is rolled over.

This doesn't tell you how to do it but do you understand so far?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 19, 2012 Apr 19, 2012

Copy link to clipboard

Copied

Yeah I get it, I build the site, I tell it what to do. If I want something to effect something else I have 2 link the 2 of them through code.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 19, 2012 Apr 19, 2012

Copy link to clipboard

Copied

Thanks, I'm allmost there only the title I put in is not showing up on rollover and I'm getting the error: URL not found..

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 19, 2012 Apr 19, 2012

Copy link to clipboard

Copied

Errors will often stop any processing from working properly.  Since the rollover shouldn't have anything to do with a URL, you'll have to figure out why some file is not being loaded or whatever you are trying to do that involves an external file.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 20, 2012 Apr 20, 2012

Copy link to clipboard

Copied

Oke, well my computer doesn't have an internet connection so I have been contantly getting URL error messages. But they didn't stop any code from working and I'm still getting them in addition to the new error code I'm getting since the new rollover text function.

So that would mean that this specific URL error code is being caused by the new code. What do you think?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 20, 2012 Apr 20, 2012

Copy link to clipboard

Copied

It is highly unlikely that the rollover is causing a URL error if the rollover is only trying to write to a textfield.  URL errors normally involve mis-targeting a file.  If you show the code you used for the rollover it will be easier to tell if it could be related..

If you don't have an internet connection and the functionality of your file depends on it, you should comment out the code that causes those errors so that you do not have them interfering with things working.  URL errors will stop a file from working.  Also, URL errors usually erupt from loading files, which does not necessitate having an internet connection, just a correct path targeting the files.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 23, 2012 Apr 23, 2012

Copy link to clipboard

Copied

Can we start again.. My site is now online, I couldn't wait any longer because I need it for my buisness so I got rid of the code that wasn't working.

But I still need a rollover text to appear so..

1) I go into the code snippets and add a mouse over event

2) In my actionscript I add your text: yourtextfield.text = "whatever text you want to show";

So do I make an empty text field first, give it a name and replace "yourtextfield" with the name?

Or do I replace "whatever text you want to show" with my text and thats just it?

Or both?

Or am I way off?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 23, 2012 Apr 23, 2012

Copy link to clipboard

Copied

Try all of the things you just asked about and you might end up with what you want.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 23, 2012 Apr 23, 2012

Copy link to clipboard

Copied

LATEST

Yep, both of them! And it only works with tlf text not classic.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines