Layar
Part of the Blippar Group

Blog: html week

HTML Week in Review

Chris Cameron March 18, 2013

Catch up with HTML Week!

Last week on the Layar blog was a special one – it was HTML Week! We started things off by announcing the re-release of LAYARED Magazine with all new HTML Widgets showcasing the power of interactive print. Then we spent the rest of the week showing off these various HTML widgets, and taking a deep look at how we made them with some simple and easy to use tricks and plugins. Have a look at the links on the right to see all of our great HTML Week content.

Above you’ll see a video which showcases all of these great examples. From puzzles and games to shopping carts and interactive maps - it’s all there, and even more is waiting inside LAYARED Magazine. Just scan the pages and discover all that interactive print and HTML Widgets have to offer.

Also! Be sure to let us know what you think of the widgets you found in the magazine! On the last page of LAYARED Magazine – the credits page – is a poll you can answer by scanning the page with Layar. We live on your feedback and would love to know what you think!

Permalink: www.layar.com/news/blog/470

Email this article
 

HTML Week - Walkthrough Tutorial

Chris Cameron March 15, 2013

Catch up with HTML Week!

Welcome to HTML Week here on the Layar blog where we’ll be taking a look at some of the great ways you can bring print alive with HTML widgets in the Layar Creator. We’ll provide a closer look at how each example was built, and provide you with some resources to add similar techniques to your own projects. Each example we feature can be found in the completely refreshed and updated LAYARED Magazine! Get yours today and see how interactive print is creating more engaging reader experiences!

It’s the final day of HTML Week here on the Layar blog, and we saved a really great example for last!

In the very middle of LAYARED Magazine – pages 16 and 17 – a two page spread advertises the Layar Creator, including the quick steps to making interactive print. The illustrated spread provides a great overview of what it takes to use the Layar Creator, but scanning the page takes this to a whole new level.

Using some of the same basic HTML tricks we’ve been featuring throughout HTML Week, we created an engaging, animated walkthrough of using the Creator. Readers are directed to tap through the various steps of uploading pages, adding augments and publishing a campaign. Just follow along and tap the “Tap Here” buttons and you’ll be a pro at the Layar Creator in no time.

It’s a great example of how the HTML Widget in the Creator can be used to provide an immersive experience for readers. Here’s more about this widget:

  • Uses similar jQuery techniques from other HTML Week examples.
  • Uses the FlexSlider plugin for the slideshow at the beginning.
  • The steps are a series of screenshots from the Layar Creator.
  • Includes a “View in Fullscreen” button so users can follow the tutorial without needing to hold their device over the page for an extended period of time.

Again, this example seems more complex than it actually is. Using the FlexSlider plugin mentioned above, we created a few basic slides to introduce the walkthrough widget. When a user taps on a step to enter the tutorial, the slider fades away.

The green “Tap Here” buttons are very simple as well. It’s essentially three different elements that fade in and out on top of one another to produce a nice effect that encourages the user to tap the icon. Using timing and opacity options, the inner circle first fades in, followed by the outer rings. Then the inner circle fades out leaving the rings to guide the user.

The rest of the widget is simply fading from one screenshot to another, triggered by the user tapping the icons. It’s a very simple implementation but in this case it goes a long way toward educating readers of LAYARED Magazine about how the Layar Creator actually works.

After running through the 6 steps, readers are then familiar with how to create interactive print and are ready to hit the ground running when they use the Creator on the Web for the first time. This same widget could be used for any of a variety of purposes, from an app tutorial to instructions on constructing your new furniture. As with all HTML widgets, the possibilities are only limited by your imagination.

And that wraps it up for this example and HTML Week. Follow the links above to review all of our widget breakdowns from this week!

Permalink: www.layar.com/news/blog/469

Email this article
 

HTML Week – Simple Shopping Cart

Chris Cameron March 14, 2013

Catch up with HTML Week!

Welcome to HTML Week here on the Layar blog where we’ll be taking a look at some of the great ways you can bring print alive with HTML widgets in the Layar Creator. We’ll provide a closer look at how each example was built, and provide you with some resources to add similar techniques to your own projects. Each example we feature can be found in the completely refreshed and updated LAYARED Magazine! Get yours today and see how interactive print is creating more engaging reader experiences!

Today for HTML Week we are taking a look at one of our several ecommerce solutions found in LAYARED Magazine. Print is often advertising a product being sold, and now readers can buy items right off the page with interactive print!

We have multiple mobile shopping examples in LAYARED Magazine. On page 18, scanning the advertisement for a men’s briefcase brings up photos and information on similar products, and on page 22, you can interact with detailed information about the products found in the photo spread. But be sure to check out page 20 where things get really interesting!

Simple Shopping Cart

Everyone these days is familiar with an online shopping, and some may have even purchased an item from the mobile device via the web. In this example, we offer a way to bring the shopping cart experience in augmented reality with interactive print.

