divinedesigns1 Posted May 15, 2012 Share Posted May 15, 2012 hey sup, im trying to make an animation to keep on looping until a button is hit then it goes to another page but so far i got the animation working, the button working but it goes right to the other page page after the frames are finish, which i dont want, i would like it to keep looping until the i hit a button Link to comment Share on other sites More sharing options...
Ingolme Posted May 15, 2012 Share Posted May 15, 2012 On the last frame of the animation, just have a gotoAndPlay() call. The button would make a gotoandPlay() or gotoAndStop() call to a frame that's outside of that loop. Link to comment Share on other sites More sharing options...
divinedesigns1 Posted May 15, 2012 Author Share Posted May 15, 2012 ok thanks Link to comment Share on other sites More sharing options...
divinedesigns1 Posted May 15, 2012 Author Share Posted May 15, 2012 On the last frame of the animation, just have a gotoAndPlay() call. The button would make a gotoandPlay() or gotoAndStop() call to a frame that's outside of that loop.how can i define the speed of which its rotating? please give me a hint Link to comment Share on other sites More sharing options...
Ingolme Posted May 15, 2012 Share Posted May 15, 2012 Rotating? I'm not sure what you're doing. The speed of the animation depends on the framerate. I can't remember now, but I think the framerate option is right under the timeline marked as "FPS". It is set to 12 by default but you can increase it. Link to comment Share on other sites More sharing options...
divinedesigns1 Posted May 16, 2012 Author Share Posted May 16, 2012 so i cant write up a script to decrease the speed? because i have it at 4 but its still seem to be rotating a little too fast this is the demo im working on www.divinedesigns1.com/flash/office2.html Link to comment Share on other sites More sharing options...
divinedesigns1 Posted May 16, 2012 Author Share Posted May 16, 2012 Im having a little problem, with the page, its not stopping on the page it suppose to stop. the above link, shows you what im talking about if you click on one of the buttons, it would go to the page it suppose to go too but instead of stopping after the page is complete it goes onto the other page, even tho it have a stop function stopping it from going onto the next frame. can anyone advice me on how to fix this error? Link to comment Share on other sites More sharing options...
Ingolme Posted May 16, 2012 Share Posted May 16, 2012 Looking at your page, I think you need more rendered images and then you need to increase the framerate again. The framerate is terribly low for a fluid animation. It might be best to have a loading bar because the animation keeps waiting for the next frame to load. Using the getBytesLoaded and getBytesTotal, in conjuction with the stop(), gotoAndPlay() and gotoAndStop() methods you can make a loading bar on the first frame. Another problem seems to be that you keep jumping back to the animation when a mouseleave event is called. I can't see your code so you'll have to provide the code and which frame it's on. I don't know any ActionScript tutorials, but you should look for a few to solve these simple matters Link to comment Share on other sites More sharing options...
divinedesigns1 Posted May 16, 2012 Author Share Posted May 16, 2012 yea i was looking them up, but sigh the stupid people blocked a few of the websites i normally read and watch tutorials on, so i have to look for some other good sites to read on the tutorials and ill present the code later on, im about to get some rest and yea i know about those glitch, i been trying to fix them the whole day no success, but i think imma try looking for a javascript tutorial on how to make this instead of flash Link to comment Share on other sites More sharing options...
divinedesigns1 Posted May 17, 2012 Author Share Posted May 17, 2012 Looking at your page, I think you need more rendered images and then you need to increase the framerate again. The framerate is terribly low for a fluid animation. It might be best to have a loading bar because the animation keeps waiting for the next frame to load. Using the getBytesLoaded and getBytesTotal, in conjuction with the stop(), gotoAndPlay() and gotoAndStop() methods you can make a loading bar on the first frame. Another problem seems to be that you keep jumping back to the animation when a mouseleave event is called. I can't see your code so you'll have to provide the code and which frame it's on. I don't know any ActionScript tutorials, but you should look for a few to solve these simple mattersthis is the code im using for scene one frame oneimport flash.events.MouseEvent;mymovie.addEventListener(MouseEvent.ROLL_OVER, moviespin);function moviespin(event:MouseEvent):void{mymovie.stop();}mymovie.addEventListener(MouseEvent.ROLL_OUT, moviestop);function moviestop(event:MouseEvent):void{mymovie.play();} and this is the code im using inside of "mymovie" import flash.events.MouseEvent;cable_mc.cable_btn.addEventListener(MouseEvent.CLICK, cable_btn);function cable_btn(event:MouseEvent){gotoAndStop("32")}access_mc.access_btn.addEventListener(MouseEvent.CLICK, access_btn);function access_btn(event:MouseEvent){gotoAndStop("26")}cctv_mc.cctv_btn.addEventListener(MouseEvent.CLICK, cctv_btn);function cctv_btn(event:MouseEvent){gotoAndStop("37")}snom_mc.snom_btn.addEventListener(MouseEvent.CLICK, snom_btn);function snom_btn(event:MouseEvent){gotoAndStop("42")}office_mc.office_btn.addEventListener(MouseEvent.CLICK, office_btn);function office_btn(event:MouseEvent){gotoAndStop("21")}door_mc.door_btn.addEventListener(MouseEvent.CLICK, door_btn);function door_btn(event:MouseEvent){gotoAndStop("47");} and at frame 19 inside of "mymovie" i use the code gotoAndPlay("1"); and for each pages i added a stop(); Link to comment Share on other sites More sharing options...
Ingolme Posted May 17, 2012 Share Posted May 17, 2012 Can you explain the particular problem in detail? To solve the problem I noticed before, on each frame that's outside the animation you need to remove the event listeners.I can't remember if Flash uses removeEventListener in the same was as Javascript, but here is how it should be: mymovie.removeEventListener(MouseEvent.ROLL_OVER, moviespin);mymovie.removeEventListener(MouseEvent.ROLL_OUT, moviestop); When you click the "Back" button, add the event listeners again: mymovie.addEventListener(MouseEvent.ROLL_OVER, moviespin);mymovie.addEventListener(MouseEvent.ROLL_OUT, moviestop); Link to comment Share on other sites More sharing options...
divinedesigns1 Posted May 18, 2012 Author Share Posted May 18, 2012 Can you explain the particular problem in detail? To solve the problem I noticed before, on each frame that's outside the animation you need to remove the event listeners.I can't remember if Flash uses removeEventListener in the same was as Javascript, but here is how it should be: mymovie.removeEventListener(MouseEvent.ROLL_OVER, moviespin);mymovie.removeEventListener(MouseEvent.ROLL_OUT, moviestop); When you click the "Back" button, add the event listeners again: mymovie.addEventListener(MouseEvent.ROLL_OVER, moviespin);mymovie.addEventListener(MouseEvent.ROLL_OUT, moviestop); ok thanks foxy, ill try that and see how if it works Link to comment Share on other sites More sharing options...
divinedesigns1 Posted May 24, 2012 Author Share Posted May 24, 2012 i did that but it didnt work, umm do i have to have the button outside of the movieclip "mymovie" for it to work? Link to comment Share on other sites More sharing options...
Ingolme Posted May 24, 2012 Share Posted May 24, 2012 It shouldn't matter where the button is as long as you can properly reference the movieclip. It might be better if somebody who's more familiar with Flash tries to help you, I haven't worked with it in a long time.All your code should be in the main timeline. The button should have an event listener that calls a function. When that function is called, you remove the event listeners. Since the button is inside the movieclip, you can probably reference the movieclip from the function as "this.parent" (This may not be the exact syntax or keyword, I can't remember enough about Flash right now) Link to comment Share on other sites More sharing options...
divinedesigns1 Posted May 26, 2012 Author Share Posted May 26, 2012 It shouldn't matter where the button is as long as you can properly reference the movieclip. It might be better if somebody who's more familiar with Flash tries to help you, I haven't worked with it in a long time.All your code should be in the main timeline. The button should have an event listener that calls a function. When that function is called, you remove the event listeners. Since the button is inside the movieclip, you can probably reference the movieclip from the function as "this.parent" (This may not be the exact syntax or keyword, I can't remember enough about Flash right now)ok, ill try doing it over, since i have all the source at hand, thanks again foxy, and sorry about the late reply Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now