Taz

Reload Example Button Not Working

Recommended Posts

When I hit the "Reload Example" button the page scrolls to the top but nothing else seems to happen...

For instance if I open this Drag example and drag the sprite, then when I hit the "Reload Example" button the sprite should be back at its original position in the center, but it's not.

Likewise editing the example code and hitting the button doesn't run the new code, it just scrolls to the top of the page...

EDIT: oops, the button is called "Reload Example" not "Refresh" (I guess the icon reminded me of refresh;)

Share this post


Link to post
Share on other sites

I don't think this has been working for a while.  There used to be a rocket button for 'run' but this was also problematic.  The examples heve never 'all' worked and never will, probably a little frustrating for newcomers, it should have a warning at the top really.

I think the sandbox was created partly in reason to pickup where the examples were failing.  It's usually quite easy to port an example to the sandbox, eg https://phaser.io/sandbox/edit/mwhvynxr

In preload(), just has to add the baseURL and crossOrigin then modify the asset paths accordingly (remove the leading assets/), so you'll have the same example running that you can modify and run and save for later.  Not sure if there's anyway to target a specific version of Phaser though.

Share this post


Link to post
Share on other sites

Do you (or anyone:) know if the phaser sandbox has a GitHub repo somewhere or if it's closed source? Maybe I can help work up a way to load the examples, but I can't find repo if there is one...

EDIT/UPDATE: NM I found @rich's post where he said it's not open source, I'll prob just convert the examples manually like you showed then, as needed...

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.