Shadowing Posted May 7, 2012 Share Posted May 7, 2012 (edited) Hey guys im having a problem while moving a object accross the screen and trying to make it hide() while its still moving. if you look at my page below it will get you a some what idea of what im doing.the problem is im wanting to blow something up while its moving and im having problems doing this. one problem is while using jquery animation i cant tell a element what to do until the animation is done with that element. another thing i hate how jquery animation slows down right before stoping. Im assuming thats jquery doing that? because im trying to blow up a fast moving ship i cant have it be slowing down to a stop then blow up. My home page isnt showing the faster ships im working on atm but will still give you an idea what im doing. would really appreciate some help im at a halt now. http://www.stargatesystemlords.com $('.'+tag)[effect](0,function(){ $(this).animate({'margin-left': '+='+left ,'margin-top': '+='+top , 'width': '+='+width ,'height': '+='+height}, +speed); }); Edited May 7, 2012 by Shadowing Link to comment Share on other sites More sharing options...
dsonesuk Posted May 7, 2012 Share Posted May 7, 2012 for the speed to be constant, not speed up and slow at end you would use "linear" after duration $('.'+tag)[effect](0,function(){ $(this).animate({'margin-left': '+='+left ,'margin-top': '+='+top , 'width': '+='+width ,'height': '+='+height}, +speed, 'linear'); }); Link to comment Share on other sites More sharing options...
Shadowing Posted May 7, 2012 Author Share Posted May 7, 2012 (edited) dsonesuk thats amazing thanks alot. I didnt even know that parameter existed loland now i see there is even a plugin for that to extend it even more. course i think i only really have use for is linear and swing Edited May 7, 2012 by Shadowing Link to comment Share on other sites More sharing options...
dsonesuk Posted May 7, 2012 Share Posted May 7, 2012 Heres something i put together many months ago when i had a quite period, using Truespace http://s1047.photobucket.com/albums/b472/dsonesuk/?action=view¤t=stargate.mp4 Link to comment Share on other sites More sharing options...
Shadowing Posted May 7, 2012 Author Share Posted May 7, 2012 Hey thats pretty kewl. what did you use to do that with? should book mark my site and keep checking back. signing up for beta will be possible later this week in theory... trying to make the hyperspace window look better atm Link to comment Share on other sites More sharing options...
dsonesuk Posted May 7, 2012 Share Posted May 7, 2012 Truespace its a 3d modelling program which was bought up by microsoft, but you can download it for free. When you finished creating the model, you can record and move parts of the model to create animation, then save as a movie format. 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