Essentially this example is a proof of concept, showing how the Layar App can handle “cookies” of information which can be translated into an actual shopping cart experience. On page 20 of LAYARED Magazine, you’ll see an ad for several products, including a wristwatch. Scanning with Layar displays two widgets – one for picking a color and adding the item to a cart, and one for viewing your cart info and proceeding to checkout.

When a user taps on one of the three color squares, the color of the watch in the magazine changes, much like in a traditional web-based shopping experience. This is accomplished with some simple jQuery code. There are many ways to accomplish this effect, but we chose the simplest route.

First we stacked the three different images of the watch on top of each other, but set two to be “hidden.” When a user taps on one of the colored swatches, the corresponding watch image is set from “hidden” to “visible,” and the watch which was previously “visible” is then made “hidden.” It’s a really simple, quick and easy way to showcase different colors of products with interactive print.

Tapping “Add to Cart” then stores the chosen product as a “cookie.” The top widget tracks the changes on this “cookie” and changes the number of items whenever a product is added to the cart. Readers can then tap the link to proceed to checkout with the shopping cart they have filled. In our case, it’s a dummy shopping cart so no product can actually be purchased, but it shows how a shopping cart experience can easily be implemented.

Layar behaves like a normal web browser, which means you can use normal HTML tactics to display different AR content based on user input, providing for a more personalized experience for readers. Here’s more about how this widget works:

  • Uses jQuery and “cookies” to save information.
  • Multiple “Add to Cart” buttons and widgets could be used.
  • More features and options could be added: color, quantity, size, design, etc.
  • The ultimate version of the shopping cart widget would allow one widget to be used throughout an entire campaign.

More: Photo Grid & Animated Ad

Of course, the shopping cart isn’t the only ecommerce example found in LAYARED Magazine. Check out page 18 for a dynamic photo grid and page 22 for an animated advertisement. Here’s a little more on how we made these great interactive items.

For the photo grid, we wanted to showcase some similar products to the one in the photo. Using similar jQuery tricks we mentioned yesterday with the Lonely Planet map, we created some slick animation effects and slideshows to provide more information about each product. Alternatively, you could add “Buy now!” buttons for each product and connect it with a shopping cart widget.

You can also create a slick photo slideshow with no HTML at all. Just use the built in Image Carousel widget in the Layar Creator! You can see an example of this widget in action in the image on the right. All you do is upload your images, put them in the order than you want, choose the size of the carousel and it’s ready to go!

The animated ad on page 22 was created to show off the possibilities of simple animation with jQuery. Tapping the button which appears on the page animates more buttons which hover over the various products. Tapping these buttons triggers slick animated windows that provide the reader with added information about the product.

Like a lot of HTML examples, it seems complicated but is actually relatively simple to create using the jQuery tactics we’ve gone over so far in HTML Week.

That’s it for today’s examples! Be sure to keep it here tomorrow as well as we wrap up HTML Week with our final widget example!

Permalink: www.layar.com/news/blog/467

Email this article
 

HTML Week – Interactive Map

Chris Cameron March 13, 2013

Catch up with HTML Week!

Welcome to HTML Week here on the Layar blog where we’ll be taking a look at some of the great ways you can bring print alive with HTML widgets in the Layar Creator. We’ll provide a closer look at how each example was built, and provide you with some resources to add similar techniques to your own projects. Each example we feature can be found in the completely refreshed and updated LAYARED Magazine! Get yours today and see how interactive print is creating more engaging reader experiences!

Next up for HTML Week we share a really great way to get readers interacting with your print products: maps! Whether you’re providing travel information about far off locales or just trying to help people find your local business, a map does the trick best, and a little interactivity can go a long way!

The interactive map that we added to the “Lonely Planet’s Travel Guides Just Got Better” article on page 12 of LAYARED Magazine is a perfect example of using interactive print to provide extra detailed information to readers.

Just scan the page and up pops a map with different locations throughout the world highlighted. The cities are from Lonely Planet’s annual list of top destinations. Tap one of the icons and photos and links for more information slide out of the bottom of the map. Each city features a YouTube video, links to airline and hotel services, additional country information and a link to download the Lonely Planet app.

Like the Superhero Puzzle from yesterday’s post, this example uses jQuery to produce the animation, namely the “.animate” function. Here’s how we did it.

The points on the map were placed “by hand” with CSS on their corresponding positions on the map. It’s a little time consuming to get right, but easy in the end. The smooth drop effect for the info pane was made using only simple jQuery code. After the map fades in, the info pane fades in behind it, remaining out of view.

When a user taps on one of the map points, three things happen. First the map point becomes white, which is accomplished simply by switching the image with an alternate white version. Second, the pane is dropped by using the jQuery “.animate” code function to increase the top margin. And lastly, all of the elements in the info pane, corresponding to the country map point that was clicked on, are loaded into the pane. When a user taps “View More,” the preliminary content fades out and the new slideshow content fades in.

