Flash help
- Started
- Last post
- 16 Responses
- snizl
I am working on buidling a flash site that looks like a bulletin/cork board. On the right hand side of the board there are a stack of papers pinned to the board. On the left hand side I have a piece of paper with the menu. I have it set up now that when you click on a menu item there is an MC on top of the stack of papers that goes to a certain frame to display a portfolio piece.
What I would like to do is that everytime a button is selected make it look like a piece of paper is falling off the board. I'm having trouble trying to figure out how to set it up so that the previous portfolio piece falls down revealing the new piece everytime. You can go here to check out what I have in progress: http://www.crdezign.com/blackdog…
Any help is appreciated. Thanks!
- lvl_130
i'm not understanding what you are trying to achieve. can you explain it some more?
- cvirus0
swapDepths() ?
- lvl_130
that was my thought...but it seems they want the effect of the paper falling?
i'm confused.
- snizl0
I am trying to achieve the effect that a piece of paper is falling off the board. If you click on the "Meritage Homes" button on the piece of paper to the left, you will see what I am after.
I am trying to set it up that when you click on a menu item to the left a piece of paper containing the previously selected portfolio piece falls off the board with the currently selected piece showing up behind it.
I have the transition currently controlled though AS. But can't figure out how to set it up so that the newly selected piece shows up behind the falling piece.
Make sense??
- lvl_130
sounds like you just need to use swapDepths() as stated before
or getNextHighestDepth()
or even getInstanceAtDepth()
- unfittoprint0
a
swapDepth(this._parent.getNextHi...
followed by a
easing moving/rotation function
- snizl0
Unfit: Would you be able to elaborate a little more please?
- TrueHell0
looks like you are loading jpgs into two MCs, the display and the transition. One option is to load the new jpg at the end of the transition clip and then set its alpha to 0. when the button is pressed that clips alpha goes to 100 and plays itself out, meanwhile you load the new image in the display clip under it at the same time. The old clip will remain in the transition clip until the end of the animation. Set up a preloader to make sure that the animation doesn't play until the image underneath is loaded. hope that gets you going
- dbloc0
are you loading dynamic or is it keyframe based?
- snizl0
Its not dynamic, everything is internal.
I was trying to figure out how to reposition the clip after it has moved out of the window and load in a copy of the newly selected item.
- unfittoprint0
clicking a word would initiate a function with the following:
#1 target the 'paper' mc [the movieclip would be in facy a parameter of the function]
#2 mc.swapDepth(mc._parent.getNextH...
would put the "paper" mc in front of everything else
#3 easing movin/rotating function with a target _y / target angle as parameters.
Instead of making your own, you could use some undocumented MM classes:
http://www.actionscript.org/tuto…good luck.
- snizl0
I am using this for the tweening: http://laco.wz.cz/tween/
Pretty slick.
- snizl0
Unfit: I understand where your going but still having a problem figuring things out. Would you be able to edit/update this code? http://pastebin.coconut.se/?id=4…
- snizl0
Please??
- davi-t0
fuck using AS to animate the paper. do this:
For each falling paper clip, animate it inside of its own MC along a motion path to give it a natural 'paper falling motion'. Repeat for other falling papers. add buttons.
Do a shot of tequila. smoke some ganja.
Then u need to use swap Depths like how the good ol' NT folks above tell u....fallingPaper_mc.attachMovie... name etc etc).
this.onPress=function() swapMeBitch();
- unfittoprint0
better
http://pastebin.coconut.se/?id=4…AS isn't bbetter?
imagine having to make inumerous 'falling' animations for each object: that's some pretty serious/tedious boring shit.