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
and on the button copy and paste the following code
getURL(link1); }
Step.4
Now open up Notepad or your favourite text editor, and type the following into it.
&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.
MY LINKS
Site Statistics
TOTAL: 87374
UNIQUE: 51401246
TODAY: 1819
About You
IP: 38.107.179.220
Town: Glendora
Country: US - United States
38.107.179.220
Flag:





