daily pastebin goal
49%
SHARE
TWEET

Untitled

a guest Jul 13th, 2018 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var Kvadrat= ParametriKvadrata();
  2. var Krug= ParametriKruga();
  3. var MasKrug=[];
  4. var MasKvadrat=[];
  5. var A:Boolean=true;
  6. //--------------------------------------------------------------
  7. function ParametriKruga()
  8. {
  9.     var KR=new krug();
  10.     KR.x=Math.random()*300;
  11.     KR.y=Math.random()*200;
  12.     addChild(KR);
  13.     KR.addEventListener(MouseEvent.CLICK,bbb)
  14.     return KR;
  15. }
  16. function bbb(e:MouseEvent)
  17. {
  18.     MasKrug.push(ParametriKruga());
  19. }
  20. //--------------------------------------------------------------
  21. function ParametriKvadrata()
  22. {
  23.     var Kvadrat= new kvadrat();
  24.     Kvadrat.x=200;
  25.     Kvadrat.y=200;
  26.     addChild(Kvadrat);
  27.     Kvadrat.addEventListener(MouseEvent.CLICK,ccc)
  28.     return Kvadrat;
  29. }
  30. function ccc(e:MouseEvent)
  31. {
  32.     MasKvadrat.push(ParametriKvadrata());
  33.     trace("ooo");
  34. }
  35.  
  36. addEventListener(Event.ENTER_FRAME,zona)
  37. function zona(e:Event)
  38. {
  39.    
  40.        
  41.     for(var i=0;i<50;i++)
  42.     {
  43.         for(var a=0;a<50;a++)
  44.         {
  45.         if(MasKrug[i].hitTestObject(MasKvadrat[a]))
  46.         {
  47.             trace("PPPPPP");
  48.         }
  49.         }
  50.     }
  51.    
  52. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top