Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I want a scrolling banner with mouse over links

Status
Not open for further replies.

aspro

Programmer
Jan 22, 2003
69
AU
I want to make a fairly simple text banner with text links when the cursor is over the specific text section. I also want it to stop when the mouse moves over the banner. Can someone point me to a tutorial or just give me some ideas? Treat me as a beginner...I have never done banners before :)

Thanks,
aspro
 
okay I installed it but I have no idea how to use it. Sorry Flash is far from being my strong point.
 
ok first drag a copy from the components panel onto the stage

open up properties and set it to the size you want

click in ticker text then on the magnifying glass sort of thing and add your messages

set the rest of your properties and make sure all is well

control>test movie


once that is all working let me now exactly what you mean by 'text links'

is it a click to go elsewhere or a mouseover for more information or what?
 
Okay I got that working pretty well.
You know how it has values for the text...is there a way to make them appear together in one continuous line instead of one value per scroll?

By links i mean when u mouseover a value, it turns into a text link (ie. blue and underlined) then when u click it it goes to a url.....but I want each value to go to a different url.
Understand??

aspro
 
Looking forward to see this mod!

Regards,

cubalibre2.gif

Bacon, eggs and sunshine are still good for me!
 
yes the underline different color on mousover can be done as can the links but to do that i need the message broken up into sections as it is at the momemnt. each section to go to a different link

rollover will pause message, change color and underline, clicking it goes to a url when paused and underlined.

to do this the code of the component will have to be modified.

right click the component on stage and select edit
then right click in the frame and choose actions so that you have the component code available.

scroll down till you find this line

FTickerClass.prototype.checkPause = function() {

its around line 90

let me know when you are there

 
ok delete that whole prototype and replace with this

Code:
FTickerClass.prototype.checkPause = function() {
	if (this.tickertxt_mc.hitTest(_root._xmouse, _root._ymouse, false)) {
		this.pause = true;
		_root.myticker.setColor(0xFF0000);
		this.onRelease = function(){
		var x = _root.myticker.currentMessage; 
		switch (x) {
	case 0:
		getURL("[URL unfurl="true"]http://www.yahoo.com")[/URL]
		break;
	case 1:
		getURL("[URL unfurl="true"]http://www.google.com");[/URL]		break;
		}
}
	} else {
		this.pause = false;
		_root.myticker.setColor(0x000000);
	}
};

change the colors to suit (i have red and black) and add more case statements for each of your messages

almost there now so test that and let me know what happens...works fine for me...while i go back and work out how to underline the text

one final thing...go back to main timeline and from properties give your component an instance name of myticker
 
ok final piece

either just do another delete and replace or add the new sections dealing with the underline

Code:
FTickerClass.prototype.checkPause = function() {
	if (this.tickertxt_mc.hitTest(_root._xmouse, _root._ymouse, false)) {
		this.pause = true;
		_root.myticker.setColor(0xFF0000);
		this.tickerFormat = new TextFormat();
	with (this.tickerFormat) {
		underline = true;
	}
	this.tickertxt_mc.ticker.setTextFormat(this.tickerFormat);
		this.onRelease = function(){
			var x = _root.myticker.currentMessage; 
		switch (x) {
	case 0:
		getURL("[URL unfurl="true"]http://www.yahoo.com")[/URL]
		break;
	case 1:
		getURL("[URL unfurl="true"]http://www.google.com")[/URL]
		break;
		}
}
	} else {
		this.pause = false;
		_root.myticker.setColor(0x000000);
		this.tickerFormat = new TextFormat();
	with (this.tickerFormat) {
		underline = false;
	}
	this.tickertxt_mc.ticker.setTextFormat(this.tickerFormat);
	}
};

not the neatest hack of a component but it has been altered to add the functionality you wanted.
 
I am trying to add some extra code in for the other text values...
I have
case 2 :
getURL(" break;
Add it tells me there are errors so i cant add it... the out put is....
Clipboard Actions: Line 1: 'case' statements can only be used inside of a 'switch' statement
case 2 :

Have to go to uni but I will come back.
Thanks so much for you help so far.

aspro
 
Where do I create the instance name 'myticker'? I can't find it. I guess that is why my colours don't work.
Please help

aspro
 
on the main stage right click the component and select properties

the instance name goes in the box to the lft
 
I am also trying to set up a ticker component and can't find any instructions on how to do it. I followed what you have in here, but can't get any text to scroll. I am also trying to pull text from an external txt file. Any idea how I can do that?

Also, in the properties window, what does scrollhandler at the bottom mean? There is nothing next to it, and I'm wondering if I need to put something in there, I'm thinking that might be why my text isn't scrolling.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top