Error Code 404 Animated SVG

Description

Description
This is a Scalable Vector Graphics (SVG) animation, created with the help of Dmitry Baranovskiy’s Snap.svg JavaScript library. It starts with the SOS international Morse code distress signal, which is three dots, three dashes and three dots. Then the dashes morph to dots. The group of nine dots draws the letters SOS, where two dots in each group draw the inner and outer stroke of one letter and the third is used as a filler. The animation continues with morphing animation of the ‘S’ letters, which turn into ‘4’ digits. The ‘O’ letter turns into a magnifying glass, which moves up and down a little in order to reveal a back button.
How to use the Visual Builder
The Visual Builder is a help tool that resides in the VISUAL_BUILDER folder of the package you have purchased.
If you load the index.html page you will see an interface, that allows you to set values to all the options, that define the animation look and feel. When you hit the play button the set panel will hide, the animation will play and if you are happy with it, you will need to select and copy the code, that sits in the left part of the panel. This code will have to be pasted in the page where you intend to use the animation. In the simple_usage.html page I have put comments around the portion of code that you need to replace:
//=================================== //PASTE CODE FROM VISUAL BUILDER HERE var pnf_404_time_m = 120; var pnf_404_s_letter_color1 = "#ffffff"; var pnf_404_s_letter_color2 = "#0bb5b5"; var pnf_404_o_letter_color = "#ff255f"; var pnf_404_button_color = "#ffffff"; var pnf_404_global_stroke_width = 2; var pnf_404_stroke_color1 = "#ffffff"; var pnf_404_stroke_color2 = "#0bb5b5"; var pnf_404_shadow_color = "#000000"; //===================================
This is transparent animation, so if you want to change the background color of the page you have to take the value from the Visual Builder and put it as a style setting. In the simple_usage.html page I have comments next to the line where you need to replace the value of the background-color:
body{
background-color: #3d1a26;/* TAKE THIS VALUE FROM THE VISUAL BUILDER */
margin: 0px;
}
The speed setting is in milliseconds. All time intervals used in the animation are based on this number.
Usage
1. In order to play the animation you need to add a svg object to your 404 page. It needs to have an id attribute and also width and height. If you set the width as a percentage the animation will be responsive. You can set a height in pixels, which will act as a maximum height in the bigger resolutions:
<svg id="pnf_404_svg" width="100%" height="500px"></svg>
2. After you have the svg element you will need to import some JavaScript files. These are Snap.svg library, and JavaScript file with the animation instructions. In my demos, I add these in the header of the document.
<script type="text/javascript" src="snap.svg-min.js"></script> <script type="text/javascript" src="pnf_404_animation.min.js"></script>
3. Lastly you need to add some more JavaScript, which will set the properties of the animation like colors, speed, stroke width, etc. and run the animation. In this portion you will also need to include two functions, which handle the end animation event and the back button click event.
<script type="text/javascript">
var pnf_404_time_m = 120;
var pnf_404_s_letter_color1 = "#ffffff";
var pnf_404_s_letter_color2 = "#0bb5b5";
var pnf_404_o_letter_color = "#ff255f";
var pnf_404_button_color = "#ffffff";
var pnf_404_global_stroke_width = 2;
var pnf_404_stroke_color1 = "#ffffff";
var pnf_404_stroke_color2 = "#0bb5b5";
var pnf_404_shadow_color = "#000000";
var pnf_404_svg = "pnf_404_svg";//id of SVG object
function pnf_404_complete_handler(){
//PLACE SOME CODE HERE WHICH WILL BE EXECUTED AFTER THE ANIMATION COMLPETES
}
function pnf_404_back_button(){
//CLICK HANDLING FOR THE BACK BUTTON
window.history.back();
}
window.onload = function(){
pnf_404_page_not_found_animation(
pnf_404_svg,
pnf_404_time_m,
pnf_404_s_letter_color1,
pnf_404_s_letter_color2,
pnf_404_o_letter_color,
pnf_404_button_color,
pnf_404_global_stroke_width,
pnf_404_stroke_color1,
pnf_404_stroke_color2,
pnf_404_shadow_color
);
};
</script>
Features
- Responsive behavior.
- Transparent background.
- Visual Builder tool that helps you create an unique look of the animation.
- Infinite color combinations for the letters, stroke, shadow and back button.
- Ability to set animation speed.
- The animation itself features: path morphs, masking, filters, translation along path, drawing of path, etc.
Changelog
RELEASED [28 JUL 2015]| Type | JavaScript Script |
|---|---|
| Author | chrisdean |
| Category | Javascript / Animated Svgs |
| Price | $6 |
| Sales | 8 |
| Published | Jul 27, 2015 |
| Last Update | Feb 2, 2021 |
| Compatible Browsers | IE9, IE10, IE11, Firefox, Safari, Opera, Chrome |
| Compatible Software | Other |
| Source Files Included | JavaScript JS, HTML |
| Video Preview Resolution | 1280x720 |
Categories
Tags
External listing. code.market does not sell this product and does not process payment for it. Pricing, payment, delivery, licensing, refunds, and support are handled by the third-party merchant on its own website. We may earn an affiliate commission from a referral. Details.
Products of the Week.
Submit🥇
Free LinkedIn Likes From Real Members | LinkedInLikes
Get free LinkedIn likes on your posts from real members who react by hand. No password needed: you only share a link.
Website · 12,847 views · 46 clicksWebsite · Week 49 · 12,847 views · 46 clicks
🥈
Free Medium Claps From Real Writers | MediumPlace
Free Medium claps on your stories from verified accounts of real writers, each given by hand. No bots, no Medium password, nothing to pay. Paste a link.
Website · 7,964 views · 10 clicksWebsite · Week 49 · 7,964 views · 10 clicks
🥉
Free GitHub Stars From Real Developers | GitWow
Get free GitHub stars on your repository from real developers who star by hand. No token or password, and it's free.
Website · 15,624 views · 28 clicksWebsite · Week 49 · 15,624 views · 28 clicks
#4
Free Substack Likes From Real Writers | StackRooms
Free Substack likes on your posts and Notes from verified accounts of real writers, given by hand. Free to ask, free to receive. Just share a link.
Website · 7,784 views · 2 clicksWebsite · Week 49 · 7,784 views · 2 clicks
#5
Free Twitter Likes From Real People | SupaTwitter
Free Twitter likes on your tweets from verified accounts of real people, each given by hand. No bots, no Twitter password, nothing to pay. Paste a link.
Website · 7,679 views · 4 clicksWebsite · Week 49 · 7,679 views · 4 clicks
#6
Free X Likes From Real People, Given by Hand | XFast
Free X likes on your posts from verified accounts of real people, each one given by hand. No bots, no X password, no conditions. Paste a link to start.
Website · 7,591 views · 0 clicksWebsite · Week 49 · 7,591 views · 0 clicks