Hy guys!
Some time now I’m working on my own portfolio. With a certain feature I stumbled upon loads of problems. That’s why I put them in one thread.
For the record: I use AS3 and Flash CS3
Let me first explain the situation (you can download the .fla file, see further in this post). On the stage there are 3 cards, cardA, cardB and cardC. They each exist of a movieClip, (instance cardA is movieclip CardA, etc) in which a bunch of tweens is made (these tweens are different for every card). These CardA, CardB and CardC movieclips each exist from the same movieclip CardInstance, that exist from a movieClip called Card.psd (a .psd file, i may want to swap with another one, just for the looks etc.).
Lets look at the cardA, cardB and cardC. When you hover over them, they enlarge a little bit, like 150 percent. When you click on a card, it enlarges to about 700 percent. When you click on cardA, cardB and cardC should be hidden. All these enlargements etc. are done with de tweens I talked about.
Now the problems. (it can be handy to download the .fla file, to read and look what I write ;))
-
When a card is still in the "overEnlarge"phase (mouseOver, enlarge about 150 percent), and you click on it, it doesn’t enlarge the whole 700 percent, but only the 150 percent. When clicking on the card again, it shrinks back to it’s origional size.
-
When a card enlarges when clicked on (so to 700 percent), the other cards should be hidden. So when enlarge cardC, cardA and cardB should be hidden. With 3 cards, there are 3 specific rules (enlarge A, hide B and C; enlarge B, hide A and C; enlarge C, hide A and B). Now I want to make this more modular. I made an array of the 3 cards, and I want to say when a card is enlarged “rest of the array, gotoAndPlay(11)” (in frame 11 begins the tween of hiding). I have no clue how to do this. I tried something, but it didn’t really work.
-
Another 'hiding’problem. When I use the temporary solution for the array-problem (see 2), that’s in actions line 45, the other cards still react on the eventlisteners. So when you hover over them (while you don’t see them) they pop up and stil enlarge. Because the functions are all modular, i can’t say someting like removeEventlisteners. Maybe this becomes easier when having an array (see problem 2).
-
This fourth problem isn’t really AS3, but more Flash CS3. The cards i imported from photoshop, have very rough edges. Is there a way to make these smooth?
I hope someone can help me with these problems. Offcourse, if you have other suggestions regarding my flash/as3 file, you’re always welcome!
Thanks!
Marcel
PS: the file: http://www.2shared.com/file/4449698/172affa1/portfolio.html