Jump to content

Ingolme

Moderator
  • Content Count

    14,392
  • Joined

  • Last visited

  • Days Won

    99

Ingolme last won the day on December 16 2020

Ingolme had the most liked content!

Community Reputation

1,020 Excellent

4 Followers

About Ingolme

  • Rank
    Coding Fox

Previous Fields

  • Languages
    Java, PHP, MySQL, Javascript, CSS, HTML

Contact Methods

  • Website URL
    http://www.thecodingfox.com/
  • ICQ
    0

Profile Information

  • Interests
    Web development, drawing, videogames, foxes.

Recent Profile Visitors

190,187 profile views
  1. I can't see any obvious reason in the code that you have shown here. As your code is right now, for me both canvas look the same. Perhaps with a real use case example I could see where the problem is.
  2. If only A is filled, it means that B has to not be filled. The structure would like similar to the following, assuming A and B are booleans: if(A && !B) { // Only A } else if(B && !A) { // Only B } else if(A && B) { // Both A and B }
  3. It removes the "readonly" attribute on all form elements of the localviking. com website. Which means that you will be able to fill in form fields which were disabled previously.
  4. The forum is currently run by volunteers, the site staff do not regularly interact here. On the Certifications page they provided exam@w3schools.com as a means of contact.
  5. I'm not sure which language you're programming in. The 32 clarifies that the returned integer uses 32 bits to represent the number. 32 bits can represent about 4 billion different numbers. Depending on the language, there can be 8-bit integers for up to 256 different values, 16-bit integers for up to 65536 values and 64-bit integers for an amount too big for me to remember.
  6. In general, document.write() shouldn't be used. Alternatives to document.write() are element.innerHTML to add or modify content and console.log() for testing. When called during page load, it will insert the content into the place it was called from. If called after the page has finished loading, it replaces the page with new content.
  7. It's not an array because you overwrote the array with an object of type "component" on this line: gameObstacle = new component(10, 200, "green", 300, 120);
  8. Ingolme

    Form Tutorial Help

    The tags aren't removed, they're just converted into text so that they can't be interpreted as HTML.
  9. I think it may be possible to use embedded SVG filters in the CSS rule. Have the SVG embedded anywhere in your document, but use the CSS rule on the <canvas> element. The same as the original solution, but instead of the SVG being in a different file, it is within the same document: <style> #myCanvas { filter: url("#darkGreen"); } </style> ... <svg> <defs> <filter id="darkGreen"> ... </filter> </defs> </svg> ... <canvas id="myCanvas"></canvas> With this setup (if it works), you will be able to
  10. Oh, the filter needs to be applied using the svg filter attribute. I'm not entirely sure what the best way to do it is, I would have to do experiments. Either give a filter attribute to the <html:canvas> element or give it to the <foreignObject> tag. Either this: <html:canvas filter="url(#xPurple)" ... ... > or this: <foreignObject filter="url(#xPurple)"> ... ... If the <foreignObject> tag necessary?
  11. Unfortunately, you can't modify it with Javascript if it is being loaded from another file. To do that, since canvas can be embedded in SVG, that's probably the best way to do it. Just a tweak to your previous code: <svg xmlns="http://www.w3.org/2000/svg" xmlns:html="http://www.w3.org/1999/xhtml"> <defs> <filter id="darkGreen"> <feColorMatrix type="matrix" values="0 0 0 0 0 0 0.5 0 0 0 0 0 0 0 0 0 0 0 0 1" /> <
  12. Javascript should have control over the volume, it would take a bit of time to write the code to do that. Even then, that's not going to stop people from downloading the whole track for free. If you want to show just a sample, use an audio editor (a free one is Audacity) to make a short track with just the part of the song that you want users to hear and add the fadeout in the edited file.
  13. No, it is much simpler than that. Save your SVG filter in a .svg file, then apply the filter to any object using the CSS filter property: <style> #myCanvas { filter: url("file.svg#darkGreen"); } </style> ... <canvas id="myCanvas"></canvas>
  14. SVG does not have a <canvas> element. The <foreignObject> tag might work to embed an HTML5 <canvas> element but I'm not sure how well <foreignObject> works. Instead of trying to embed the <canvas> in an SVG document, you could put the SVG code in a separate file and load its filter with the CSS filter property.
  15. Ingolme

    Background Image

    You can set the background-position to bottom left
×
×
  • Create New...