The slideshow is also very easy to build using a trick with the “overflow:hidden” option for HTML “<div>” tags. Essentially, we created a smaller window ”<div>” through which a larger ”<div>” with the content passes through. That’s just how we did it, but there are lots of ways to create slideshows with basic HTML. Check out this resource for tips.

And that’s it for this example! Just a basic knowledge of HTML and CSS is all you need to make some really elegant dynamic widgets for your interactive print projects.

Stay tuned here on the Layar blog throughout HTML Week for more great examples!

Permalink: www.layar.com/news/blog/466

Email this article
 

HTML Week – Puzzles and Games

Chris Cameron March 12, 2013

Catch up with HTML Week!

Welcome to HTML Week here on the Layar blog where we’ll be taking a look at some of the great ways you can bring print alive with HTML widgets in the Layar Creator. We’ll provide a closer look at how each example was built, and provide you with some resources to add similar techniques to your own projects. Each example we feature can be found in the completely refreshed and updated LAYARED Magazine! Get yours today and see how interactive print is creating more engaging reader experiences!

To kick off our series of HTML Week examples, we’ve got some fun that everyone can enjoy – puzzles and games! Adding some entertaining interactivity to otherwise static print makes for a more enjoyable reader experience, increasing the value of your publication.

Newspapers, magazines and other publications have long included simple crosswords, word jumbles or sudoku puzzles, but now things can get really interesting with interactive print! Check out the two examples below which can be found in the new LAYARED Magazine.

Drag-n-Drop Puzzle

The Drag-n-Drop Puzzle (found on page 8 of LAYARED Magazine) is a quick and easy way to add some fun to any kind of content. By simply cutting up an image into as many parts as you like, you can create a puzzle for readers to solve by dragging the pieces into place on their smartphone or tablet.

This example shows off the “draggable” capability of jQuery. It’s straightforward and easy for readers to understand – first you see one piece float up and snap into place, and then you have to do the same with the remaining pieces. Here’s more about this HTML example and how to make your own.

  • Puzzle Pieces are created by splitting any image of choice into desired sections.
  • Pieces are made “draggable” by using the “touch-punch” plugin explained and found here.
  • Draggable and Snap UI can be found here.
  • You could alternatively allow all puzzle pieces to be shown immediately from the beginning.
  • To create a smoother look on the Layar App, the “light beam” effect (when the puzzle is loaded) was made using only jQuery and two images of light beams.
  • The widget also offers a “Play Again?” button that refreshes the widget.

The Drag-n-Drop code may sound complex but the idea behind it is simple. First we placed a black-and-white version to serve as the area where all the puzzle pieces would end up. This doesn’t have to be done but we thought this would make it easier for users to see where they would be dropping puzzle pieces. If you want to have the puzzle snap into place above the physical image in your print content, simply remove the background image.

The way the snap feature works is one HTML “<div>” snaps onto another. For this puzzle to work, all you have to do is make one image snap onto an invisible copy of that image.

You need a piece to drag and a piece to snap onto and they need to be the same, so you just duplicate your puzzle pieces. You should have two of each piece, those for the user to drag and the others for them to snap onto. You then place the snap pieces where you want the pieces to fit together, but make them invisible, otherwise it will look as if the puzzle is already put together!

Now, when you drag the other visible pieces over the invisible ones, the drag designated pieces will snap into the correct place. Since the invisible images can’t be seen, it will look like the visible pieces are snapping into place on top of the black and white background, and presto! You’ve got a really fun and interactive puzzle game with very little effort.

Scratch-Away Game

People love scratch-away games of all kinds. The Scratch-Away Puzzle (found on page 27 of LAYARED Magazine) implements this brand of fun in AR. After scanning the page with Layar, readers simply scratch away at the puzzle to reveal the hidden message. Here’s more about this widget:

  • Uses Canvas and Javascript, which you can find here.
  • Users essentially scratch away normal image to reveal solved image below.
  • Alternatively, a drawing feature could be added so that user can “paint” onto a canvas.

The Scratch-Away Puzzle may seem like complicated code, but it isn’t. The way we use the Canvas in our demo is by first layering two images on top of one another. One is the picture you see at the beginning, and right below it is the image with the appropriate letters blurred.

When you drag your finger across the screen and “scratch” it, you are actually erasing the front image and revealing the image behind it. It’s really as simple as that. This code can, of course, be reversed or a paint element could be added to create a canvas where a user can draw anything that they want.

That’s all for Puzzles and Games found in LAYARED Magazine. These examples were built with very basic HTML tools and techniques, but can add a lot of great interactivity to your print products!

Stay tuned here on the Layar blog throughout HTML Week for more great examples!

Permalink: www.layar.com/news/blog/465

Email this article
 
We use cookies to improve our services. Don’t worry, they don’t store personal or sensitive information and you can disable them at any time in your browser settings.