Create a URL button in flash AS3

0

If you need a banner to have a button that when clicked takes you to another webpage when you click the flash button this is how you do it. You need to create a button (in this case a transparent rectangle on top of a web banner animation), add an event listener(a mouse event/click) and create a function (in this case the function is to request a URL and navigate to it).

1/ Press F8 to convert a rectangle into a symbol, create button and name it myButton.
2/ Click on the button in the main timeline and press F9 to open the actions window.
3/ Use this code to create an event listener and a function for after the click event.
You can use…
“_blank” or “top” to open in a new tab
“_parent” or “_self” open in the same tab


myButton.addEventListener(MouseEvent.CLICK, myButtonFunction);
function myButtonFunction(event: MouseEvent) {
var request:URLRequest = new URLRequest("http://www.pmlmedia.co.uk");
navigateToURL(request, "_self");
}

map

Add a Google Map into your web page

0

1/ Use Google maps to find the longitude and latitude of the address you want to map – when the map pin is in the middle of the screen, paste this code into your browser…

javascript: void(prompt('',gApplication.getMap().getCenter()));

2/ generate a google maps API key. If you’ve got more than one map in your site, don’t just genereate a key for your domain name, use the full location of the directory e.g. pmlmedia.co.uk/testwebsites/newsite1/

3/ Edit this code with your newly generated API key, longitude and lattitude, and address (for when someone clicks on your map pin) then paste the edited code into the head of your webpage.

<script src="http://maps.google.com/maps?file=api&v=2&key=REPLACETHISTEXTWITHYOURAPIKEY&sensor=true" type="text/javascript"></script> <script type="text/javascript">// <![CDATA[
/* <![CDATA[ */

    function initialize() {
        if (GBrowserIsCompatible()) {

            var a = REPLACETHISTEXTWITHYOURLONGITUDE;
            var b = REPLACETHISTEXTWITHYOURLATITIDE;
            var zoom = 16;
            var html = '

<div class="htmlwindow">
REPLACEWITHNAMEOFBUSINESS
REPLACEWITH1STLINEOFADDRESS
REPLACEWITH2NDLINEOFADDRESS<'+'/div>';

            var map = new GMap2(document.getElementById("map_canvas"));
            map.setCenter(new GLatLng((a+0.001), b), zoom);
			map.addControl(new GSmallMapControl());
			//map.addControl(new GMapTypeControl());
 			map.enableScrollWheelZoom();

            var marker = new GMarker(new GLatLng(a, b));
            GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); });
            map.addOverlay(marker);
            //GEvent.trigger(marker, "click");
        }
    }
    /*  */
// ]]></script>

4/ Paste these event functions into your opening body tag…

<body onload="initialize()" onunload="GUnload()">

…and create a DIV wherever you want your map to appear and set the width and height for your map.

 <div id="map_canvas" style="width: 529px; height: 300px"></div>
infographiclarge_v2

SO YOU NEED A TYPEFACE

0

A cracking idea by 22 year old graphic designer and student Julian Hansen. When things get a bit serious, ridiculously complicated infographics always lighten the mood.

Face choices are based on the top 50 from http://www.100besteschriften.de/

banner-noblur

Create a blur mask in Photoshop [Part 1]

1

Quick and dirty way of adding depth of field to an image is by creating a gradient blur effect using a blur mask, levels and the gradient tool…

(more…)

Untitled

PDF to Word Convertor

0

(more…)

Go to Top