Doubts about/problem with the share object.

0 favourites
  • 3 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • Hi guys,

    I'm working on project in wich when being run on mobile, the user is allowed to share the screenshot of the layout. I've seen the tutotial and the example that the construct team provides but when I tried myselft, it doesn't seen to work very well.

    The problem is that, when the user clicks on the share button, the message that is supposed to go with the screenshot comes first without the screenshot. If the user clicks again, THEN the image togheter with the text appears.

    How do I make it so that the image appears first?

    Currently, my code is like this:

    System > Take Snapshot

    System > wait for previous actions

    Ajax > defines answer Binary Data

    Ajax > request Canvassnapshot

    Share > Add file "screenshot.png" from BinaryData

    Share > Share text "My cool screenshot"

    I tried simply removing the share text action and it doesn't even bring the image from the screenshot when I tested it on my phone.

    Any ideas how to make this work properly? Or a better explanation of how the sharing works?

    Oh, and I set a sub-event on the start of the layout, stating that the sharing file is true.

    Thanks in advance.

    Tagged:

  • I just faced the exact same problem myself... and figured out how to fix it.

    So the AJAX request needs time to process it (before you could use 'Share' actions).. Simply use a tag on that AJAX request for CanvasSnapshot, e.g. "screenshot"

    Then, in a separate event, AJAX On Complete "screenshot" --> Share actions

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for this! Worked like a charm!

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