4 Tips to Extend Adobe Edge Animate Capabilities
A spectre is haunting the web – the spectre of Flash. Everybody has heard that this old technology developed by Macromedia (and purchased by Adobe) is no longer alive. There are many factors that have coincided to terminate it, technological and commercial ones. But this is not the purpose of this tutorial.
One of the revolutionary aspects of Flash was the user-friendly interface, and the possibility of building complex interactive animations without a huge knowledge of programming. With its successor, HTML5, it seemed that we were going back to ancient times, when only programmers could develop such complex sites.
But the software developers have answered that question, and have built many platforms for developing HTML5 animations with user-friendly interfaces. The most popular ones are Sencha Animator and Adobe Edge. In this tutorial we’re going to focus on this last one. The capabilities of this software are not fully developed, so sometimes it’s necessary to use some extra code to extend them. Here are some tips that can improve your experience with this developing tool - Adobe Edge Animate CC.
Improve Your Experience with Adobe Edge Animate
How to add custom fonts
Adoge Edge includes a wide range of fonts to be used on your projects. But if you want to use another one you can follow these steps:
Convert your font to the following formats:
.eot, .ttf, .otf, .woff and
.svg. There are many on-line applications that can be used for this conversion, we can recommend to you the webfont generator by Font Squirrel. Save these files in a new folder in your project's root (we usually name it 'fonts').
Go to your Fonts menu (on the right of the interface) and click on the + symbol. Choose the Custom tab.
Add a name for your font. After embedding it, it will appear as one more font in your text options. Now you must enter the css style tag that will embed your files. A sample for this code would be:
Please, pay attention to the extension of the
embedded-opentype (.eot?#iefix). If you don’t write this full extension you could have problems with Internet Explorer.
When you have published your animation, you will need to paste manually the ‘fonts’ folder in the root of your exported files.
How to use additional CSS3 with your text
Adobe Edge Animate allows you to include classes and a lot of CSS3 features for text blocks: shadows, position, filters, and many others. But, on the other hand, there are many others that just can't be programmed with the provided tools. You can add CSS3 code very easily.
Create your text frame and define a class for it.
Save and close your project. Open the HTML file in you root folder with a code editor. You can write the code for the class inside the tag.
Test the style in your browser and, when everything is OK, copy and paste the style in a text file. You will need it in the future, as the program tends to erase all the additional code in the HTML. Once the project is complete, you can publish it and add your saved style to the final document.
How to add sounds
In order to show you how to include a sound on your project, we are going to use a practical case of one object that plays a background sound when the mouse is hovered over it.
To start with this process we need to export the sound file in two different formats:
.ogg. Remember, we need it to be compatible with most browsers. Place these files in a ‘sounds’ folder in your root.
Select the graphic element and click on the actions button. Create a new one with mouse over method.
sym.play(); newSound = new Audio(); newSound.innerHTML = "<source src='sounds/XXX.ogg' type='audio/ogg' /> <source src='sounds/XXX.mp3' type='audio/mpeg' />"; newSound.volume = 0.3; newSound.loop = true; newSound.play();
Create another action for the same element with “Mouse out” method.
Add this code to pause the sound:
As we did with the ‘fonts’ folder, we need to paste manually the ‘sounds’ folder when we publish our animation.
How to customize the loader
One of the limitations in Adobe Edge Animate is that only displays six loading loops. In fact, these are animated gifs, automatically centered in the screen while the animation is loading. But there is one way to change these default animations.
Create an animated gif with the same size as your animation performing one continuous loop. Save it to your images folder.
Open your Edge Animate project and include one of the default loaders in the project.
Import your animated gif to the library.
Save the project and close it. The software is always checking for changes in the external files, so it's better to keep the project closed.
Go to the bottom of the code and change the information as described in the image.
Performing these changes we have mystified the code, changing the coordinates and replacing the source file for the loader.