Todays picture

0 favourites
  • 4 posts
From the Asset Store
An educational game for counting pictures. An easy to use template for developers to build larger games
  • Hi ...

    How can I make a url call too pick and image from server depending

    of the DATE .. lest says haveing 12 folders on server..

    and images 01-31

    Regards

    Flemming

  • you can use rex_date plugin to get Day&Month

    (or you can use Browser object and ExecJs..)

    so...if you have folder1,folder2...folder5...etc

    and pic1.png,pic2.png..pic12.png..etc

    you need to set url to something like this

    "http://example.com/folder"&Date.Month&"/pic"&Date.Date&".png"[/code:2idijphs] [i]probably...[/i]
    [b]Edit:[/b]
    If you use for folder or picture 01,02,..09 format ...you need to use  [i]zeropad(number,2)[/i]
    [img="http://lookpic.com/O/i2/1701/4Wnc5YIj.png"]
    [i]I use XAMPP server in example so url start with "http://localhost/"[/i]
    so..URL
    [code:2idijphs]"http://localhost/folder04/pic12.png"[/code:2idijphs]
    becomes
    [code:2idijphs]"http://localhost/folder"&varMonth&"/pic"&varDay&".png"[/code:2idijphs]
    
    maybe would be best if you share link of today dummy pic..for testing...
  • Hi THANKS for reply

    Ive made a try with this but didnt seams to work ..

    Then I just put in a Btn to load the image from a full url..

    that dont work either

    I see the image in core browser url ..

    Then I read this..

    Has something changed

    I use R226

    Cheers

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • did you export&upload your game on server?

    Capx would help troubleshoot. Image path correct? In quotes? Same domain?

    works for me in r227..

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)