Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Which Language is this?

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #43524
    CodeGraphics
    Participant

    I saw these codes somewhere, and the demo showed a moving circle.
    I copied the codes and quickly created an html document and pasted the codes inside thinking it is js, but it didnt run. Which language was used to do that?

    var x = 20;
    var speed = 3;

    var draw = function() {
    background(202, 255, 97);

    fill(66, 66, 66);
    ellipse(x, 200, 50, 50);

    x = x + speed;
    };

    #128943
    CrocoDillon
    Participant

    It looks like JS, you’re probably missing some library that defined those functions.

    #128957
    Dheer
    Member
    #129042
    rpotterjr
    Participant

    I believe it is JS, but it’s not all of it. It would be easier to say for sure if the entire code was there. Yes, this is only a part, not the full script. It’s the size and speed of an oval being filled with color, however there is no mention of an event behavior, so maybe a possible animation of some sort…

    #129043
    rpotterjr
    Participant

    It won’t do anything because there is no trigger, listener, event of any sort specified.

    #129135
    CodeGraphics
    Participant
    #129137
    CrocoDillon
    Participant

    Looks like it’s a series. It’d probably make more sense if you start from the first tutorial, where ever that is.

    #129142
    CrocoDillon
    Participant

    There are using this: http://processingjs.org/, as explained in some hard to find [introduction video](http://www.khanacademy.org/cs/welcome-to-computer-science/882454257)

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘CSS’ is closed to new topics and replies.