Welcome, Have a Great Weekend


Dynamic Buttons - with external button text & links

Create button text & links from an external text source. (swishmax tutorial)

Use the above generator to simulate changing the text file, this will give you an idea how the buttons will work at the end of this tutorial. Add button text such as Home, Google etc and then the page you would like the button to open such as http://www.swish-designs.co.uk or http://www.google.com etc, once you have done that click the generated button to see it work.

First Of All

Open up swishmax set the stage width and height, for the sake of the tutorial i have chosen a width of 285px x 62px and the frame rate is set to 25 fps.

Step.1

Lets create a button template that we can duplicate for as many buttons as you want in your project.
Using the beveled button from the autoshapes library see Fig.1 below

drag out a shape for your button that looks something like Fig.2 below.

Step.2

Using the text tool drag out the text area to cover the button you have just created,
Name the text Dynamic_Link, mark it as a target and give a variable name of button1 and centered text.
see Fig.3 below for settings.

now group the button shape and the text box together as a button, name the button Link1.
highlight the button and check the following located under the button properties.
Has seperate over state
Has seperate down state
Use bounding box for hit-state
See Fig.4 below.

on the Over State of the button select the text and change its colour to black,
on the Up/Hit State of the button select the text and change its colour to White.
finally on the Down State of the button select the text and change the colour to black.
Now select the button shape on the Down State action and right click on it
select transform and the click flip Horizontal right click on it again and select transform and select flip Vertical. you shuold now have something looking and acting like Fig.5 below.

Step.3

on Scene_1 copy and paste the following code into it

onFrame (1,afterPlacedObjectEvents) { this.loadVariables("setup.txt"); }


and on the button copy and paste the following code

on (release) {
getURL(link1); }


Step.4

Now open up Notepad or your favourite text editor, and type the following into it.

&button1= Home
&link1= http://www.swish-designs.co.uk

and save as setup.txt
save your current project and export as Swf & Html
press Ctrl+T, this will test you project in your browser
you should now have something like Fig.6 below.

Latest Submissions

Site Overview

swish-designs.co.uk
relies on donations and purchases from users
to enable too keep this site running. as the site has grown in its content and reputation so has the cost of keeping this site going, thank you to all who help and have helped me achieve this goal. still many files are offered for free in the download center to help others learn and understand swishmax.
however files that acompany tutorials have a download fee as do shop files which help towards the the sites running costs, happy swishing.


Contact Me

You can use the following information
to either find or contact me.

Blog:www.loweonline.co.uk
Facebook: Facebook Group
E-mail: craig@swishdesigns.co.uk

Find Me At

Swishzone:Find Me There
Loweonline: Find Me There