How do I share my newly animated name?


#1

I do not know how to share my name that I animated on "Animate your Name" for hour of code. It said to click "Save and Submit Code" and that would take me to a new page that could share my name. I tried that, but it got me back to the home screen of CodeAcademy. Help, anyone? I think it was really cool.


#2

The plan is, that once you complete all of the exercises then it will create a Codebit for you. I just tried it now and it doesn't seem to be doing that anymore.

You can do it manually though.

  • Click on your Profile Picture
  • Click on View My Profile
  • Click on Browse all Projects

That should get you to the Codebit section. Create a new Codebit using the code from the final exercise. You will be able to copy paste everything. The only difference is that the .js file has a different name in the Codebit than it did in your project so you'll have to edit that link in the index.html file -- it should be around line 10.

If you have any questions about this, just ask.


#3

So I'm trying to save in Codebit my animated name....but it's not happening..can you tell me what's missing?
Here's what I got:

<!DOCTYPE html>
<html>
  <head>
    <script type="text/javascript" src="//code.jquery.com/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="http://s3.amazonaws.com/codecademy-content/courses/hour-of-code/js/alphabet.js"></script>
  </head>
  <body>
    <canvas id="myCanvas"></canvas>
    <script type="text/javascript" src="http://s3.amazonaws.com/codecademy-content/courses/hour-of-code/js/bubbles.js"></script>
    <script type="text/javascript" src="script.js"></script>
  </body>
</html>

AND:

var red = [0, 100, 63];
var orange = [40, 100, 60];
var green = [75, 100, 40];
var blue = [196, 77, 55];
var purple = [280, 50, 60];

var myName = "Rachel";
letterColors = [red, orange, green, blue, purple]
if(10 < 3) {
    bubbleShape = "square"
}
else {
    bubbleShape = "circle"
}

#4

You are missing these function calls:

drawName(myName, letterColors);
bounceBubbles();

#5

I still don't quite get what youi're saying, even after a few read-throughs.


#6

Are you trying to get to the place where you can create a Codebit?


#7

To share my newly animated name you say "copy paste everything".
Where exactly would I put the cursor to start the paste?
For example do I highlight the string that has .js in it
IE: string.js which is on line 5
and over-write it with all of my code?

On line 10 I see '< / html > '
is that the "index.html file -- it should be around line 10" you are referring to?
What edit do I need to make to it in order to share my newly animated name?

Thanks for any specific help.


#8

I began with a fresh, brand new, empty Codebit.

If you are down to the copy/paste part, you must have already gotten through the steps of starting a new Codebit - yes?

Here are the steps that I took to add the code to the empty Codebit.

I took all of the code from @fivehounds index.html file and pasted in into the Codebit's index.html file.

Then I copied all of the code from her main.js file and pasted it into the Codebit's script.js file.

Next I had to compensate for the different name of the javascript file that the Codebits use. In the Codebit's index.html file, I found this line:

<script type="text/javascript" src="main.js"></script>

and edited it so that it looked like this:

<script type="text/javascript" src="script.js"></script>

Here is an example of a Codebit that I made using @fivehounds code:

https://www.codecademy.com/AlbionsRefuge/codebits/FzTc2G/edit


#9

Thank you for your speedy answer!
By opening @fivehounds example I could see where my cut and paste code inexplicably differed. Fixing that made it work.


#10

That. That was what I was missing. one single word that messed up my entire code. thank you so much!


#11

I've copied and pasted all of the "animate your name" code into the codebit, but it hasn't been working and i think that it may be because I don't have any code in the "style.css"


#12

This project isn't expecting to find any CSS code so that isn't the problem.

The difference between the exercise and a Codebit is the name of the JavaScript file that each of those use.

You have this:

<script type="text/javascript" src="main.js"></script>

but you need this instead:

<script type="text/javascript" src="script.js"></script>

#13

That fixed it, thank you!


#14

4 posts were split to a new topic: I wanted to put my ''code'' in my blog, how should I do it?


#15