Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7882619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:19:46+00:00 2026-06-03T04:19:46+00:00

To make a long story short, I need to use JavaScript to add an

  • 0

To make a long story short, I need to use JavaScript to add an image to an html5 game given the URL. The catch is that it is inside a program called gamemaker html5, which is basically a drag and drop IDE for creating HTML games.

I don’t know any JavaScript, and simply need is code to add an image given the URL. Can someone please translate the following html into JavaScript for me?

<img src="http://www.mydomain.com/myimagefile.gif"></img>

This is all contained on an html5 canvas, so I need to be able to pop the image onto x,y coordinates.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:19:47+00:00Added an answer on June 3, 2026 at 4:19 am

    To add an image to a GameMaker:HTML5 game, use this:

    newimg = sprite_add("http://www.mydomain.com/myimagefile.gif",1,false,false,0,0);
    

    Replace the arguments as necessary, but be aware that this does not support animated GIF files – they must be a strip if you want to import an animated sprite.

    newimg can then be used anywhere you would normally name a sprite, such as:

    draw_sprite(newimg,-1,32,32);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

To not make a short story long, my teacher makes us use a MASM.EXE
It's a rather long story but to make it short I need to store
I'm trying to make a WCF service that will work with JSON-P (long-story short,
To make a long story short I have to use processing in a class
Long story short - In order to make something work correctly, I need to
To make a long story short, I have dynamic pages on a website that
So to make a long story short. A professor asked this question in class
Short story: I can't make precompiled headers work properly with gcc -c option. Long
I need to make a program that adds long integers without using the biginteger
It's hard to describe the whole problem but to make a long story short,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.