A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Advanced Rollover Effect

  1. #1
    Junior Member
    Join Date
    May 2003
    Posts
    29

    Advanced Rollover Effect

    Hello. I was wondering how to make a rollover effect, where when you hover over the text, the text darkens and a picture above it changes as well.

    Ex.
    [ PICTURE ] <-- picture changes

    Link
    Link <-- 1st hover over this
    Link
    (if you hover over any of the links, the picture will change to a new picture)

    If that makes any sence. Thanks!

  2. #2
    Senior Member
    Join Date
    Aug 2001
    Location
    Philippines
    Posts
    515
    for pix:
    1) have a separate movieclip for you pictures;
    2) put a picture in each frame
    3) add a stop on each frame
    4) label each frame, too with the name of the picture

    for buttons
    1) put all the "links" or buttons whereever you wish them to be
    2) name the buttons in the instance name
    3) add code on the main stage for each button

    Code:
    buttonName1.onRollOver = function
    {
    	//1) change the picture
    	_parent.picturesMovieClip.gotoAndPlay("NameOfPicture1");
    	
    	//2) darken my text
    	onEnterFrame = function()
    	{
    		black = new Color(movieClipWithTextInside);
    		black.setRGB(0x000000);
    	}
    }
    of course, i haven't tested this but i don't see why it shouldnt work. don't use the exact same code, tweak it a bit coz i just typed that quickly so you know how it more or less works

    but, when i code i always have something wrong w/ it and it takes a bunch of trace methods to find out what is wrong. goodluck
    Ramon Miguel M. Tayag

  3. #3
    Junior Member
    Join Date
    May 2004
    Location
    Hollywood, Ca
    Posts
    1
    Hello,

    Would I use the same techique for something like

    this

    or

    this

    Thanks for your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center