brair_user's Forum Posts

  • when i finish my project i show you:) then you maybe can help me. But Thanks for replay

  • Hi, what plugin give me option "collision pixel"? i dont need polygon sprite collision..

    example

    pixels "sprite A" collision pixels"sprite B" set value on "1"

  • Hello, How can I run an online game on my site? When I put game on my site and not connect to the server sierra dont add new player?

  • ok Tanks:) so i can put my code there?

    This code?:

    <script>
    // Collection animation
    $('#target').click(function () {
        moveChatWindow('righttop');
    });
    
    var chatWindow = $('#trophy');
    var chatWidth = chatWindow.width();
    var chatHeight = chatWindow.height();
    
    var windowWidth = $(window).width();
    var windowHeight = $(window).height();
    
    $(window).resize(function () {
        windowWidth = $(window).width();
        windowHeight = $(window).height();
       
        moveChatWindow(chatWindow.data('currentPosition'));
    });
    
    function moveChatWindow(moveTo) {
       
        chatWindow.data('currentPosition', moveTo);
         if (moveTo === 'righttop') {
            chatWindow.stop().animate({
                 bottom: windowHeight - chatHeight
               , right: 0
            }, 2500);
             $('#trophy').css('opacity', '1');
             $('#trophy').fadeOut(300);
             $('#trophy').css('margin-right', '0');
            $('#trophy').css('margin-bottom', '0');
        }}
    </script>[/code:s8m2h35t]
    and this run my javascript out iframe ?
  • Please help me

  • How i can call JS in construct and run this function out iframe?

    i have code:

    <body>
    
    <div id="trophy"><img class="img-responsive" src="media/image.png"></div>
    <input id="target" type="button" />
    
    <iframe style="border:0px;border-radius:10px" width="100%" height="100%" src="game/index.html">
      <p>MY GAME CANVAS HERE</p>
    </iframe>
    
    <script>
    // Collection animation
    $('#target').click(function () {
        moveChatWindow('righttop');
    });
    
    var chatWindow = $('#trophy');
    var chatWidth = chatWindow.width();
    var chatHeight = chatWindow.height();
    
    var windowWidth = $(window).width();
    var windowHeight = $(window).height();
    
    $(window).resize(function () {
        windowWidth = $(window).width();
        windowHeight = $(window).height();
       
        moveChatWindow(chatWindow.data('currentPosition'));
    });
    
    function moveChatWindow(moveTo) {
       
        chatWindow.data('currentPosition', moveTo);
         if (moveTo === 'righttop') {
            chatWindow.stop().animate({
                 bottom: windowHeight - chatHeight
               , right: 0
            }, 2500);
             $('#trophy').css('opacity', '1');
             $('#trophy').fadeOut(300);
             $('#trophy').css('margin-right', '0');
            $('#trophy').css('margin-bottom', '0');
        }}
    </script>
    </body>
    [/code:2lyg8tlx]
    
    now i can run this js function frome script when i click on buttom. How i can run this function from event in construct iframe?
    
    If somone help me i can reward:)
    sorry for my english lang...
  • ok, but i upload this example on my page, i have signalling error and i can't move:( what is wrong?

  • Hello, where i can find simple multiplayer online example? and how i can create rooms for game in my project?

  • screen example in capx http://imgur.com/a/UHBLt

  • if layout have size 500x500

    example

    every 1 sec ---> create object X or familly (in familly c2 take random object from familly)

    (

    x: round(random(0,500))

    y: round(random(0,500))

    )

  • How i can getelementbyid from div ?

    my html:

    <body>

    <div id="name">my player name

    </div>

    <div id="c2canvasdiv">

    <canvas id="c2canvas" width="1000" height="500">

    </canvas>

    </div>

    </body>

    now i must use CAllJS or something plugin to get player name from div ID. What i must write in execute?

    i add to construct this JS to calljs:

    "var "&name_player&" = document.getElementById('name');"

    next

    i set text --> name_player

    but this dosent work;/

    how i can put player name from website to construct? im not developer please help me friends

  • thanks!

  • someon can helped?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • nice!!!