قد يعجبك
A simple function to resize proportionally.
how to use: AVProporcao(target, width, height)
aires = AVProporcao(mc, Stage.width, Stage.height); mc._width = aires.width; mc._height = aires.height;
see below the function that will be used to do this:
function AVProporcao(t,w,h){l=t._width;a=t._height;r=Math.max(l/w,a/h);nl=l/r;na=a/r;return {width:nl,height:na};}
----------------------------------------
After a long time without putting anything here, I bring a very simple way to duplicate columns.
let the variables needed for customization: n is the number of columns; q equals the number of items to be duplicated;
if you want to give spaces between them do the following, modify these lines, leaving them thus b._x=(b._width+10)*c;b._y=(b._height+10)*l;
Below is the code to duplicate columns How to use: add a movieclip to instantiate mc, and put this code in the frame that meets the mc
n=5;l=c=0;q=20;for(j=0;j<q;j++){b=mc.duplicateMovieClip("mc"+j,j);if(c==n){l++;c=0;}b._x=b._width*c;b._y=b._height*l;c++;}mc.unloadMovie();
this.createTextField("t",1,0,0,100,100); with(this.t){html=true;htmlText="<a href='asfunction:trace,@simplescript'>Click here!</a>";}
----------------------------------------
Cool News Readers for Your Website http://cg5zq.th8.us
Using the example:put on stage a movieclip with the instance of btn.
c=0;btn.onPress=function(){c++;if(c==1){setTimeout(function(){c=0;},250);trace("Single Click");}else if(c==2){c=0;trace("Double Click");}};
United States الاتجاهات
- 1. Mateer 4,996 posts
- 2. #UFC321 78.2K posts
- 3. $SWC 2,524 posts
- 4. Ole Miss 12.2K posts
- 5. Almeida 57.7K posts
- 6. Arbuckle 2,661 posts
- 7. Lane Kiffin 5,836 posts
- 8. Oklahoma 16.9K posts
- 9. Umar 25K posts
- 10. Volkov 50.3K posts
- 11. Brentford 38.5K posts
- 12. UCLA 7,981 posts
- 13. Hugh 13.7K posts
- 14. Kerkez 15K posts
- 15. Dern 51.3K posts
- 16. June Lockhart 1,490 posts
- 17. Arkansas 20.4K posts
- 18. Aaron Henry N/A
- 19. Memphis 14K posts
- 20. Jackson Arnold 1,075 posts
Something went wrong.
Something went wrong.