Mouse scrolling on Firefox?, i have the question of how i can get mouse scrolling on Firefox?

i try to put mouse scrolling functions on firefox, but i can't
this is my code:
<pre><nowiki><!DOCTYPE html>
<html>
<head>
<title>Canvas</title>
<meta charset="UTF-8">
<meta name="author" content="http://programmingheroes.blogspot.com.es">
<style>@font-face {
font-family: "PlaneCrash";
src: url('Calligraffiti.eot?') format('eot'),
url('Calligraffiti.woff') format('woff'),
url('Calligraffiti.ttf') format('truetype'),
url('Calligraffiti.svg#Calligraffiti') format('svg');
body {
background-color: #000;
overflow: hidden;
margin: 0;
div {
-moz-user-select: none;
-moz-user-select: none;
canvas {
background-color: #000;
position: absolute;
#title {
-moz-transform: rotateZ(-5deg);
-moz-transition: -moz-transform 2s;
-moz-box-reflect: below -40px
-moz-gradient(linear, left top, left bottom,
from(transparent), to(rgba(255, 255, 255, 0.6)));
-moz-transform-origin: 0% 100%;
font-family: "PlaneCrash";
position: relative;
text-align: center;
top: 30px;
font-size: 6em;
color: red;
text-shadow: 0px 0px 20px white;
#title:hover {
-moz-transform: rotateZ(5deg);
</style>
<script>
window.addEventListener("resize", resizeCanvas, false);
window.addEventListener("DOMContentLoaded", onLoad, false);
window.requestAnimationFrame =
window.requestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function (callback) {
window.setTimeout(callback, 1000/60);
var canvas, ctx, w, h, particles = [], probability = 0.09,
xPoint, yPoint;
var img = new Image();
img.src = "img/fire.png";
function onLoad() {
canvas = document.getElementById("canvas");
canvas.addEventListener("mousedown", mouseDown, false);
canvas.addEventListener("DOMMouseScroll", DOMMouseScroll, false);
ctx = canvas.getContext("2d");
resizeCanvas();
window.requestAnimationFrame(updateWorld);
} // fin de onLoad();
function mouseDown() {
createFirework();
} // fin de moveDown(e);
function DOMMouseScroll(e) {
e = e || window.event;
if (e.DOMMouseScroll > 0) {
probability += 0.01;
else
(e.DOMMouseScroll < 0)
probability -= 0.01;
probability = probability<0? 0: probability;
} // fin dw mouseWheel();
function resizeCanvas() {
if (!!canvas) {
w = canvas.width = window.innerWidth;
h = canvas.height = window.innerHeight;
} // fin de resizeCanvas();
function updateWorld() {
update();
paint();
window.requestAnimationFrame(updateWorld);
} // fin de update();
function update() {
if (particles.length < 500 && Math.random() < probability) {
createFirework();
var alive = [];
for (var i=0; i<particles.length; i++) {
if (particles[i].move()) {
alive.push(particles[i]);
particles = alive;
} // fin de update();
function paint() {
ctx.globalCompositeOperation = 'source-over';
ctx.fillStyle = "rgba(0,0,0,0.2)";
ctx.fillRect(0, 0, w, h);
ctx.globalCompositeOperation = 'lighter';
for (var i=0; i<particles.length; i++) {
particles[i].draw(ctx);
} // fin de paint();
function createFirework() {
xPoint = Math.random()*(w-200)+100;
yPoint = Math.random()*(h-200)+100;
var nFire = Math.random()*50+100;
var c = "rgb("+(~~(Math.random()*200+55))+","
+(~~(Math.random()*200+55))+","+(~~(Math.random()*200+55))+")";
for (var i=0; i<nFire; i++) {
var particle = new Particle();
particle.color = c;
var vy = Math.sqrt(25-particle.vx*particle.vx);
if (Math.abs(particle.vy) > vy) {
particle.vy = particle.vy>0 ? vy: -vy;
particles.push(particle);
} // fin de createParticles();
function Particle() {
this.w = this.h = Math.random()*6+1;
// Position
this.x = xPoint-this.w/2;
this.y = yPoint-this.h/2;
// Velocidades x e y entre -5 y +5
this.vx = (Math.random()-0.5)*10;
this.vy = (Math.random()-0.5)*10;
// Tiempo de vida
this.alpha = Math.random()*.5+.5;
// color
this.color;
} // fin de Particle();
Particle.prototype = {
gravity: 0.05,
move: function () {
this.x += this.vx;
this.vy += this.gravity;
this.y += this.vy;
this.alpha -= 0.01;
if (this.x <= -this.w || this.x >= screen.width ||
this.y >= screen.height ||
this.alpha <= 0) {
return false;
return true;
draw: function (c) {
c.save();
c.beginPath();
c.translate(this.x+this.w/2, this.y+this.h/2);
c.arc(0, 0, this.w, 0, Math.PI*2);
c.fillStyle = this.color;
c.globalAlpha = this.alpha;
c.closePath();
c.fill();
c.restore();
} // fin de Particle.prototype;
</script>
</head>
<body>
<noscript>
No tiene habilitado JavaScript. Debería habilitarlo para poder
disfrutar al completo de los contenidos de esta página.
</noscript>
<div>
<canvas id="canvas">
Tu navegador no soporta el elemento <code>canvas</code> de HTML5.
</canvas>
</div>
<div id="title">
fireworks!
</div>
</body>
</html></nowiki></pre>

Note that some CSS properties now longer need or can be prefixed with a -moz- prefix.
*https://developer.mozilla.org/en-US/docs/Web/CSS/transform
A good place to ask advice about web development is at the mozillaZine "Web Development/Standards Evangelism" forum.
*http://forums.mozillazine.org/viewforum.php?f=25
The helpers at that forum are more knowledgeable about web development issues.<br>
You need to register at the mozillaZine forum site in order to post at that forum.

Similar Messages

  • When I go to youtube and view a video clip it usually asks if i want to save the video I'm watching. Now all of a sudden it no longer asks the question. How do I get it back?

    when I go to youtube and view a video clip it usually asks if i want to save the video I'm watching. Now all of a sudden it no longer asks the question. How do I get it back?

    I believe that might be related to this:
    See: http://real.custhelp.com/app/answers/detail/a_id/7303/p/3/c/2222/r_id/119487
    Real is always, it seems, late in releasing updates for new browser updates. They are given the same opportunity during the Firefox pre-release testing as other developers to be sure that their products will work with new Firefox releases.
    But, alas, always the same problem!

  • When you delete an app from your homescreen it is still in the cloud, does that mean you still have the app, and how do you get it back on to the home screen

    When you delete an app from your homescreen it is still in the cloud, does that mean you still have the app, and how do you get it back on to the home screen. new to ipad so do not know much. Anybody know.p

    As long as the app remains in the store then you can re-download it via the Purchased tab in the App Store app, or via the Purchased Link under Quick Links on the right-hand side of the iTunes store home page on your computer's iTunes : re-downloading.
    Similarly ibooks can be re-downloaded, and depending upon what country that you are in then music, films and tv shows may also be re-downloadable (if they remain available in the store).

  • Anybody know there have the free cloud express we can get

    Hi,
    Anybody know there have the free cloud express we can get now?

    Hello
    I am not sure what you mean, but assume you are talking about Cloud Cruiser Express?
    If this is the case, then the Cloud Cruiser Express extension is included in the WAP installation. If you installed WAP previously without the extension, it can be added by running the Web Platform Installer.
    Once that is completed, you need to deploy the backend of Cloud Cruiser Express (on a separate Virtual Machine) and integrate it with WAP.
    For more information, I suggest you request access to the Cloud Cruiser documentation web site: http://docs.cloudcruiser.com/

  • I lost my phone.i have only the serial number .how i can get imei number with it???

    i lost my phone.i have only the serial number .how i can get imei number with it???

    Call your carrier, they have a record of your IMEI number. Or, read here:
    http://support.apple.com/kb/ht4061

  • I have Firefox 13.0. I have the homepage with the icons such as history, but I do not have the updated tabs.How do I get the updated tabs? Thanks.

    I have just updated to Firefox 13.0. I have the AVG Secure Search on my browser or whatever it is that is where the search engines and refresh, and bookmarks icons are located. Even though on my add ons page it says it is disabled. But obviously it isn't because it still works. I have removed AVG Secure Search from the list of search engines in the drop down list in the search bar, but this did not solve the problem with my tabs. The Firefox website says that my Firefox is up to date, but if it is up to date why do I still have the same old tab page when I open a new tab? When I click on the plus sign to get a new tab, it takes me to about:Tabs and says on the screen "You've opened a new tab." Then it has a search bar and a button next to it that says "Web Search!" Then it goes on to say "With Tabs You Can..." So, how do I change my current tabs to the updated Firefox tabs with icons of the my recent tabs and websites I regularly visit. Also can you please provide detailed step by step ways to solve this problem. Thanks.

    You only see items on the about:newtab page if the history is enabled and the browsing cache is working (stores thumbnails).
    *Tools > Options > Privacy > Firefox will: "Use custom settings for history"
    *http://kb.mozillazine.org/Viewing_the_browsing_history_-_Firefox
    You can check the current cache usage on the about:cache page and in Tools > Options > Advanced > Network > Offline Storage.

  • I have a question on how guest can still get into my computer when I deleted that.  Plus took files of mine, change names in my phone book.  Lets say they are messing with me.  It is driving me a bit nuts.  Help?

    Hello, I have a question on "quest".?????     I have someone getting into my computer. I have shut of the quest... and yet yesterday all of my files were stolen.  My phone book, someone goes in and changes my phone number, and just changes so many things around.  It really has me upset.  Please... tell me how I can keep "guest"  out for good. I bought this computer for me.  Not guest, yet all I see here on the apple ways is how others can hook in, or get in to our computers. 
    Its upsetting, and  to see how you give step by step instruction to help them get into other people's computers is upsetting, yet not much on how to keep them out.  Tell me just how to keep them out for good.  I have a hacker, in mine.  Stealing things.  I have cleaned my computer out three times, in the last few weeks. I get all set up, to only three days later, even with a new list of passwords, their back again, stealing.  Please Help me  Morgiegal

    Data rate DOES make a difference, but I'd say your real problem has more to do with the fact that you're working on a Powerbook. Motion's real time capabilities derive from the capability of the video card. Not the processor. Some cards do better than others, but laptops are not even recommended for running Motion.
    To improve your workflow on a laptop will be limited, but there are a few things that you can try.
    Make sure that thumbnails and previews are turned off.
    Make sure that you are operating in Draft Mode.
    Lower the display resolution to half, or quarter.
    Don't expect to be getting real time playback. Treat it more like After Effects.
    Compressing your clips into smaller Animations does help because it lowers the data rate, but you're still dealing with the animation codec which is a high data rate codec. Unfortunately, it sounds necessary in your case because you're dealing with alpha channels.
    The data rate comes into play with your setup trying to play through your USB drive. USB drives are never recommended for editing or Motion work. Their throughput is not consistent enough for video work. a small FW drive would be better, though your real problem as I said is the Powerbook.
    If you must work on the powerbook, then don't expect real-time playback. Instead, build your animation, step through it, and do RAM previews to view sections in real time.
    I hope this helps.
    Andy

  • Recentley printing most documents in firefox print on 1/4 of the page and not the complte document. When I print the same thing in safari it prints fine. Please advise how I can get proper printing in firefox

    When using Firefox to print most documents ( boarding passes, mastercard statements,genealogy documents) the printing only shows on 1/4 of the page, is in the lower left quarter and does not print part of the right side of the information. When I go into Safari and print the same documents within 2 minutes they always print fine. We like Firefox and would prefer to continue to use but if we can't print we will have to use Safari more often

    I have the same problem with cutting of the page since installing the new version. If you manually zoom out the print it only shows 1/4 of the page on a whole page of paper. Something is wrong here.
    I have done all these steps and it still does NOT print correctly!
    I am a IT professional and something is not right with the new firefox browser. Please supply with fix or we will have to permanently switch back to Internet Explorer, which works perfectly.

  • TS1702 I did an in app purchase to get the full version of the app and I still have the lite version. how do I get the full app?

    I downloaded the light version of My First Book of French Alphabets by
    Ilmasoft. I did an In-App Purchase      of $1.99 to get the full version. Upon returning to the app to use it (it did work after the initial purchase), I still have the light version. I tried reinstalling the app but still have the light version. I have also tried emailing the developer, but no response has been received.
    What else can I do? I really like the app. I would even repurchase it to get the full version, but it shows as a purchased item.
    Any help for this problem would be appreciated!

    Hi,
    Generally, you can switch between the light and full version of OWA, if your web browser support the full set of features. You can do this by checking or clearing the "Use the blind and low vision experience" check box. However, if you use a web browser
    that doesn't support the full set of features, Outlook Web App (OWA) will open in light version.
    Here is a related article for your reference.
    Outlook Web Access: Service always defaults to the Lite version
    http://support.microsoft.com/kb/2023257
    Best regards,
    Belinda
    Belinda Ma
    TechNet Community Support

  • I downloaded the speak now album and i change computers and now i dont have the digital booklet. how do i get it back?

    i downloaded the speak  now album and i change computers. how do i get back the digital booklet?

    Is it available for redownload? See:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    Copy it from your old computer.

  • The menu bar at the very top does not have the share tab, how do you get it on there?

    help with adding share to menu bar on top of finial cut pro x

    That's because the YouTube video you saw was from an old version of FCPX before the change in the Share interface. Here's how you do that now:
    http://www.larryjordan.biz/fcpx-still-frames/

  • My facenow app is not showing in the setting so how I can get that in my setting and I m using iPhone 4S wid io6

    Facenow app is showing in my setting in my iPhone 4S wid ios 6

    It's called "facetime".  Where did you get the phone?  Facetime is banned by law in some countries in the Middle East and has been permanently removed from phones sold there.

  • Suggestions for how I can get the new purchases currently trapped on my iPod transferred to iTunes?

    I recently bought an iPod touch and had no trouble loading all the existing music I have in iTunes to my new iPod.  The problem is that no matter what I try I cannot transfer purchases I made on the new iPod into iTunes.  Every time I try, "Transfer Purchases" is greyed out.  As a result the seven tracks that I bought on the iPod are trapped on the device.  I can't get them into iTunes.  Does anyone have any suggestions for how I can get the seven new purchases currently trapped on my iPod transferred to iTunes?
    I've tried suggestions from multiple support forums, and nothing has worked.  Does anyone know why "Transfer Purchases" would be greyed out and how I can fix it so I can get the music purchases from the device to the computer.  Before anyone asks, this has not happened with any other Apple device I have owned, including my iPhone 4 8GB, iPod Touch 2nd Gen 32GB, iPad 1st Gen 64GB, and iPad 2 64GB.  Why is it suddenly happening now?
    My new iPod is an iPod Touch 5th generation 64GB  using iOS 7.1.2, and iTunes is version 11.
    I've never had this problem before.  It's driving me nuts.  Any help is very much appreciated.

    Does iTunes see the iPod?
    Is the computer authorized for the account that purchased the items?
    iTunes Store: Authorize or deauthorize your Mac or PC

  • How i can get the old version of ois 8.0

    can anybody help me. i got the 8.1.2 but i want the 8.0 how i can get it back?

    You cannot. Apple does not support downgrading.

  • Hi, I have answered no to the question about saving password for one spesific site. I have changed my mind and would like Firefox to save the password. How do I reactivate the password saver for one spesific site?

    Hi, I have answered no to the question about saving password for one spesific site. I have changed my mind and would like Firefox to save the password. How do I reactivate the password saver for one spesific site?

    Check exception list of your Firefox password Manager and check if your site is there or not?
    * http://kb.mozillazine.org/User_name_and_password_not_remembered#Password_Manager_settings

Maybe you are looking for

  • Problem with HERE drive on Lumia 720 in India

    I had the preinstalled HERE drive app on my Lumia which was working fine. Yesterday store was showing updates and it also had an update for HERE drive. When I updated it through WiFi the app didn't open and kept returning to home screen. This is real

  • Syncing an Iphone with multiple Itunes accounts

    I recently traveled with my Iphone and when at my brother's place, I logged in to Itunes with my ID, purchased some tv shows for my daughter and was able to sync them to my phone. When I got home and synced with my own laptop, it told me it had to sy

  • List of deleted PO

    hi all, can anyone please tell me how can i get the list of deleted PO? or tell me from which tcode i can get the same? regards saurabh.

  • IDVD creating disk image larger than it should be.

    I exported an iMovie to iDVD and set up the dvd using one of the supplied themes. I checked the disk info to make sure it will fit the DVD-R. The program says my file should be about 3.9 Gigs. The disk burn was incomplete so I tired to create a disk

  • Urgent : tolerance key in Purchase requisition

    dear all, Kindly inform me about the usage of tolerance key in pur req in customizing. Where the tolerance key is linked in PR doc type ( I Dont know the customizing part for the same.) urgent. Regards velu