-
Some questions..
Hey all.
Im making a flash...thing at the moment, it asks as a sort of image gallery, but not. :-)
Anyway, I have a few problems, I've also attached my .fla file to help explain (had to upload to MegaUpload as its 3.7mb)
I'll explain what it is, if I can.
There are currently two buttons on the wall, shaped as stones, they turn red when hovered over just as a place holder (they are in the top row, top left and one a few more stones to the right)
When hovered over a picture fades in.
When fading in the picture in the top left, it overlaps the other button on the stage and the button actually appears on TOP of the image, which I don't want obviously.
Is there anyway to fix that?
Second question, how do I make the pictures fade away when the user moves the mouse off the button? (Using AS2.0 if programming is needed :-)
Hope i've explained well, thanks!
Link to .fla: http://www.megaupload.com/?d=2MR47LMG
-
heres some code and notes.
Actionscript Code:
stop();
//you need these import mx.transitions.Tween; import mx.transitions.easing.*;
button.onRelease = function () { fadein(); } function fadein() { //attaches the picture from your library to the stage, make sure you right click your picture, choose linkage and give //it a linkage id of picture attachMovie("picture","picture",_root.getNextHighestDepth()); picture._alpha = 0 picture._x = 100 // it an X position picture._y = 100 //give it a Y position myalpha = new Tween(picture, "_alpha", None.easeIn, 0, 100, 5, true); /*picture is your instance name, _alpha is its transparency, it will ease in, alpha will start at 0 and increase to 100 over 5 seconds the true tells it the 5 is realtime and not frames.*/ //do something after its done. myalpha.onMotionFinished = function() { //whatever you want here, you may want to make your button invisible with button._visible = false; //since you have problems with overlapping } }
also for your overlapping problem, you could try attaching them as movieclips at certain depths. like in the example above just write 999,997,996 or something like that to set the order of each.
hope this helps ya mate.
might be addicted to flash...
_______________________________________
-
Hey mate :-)
Thanks for the reply just about to try it out :-)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|