anarchy Posted May 19, 2010 Share Posted May 19, 2010 Hi I'm am told that if i convert a certain of code to GS then the performance issues will be alot better and wont lag so much but the problem is i have got a clue where to start. Could someone help please #include "mc_tween2.as" stop(); var mouse:Object = new Object(); mouse.onMouseMove = mouse.onEnterFrame=function () { fallow(); var Mypic:Number = 1; /*var Mypic 1 for see all Image*/ var S:Number = 5; var Xpos:Number = 990; var Ypos:Number = 650; var pos:Number = 0; var T:String = "easeoutexpo"; mc_Image.hitTest == true; mc_Image.setMask(mask); mc_Image.alphaTo(100, S, T); if (_xmouse>=pos && _xmouse<=Xpos && _ymouse>=pos && _ymouse<=Ypos) { mc_Image._x = mc_Image.tween("_x", (-_xmouse*(mc_Image._width-Xpos)/Xpos)*Mypic, S, T); mc_Image._y = mc_Image.tween("_y", (-_ymouse*(mc_Image._height-Ypos)/Ypos)*Mypic, S, T); updateAfterEvent; } }; Mouse.addListener(mouse); this.onEnterFrame = function() { bar.loader.xScaleTo(0, 2, T); bar.Tooltiploader.xScaleTo(0, 2, T); bar.Tooltiploader.xSlideTo(0, 2, T); bar.Tooltiploader.alphaTo(0, 2, T); bar.behind.alphaTo(0, 2, T); }; mc_Image.alphaTo(0, S, T); much appreciated for any help Luke Link to comment Share on other sites More sharing options...
GreenSock Posted May 19, 2010 Share Posted May 19, 2010 Have you read the "getting started" article? http://www.greensock.com/get-started-tweening/ That should get you up and running pretty quickly. But feel free to post questions here if things still aren't clear after reading the article and playing around with some of the interactive demos. Link to comment Share on other sites More sharing options...
anarchy Posted May 20, 2010 Author Share Posted May 20, 2010 i wasnt implying you do it for me ......... i'm new to AS2 and still very much at a foundation level cos i am designer so just was asking if someone could give me a bit of direction as to what i should be looking for (classes or something that i need to call) because this sample was obviosuly someone elses code. Link to comment Share on other sites More sharing options...
GreenSock Posted May 20, 2010 Share Posted May 20, 2010 I think you may have misunderstood my answer - I didn't think you were asking us to do everything for you. You asked for some direction and I thought that article was geared for exactly what you were asking. It walks you through all the basics, even "installing" the classes and getting up and running with your first tween. Did you read that article? Was it not helpful? How else would you like us to help specifically? 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