View Full Version : Stuck and frustrated! grr! !
--Architect--
February 23rd, 2007, 02:30 PM
Hi all, i posted this last night, but i think I deleted my thread on accident (still kinda new to the forum ) :lol: I've recieved an immense amount of help every time i've posted and this is by far the one stop place for all my flash needs . . with that said, my problem is this. . ( i hope one of you geniouses out there can help) i've created a menu in after effects that i exported as a .swf i imported it to flash where i would like to make it an interactive menu. . . the menu consists of 4 icons that rotate in a circle clockwise. . . i would like to make it so that when i hover over the right of the swf it moves clockwise, the more i move to the right the faster it goes. . if i move to the left it rotates counterclockwise and the farther left i go, the faster it goes. . . if i move towards the center, it slows down and i can click on the icons to bring in another .swf that pertains to that icon. . . any insight or direction as to how i can go about this would be of great help since i've burned my brain out trying to do it. . . :red:
i uploaded my fla. so anyone can see what i mean. Thanks to all whom take the time out to help. .. . . . I greatly truly appreciate it . . =)
www.architectproductions.com/projects/draft2.fla (http://www.architectproductions.com/projects/draft2.fla)
Tempest811
February 23rd, 2007, 02:40 PM
I don't think you can control the speed on an animation that was created in aftereffects with actionscript. I'm not entirely sure though..
--Architect--
February 23rd, 2007, 02:44 PM
I don't think you can control the speed on an animation that was created in aftereffects with actionscript. I'm not entirely sure though..
well, the movie was exported as an .SWF so when i imported it into flash its keyframe by keyframe animation. . . download the .fla if you have time. . thanks for the reply =)
Tempest811
February 23rd, 2007, 02:53 PM
oh gotcha.... I'm thinking you could use the setInterval function and have the time be a variable based on your _xmouse's relative position. I believe you would also need to put stop(); on every frame of your animation too
put this in your root timeline on a new layer:
var timeMS:Number;
this.onEnterFrame = function(){
timeMS = _root._xmouse //This is just a placeholder to give you an idea...this obviously isn't right
slideshowTimer = setInterval(beginSlideshow, timeMS);
function beginSlideshow(){
movie_mc.nextFrame();
}
}
--Architect--
February 23rd, 2007, 03:24 PM
oh gotcha.... I'm thinking you could use the setInterval function and have the time be a variable based on your _xmouse's relative position. I believe you would also need to put stop(); on every frame of your animation too
put this in your root timeline on a new layer:
ActionScript Code:
</p>
<p>var timeMS:Number;</p>
<p>this.onEnterFrame = function(){</p>
<p> timeMS = _root._xmouse //This is just a placeholder to give you an idea...this obviously isn't right</p>
<p> slideshowTimer = setInterval(beginSlideshow, timeMS);</p>
<p> function beginSlideshow(){</p>
<p> movie_mc.nextFrame();</p>
<p> }</p>
<p>}</p>
<p>
so would i need to create invisible buttons to control the action on the swf? why would i need to put a stop on each frame? thanks for all your help tempest! the action script you provided seems like it will help. . . i'll check it once i get home, im at work right now reading posts lol. . . .
Tempest811
February 23rd, 2007, 04:00 PM
yeah im at work too :p eating an apple turnover
you would not need to create invisible buttons because the speed (timeMS) is set relative to the position of your mouse....but you do need to have a stop at every frame because otherwise the animation would play through continually...you only want it to increment one frame at a time at the pace you set.
I hate to be the bringer of bad news but you're going about this the wrong way. The proper way would be to go to the gotoAndLearn.com site and follow his tutorial on rotating carousels. Good luck :p
--Architect--
February 23rd, 2007, 04:14 PM
yeah im at work too :p eating an apple turnover
you would not need to create invisible buttons because the speed (timeMS) is set relative to the position of your mouse....but you do need to have a stop at every frame because otherwise the animation would play through continually...you only want it to increment one frame at a time at the pace you set.
I hate to be the bringer of bad news but you're going about this the wrong way. The proper way would be to go to the gotoAndLearn.com site and follow his tutorial on rotating carousels. Good luck :p
holy crap! where has this site been all this time?! i've done many many MANY tutorials from flashkit to other sites, but this site seems soooo informative! I just suscribed to lynda.com for flash and after effects learning but this site seems freakin' awesome! thanks for the link! ! have a beer on me! :beer:
Tempest811
February 23rd, 2007, 04:17 PM
you're very welcome. he also utilizes some fantastic extensions that you should look into on the side, too...such as the laco prototypes http://laco.wz.cz/tween/?page=download
--Architect--
February 23rd, 2007, 04:24 PM
you're very welcome. he also utilizes some fantastic extensions that you should look into on the side, too...such as the laco prototypes http://laco.wz.cz/tween/?page=download
wow! are these all plug-ins of some sort taht further enhance flash?!!?!?
Tempest811
February 23rd, 2007, 04:31 PM
exactly...all you have to do is include it at the beginning of your file and doing an easing alpha transition is as easy as
my_mc.alphaTo(0);
an elastic motion tween is as easy as
my_mc.slideTo(100,100,1,"easeOutElastic");
They're all clearly explained on that site on the left. Enjoy :)
--Architect--
February 23rd, 2007, 04:40 PM
exactly...all you have to do is include it at the beginning of your file and doing an easing alpha transition is as easy as ActionScript Code:
my_mc.alphaTo(0);
an elastic motion tween is as easy as ActionScript Code:
my_mc.slideTo(100,100,1,"easeOutElastic");
They're all clearly explained on that site on the left. Enjoy :)
WOW! i am super behind on the whole flash world. . . . . . The last time i was actively using flash was when flash 5 came out. . . . i'm barely getting into it again and I see i have a lot of catching up to do! thanks for all your insight i greatly appreciate it!
j
Tempest811
February 23rd, 2007, 04:52 PM
No problem bud
I figured you needed some cheering up since you seemed so frustrated :)
Flash 8 is muchhhhh better.
--Architect--
February 23rd, 2007, 07:26 PM
No problem bud
I figured you needed some cheering up since you seemed so frustrated :)
Flash 8 is muchhhhh better.
hey temp! i just got home and was looking the code over. . . i dont get the "this is just a place holder " line. . . I have to include the name of my movie in here along with the xmouse position?
Tempest811
February 23rd, 2007, 07:30 PM
No it means that the "_root._xmouse" is just to show u that the movieclip does interact with the mouse position...if you test the movie you will see that it speeds up if your mouse moves left and slows down if it moves right...but that's not what u wanted.
Don't use it anyways tho - do the 3d carousel from that tutorial site I showed u.
--Architect--
February 23rd, 2007, 07:38 PM
No it means that the "_root._xmouse" is just to show u that the movieclip does interact with the mouse position...if you test the movie you will see that it speeds up if your mouse moves left and slows down if it moves right...but that's not what u wanted.
Don't use it anyways tho - do the 3d carousel from that tutorial site I showed u.
oh i am gonna do the tutorial, i just wanted to see how that code would work and interact. . . curiosity =) . . . . i placed the code on its own layer in scene1 (Not within the movie clip) and put a stop at each keyframe within the movie. . . and it didn't work. . . . =/ im starting the tutorial now. . .
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.