Aleks
asked on
flash fade photo in/out on mouseover
I have a photograph that i turned into an object, it has an action to go to a link when clicked on, but i also want to add an action that will make it made out say 60% when the user gets the mouse over, when the mouse is moved elsewhere it should go back to its 100%.
This is the code I have on the photo right now (for the link).
on (press) {
getURL("gallerynightshots. html");
}
What other code should I add to accomplish this ?
I am not too saavy in Flash, so step by step instructions are needd for this one.
Thanks in advance !
Thanks !
This is the code I have on the photo right now (for the link).
on (press) {
getURL("gallerynightshots.
}
What other code should I add to accomplish this ?
I am not too saavy in Flash, so step by step instructions are needd for this one.
Thanks in advance !
Thanks !
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Now in order to set the MovieClip up I would suggest have two layers named photograph, button. In the bottom layer (photograph) you should have your graphic and in the top layer (button) you should have an invisible button.
To create an invisible button, draw a rectangle over your graphic the same size, then with the rectangle selected only press F8 (windows). This will open the symbol prompt. Select button and give it a name 'mybtn' and click OK. Now with this new symbol created give it an instance name in the property panel, for this example I will be using mybtn_btn.
Again with mybtn_btn selected double click to edit in place. You should see a timeline with four frame. Within the timeline panel, click, hold and drag the keyframe to move it to the hit frame. Now return your main root timeline. Select your movieClip and give it an instance name in the property panel, again for this example 'mymc_mc'.
In your actions layer on the root timeline use the attached code.
I have also provided a very simple example please note you will need to rename the mybtnexample.txt to have the .fla extension.
This is a very basic fade for mouse over. A more advanced way is using the Tween class, but the actionscript for this is a little more complicated but well worth looking into if you have time and are keen to learn. If you need any further help let me know.
Hope this is of help.
Open in new window
mybuttonexample.txt