Flash question
- Started
- Last post
- 13 Responses
- Dyea
I pretty much suck at flash and i am creating a small side column animation that goes through some steps and stops. At this point i would like to have it play in reverse on mouse out. Its working but it plays the frames instantly, not at my 30 fps frame rate!
Im sure this is some fundamental(read stupid) mistake on my part. Code is below, if anyone could help me out i'd be grateful.on (rollOut) {
curfram = _root.redclip._currentFrame;
while (curfram>380) {prevFrame();
curfram = _root.redclip._currentFrame;
}}
tx,
DyeA
- Dyea0
I dont have to do something gay like use setInterval to create a timer in between cycles do i?
DyeA
- welded0
No, but you might have to do something else gay, like sucking a few dicks.
Hope that helps.
- Dyea0
hehe, expert advice i take it.
think i'll leave that to you...
DyeA
- ScottTheRobot0
Perhaps you should look into:
this.onEnterFrame = function() {
}Stuff inside plays at the frame rate of the movie.
- cram0
a while loop won't show the iterations, in other words, it only shows the end result. use onEnterFrame()
- comicGeek0
Use this function:
function myrewind(){
this.onEnterFrame = function(){
_root.redclip.gotoAndStop(_root...}
}Then at the frame where you want to stop:
mystopframe = 2;
if(_root.redclip._currentFrame-1 == 2){
_root.redclip.gotoAndStop(mystop...
this.onEnterFrame = undefined;
}
- lvl_130
I dont have to do something gay like use setInterval to create a timer in between cycles do i?
DyeA
Dyea
(Aug 6 05, 17:01)do people still use terms like 'gay' as a synonym to describe something they find annoying?!
please get the fuck out of middle school.
sorry, that stuff just bugs the hell out of me.
- Dyea0
Scott, cram, and comicGeek thanks for your help!
ComicGeek I moved the mystopframe section up into the myrewind function so it is checked on every iteration and used the code like this
function myrewind() {
this.onEnterFrame = function() {
trace(_root.redclip._currentFram...
_root.redclip.gotoAndStop(_root...
mystopframe = 380;
if (_root.redclip._currentFrame-1 == 380) {
_root.redclip.gotoAndStop(mystop...
this.onEnterFrame = undefined;
}
};
}Then, since this rewinds on a rollOut if they moused back over while it was rewinding I killed the onEnterFrame with an undefined and inserted a play() so it starts rolling forward again.
O and lvl_13, sorry if you were offended i guess i could drop that from my vocabulary, but to keep it in perspective the people who use gay in its original format, i.e. to mean "cheery: bright and pleasant; promoting a feeling of cheer;" would like you to get out of the fucking bathhouse and stop using gay to refer to hot man on man action. lol jk now
DyeA
- ********0
how the fuck is a poor designer supposed to cope with this actionscript shit--it's ridiculous
- Dyea0
lol ... drugs? lots?
- comicGeek0
Recommended book for AS starters:
Visual Quick Pro:
Macromedia Flash MX 2004 Adanved for Windows and Macintosh by Russel Chun
- fate_0
Rand, actionscript has got to be one of the easiest languages out there, just a notch above HTML.
- jevad0
fate if you're not comfortable with jscript you're never really gonna get AS...it's theory is nothing like html