‘16-‘17 General Discussion for Lesson 5.3


#1

Use this thread to discuss your questions and comments about how to run the lesson.


#2

One of my students wants to link out to an external site. Is there a way to add a url to an image in app lab? Perhaps by coding it on the click event?

window.open(“http://www.w3schools.com”); # This does not work in app lab.


#3

After doing some research AppLab does not have any UI controls that allow you to create external links. In the UI controls | http://www.docs.code.org/appLab | you’ll see getImageURL(id) and setImageURL(id) functions. GetImageURL fetches the image that is assigned to the variable.

setImageURL can be used to update image displayed for an image element ID. There are two ways to fill in the URL string for the second parameter. 1. You can copy the URL of an image on the web. 2. You can’t upload your own image into AppLab.


#4

I have two suggestions for this unit.

One is to show all the code (under the text option), not just the events. Some of my students have quite a lot of experience writing code, and pop back and forth between environments like repl.it and code studio. This is not possible if only some of the code is shown.

Two is to enable things like variables and capturing input text now, even if they have not yet been covered in the lessons. Again, I’ve got some students who are chomping at the bit to be able to ask a user a question, and do something with their answer. Having the input text box without this ability is a bit frustrating.

Maybe these things could be added as options for next year? Thanks! JR


#5

Hi @jranta

Thanks for the feedback. If you have students that want a full block palette that is not available in the levels you can always have them click the Remix button at the top. This will take them to full App Lab which has all the blocks available to them.

Best,

Dani


#6

Fantastic, I did not know that. Thanks!


#7

Is there a way to have text flash at the start of a screen? A student is creating a game and wants to have some text flash once they enter the “game screen”. Thanks in advance!


#8

Have you tried using showElement and hideElement? Here is the documentation for showElement. There is also an example on how to make an image blink.
https://docs.code.org/applab/showElement/


#9

I have a student who is creating the classic snake game, however, we aren’t allowed to use the controls that game lab features. Is there a way to use keyboard input to manipulate an object/element in app lab?


#10

@nick.bahr

Here is a sample ‘game’ I share with my students who ask about keyboard controls. https://studio.code.org/projects/applab/W8OMwuFsi90L4aIO_uwOxg

Happy computing,
Andrea