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

  • Home
  • SEARCH
  • 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 8032999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:33:34+00:00 2026-06-05T01:33:34+00:00

This code is almost taken directly out of a book but it just doesn’t

  • 0

This code is almost taken directly out of a book but it just doesn’t seem to work, i removed the loop and just set up all the different indexes of the array with the image src etc. and it worked so i think theres something simple im doing wrong here. Can anyone see what is wrong with this snippet of code?

var demo = new Array();
var titleNumFrames = 7;
for(x=0; x<titleNumFrames; x++) {
    demo[x]=new Image();
    demo[x].src = “image”+x+”.jpg”;
}

When i said it did not work, i meant the images just weren’t being preloaded and sometimes strange things would happen only when that for loop was in the code. Ended up being the quote marks, simple mistake – wont be copy code out of word/powerpoint files in future!

  • 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-05T01:33:36+00:00Added an answer on June 5, 2026 at 1:33 am

    Your text editor (more like word processor) or keybindings are erroneously replacing normal quotes " in your code with smart quotes “.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my new code, its almost working, but I think my while loop
I got this very weird code: No debug, no work! I am almost crazy
I got this code from someone, it's almost perfect to create a dynamic breadcrumb,
This bit of code is taking almost a half second to execute. Could somebody
This code : http://jsfiddle.net/bYtTG/1/ Works as I want in FF, chrome and opera, but
This is taken directly from my Django template: {% for day in days %}
This is almost a programming question, but geared towards physicists. Suppose I am writing
i have this code to check for group membership but it seems to be
I'm having a bit of trouble figuring out why this code is running slow.
This code below allows me to find the word error in all my files

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.