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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

rollover and onclick help 2

Status
Not open for further replies.

jalbertson

Technical User
Feb 8, 2007
32
0
0
US
I am trying to modify someone else's code, and can not seem to find out where to do this at. Their images you click on it and it will get larger, and then you click on it again and it will get smaller. I want to rollover and it get larger, then onclick to go to a website. The file is for a spinning wheel image gallery. You can download the file at:


Thanks in advance,
Justin
 
I guess I do not understand what to write there to make it do what I am wanting it to do.
 
Well, you can try this... But I guess that's not really what you're looking for...

Code:
on (rollOver) {
	if (out) {
		//_parent.pressv=-2;
		//out=false;
	} else {
		_parent.pressv=2;
		out=true;
	}
}

on(release){
	getURL("[URL unfurl="true"]http://www.google.com/");[/URL]
}

Since there's only one button, the link (google) will be the same on all graphics...

Regards. FLASH HELP - OPENED FOR BUSINESS!
TO GET YOUR OWN FREE WEBSITE HOSTING
 
I think I can make eash image a button and then make each one of them have their own URL, but when I put your code in I can not make them shrink back down to normal size.
 
Thanks just the same. You gave me a place to start any ways. Thanks again. Let me know if you have any other ideas.
 
Thanks OldNewbie, but I am running mx2004. I think those are newer versions of flash or something because I can not open them.
 
Alrighty I have it so I can getUrl on each individual image. Now I just need to find out how to get this so I rollOver and it gets big then rollOut and it gets small again. Any ideas?

Code:
on (rollOver) {
    if (out) {
       _parent.pressv=-2;
        out=false;
    } else {
        _parent.pressv=2;
        out=false;
    }
}
 
Convert your image to a movieclip and try this to reduce it to 20% its original size:
[yourmovieclipName].xscale = 20;
[yourmovieclipName].yscale = 20;
 
CORRECTION: I omitted the underscore above
[yourmovieclipName]._xscale = 20;
 
Alrighty thanks that worked. It all works, the only thing I need now is that when you go to put in on a web site or you preview it, it will not automatically start. You have to rollOver it for some odd reason.

Thanks,
Justin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top