Page 1 of 1

Step by Step how to create a clickthru URL button for your swf adverts

Posted: Tue Nov 13, 2007 2:59 pm
by Perkdaddy
Hello world

It seems alot of people are new to flash and are having some problems adding click thru URL's for their swf (flash) adverts on the Joomla Core Banner component. Though this isnt a fix or hack to the component itself but a Step by step tutorial to create a button for your advert that will direct visitors exactly where you need them to go. I'm making a little movie for this and will be adding the download URL very soon. (TODAY I HOPE)

PART 1

What you need

1. The Flash advert or .fla file (FLA IS BETTER!!)  :P
2. Macromedia Flash 8
3. Sothink swf decompiler (if you don't have the fla file)

Step one: TRY your hardest to get the fla from your advertising client or MAKE them add the URL redirect themselves, if not use Sothink swf decompiler and extract their fla file from the movie.

2. Now that we have the .fla file, open it in macromedia flash 8

3. Now that its open, click "Insert, new symbol or ctrl+F8"

4. A window will pop up: Now leave the name symbol 1 in place, and make sure that you're creating a new button and click "OK"

5.After that it will bring you to an edit button screen, and right click the "UP" frame and add a "keyframe", do this for all 4 frames in the button.

6. Then click no colour icon on the bottom of the left toolbox and click the rectangle tool (make sure your also editing on the "UP" frame again)


7. Make a huge (bigger then your advert) clear box and do it again for the "over" frame

8. Now click the "down" frame and choose the colour white and make a big WHITE rectangle (this is so visitors can see that the click registered with the advert, this is clearly aesthetic and not necessary, but you must have a rectangle there, clear or colored) 8)

9. Now click the hit frame and put a different colour box (i use blue, but it can be any colour) Now that you have a box for every frame You have made the button so now click scene 1

10. Go to where the layers are located (upper left) and right click any one of them and "Insert layer", name the layer something you'll remember

11. Next look at your library on the right and grab the button you made "symbol 1" and drag it over your advert. Make sure the new layer you created is still highlighted

12. Place the button over you advert making sure the whole advert is covered

13. Next click the very first frame of your new layer, once you have done that go to the actions frame button/window area in the lower left and click it

14. Now its time to add your "action script" that makes the button work

15. Click the "script assist" button on the left side of your action script editor window

16. then click the little + plus sign on the upper left of the action script editor window

17. follow this tree (see attachement 1) 8)
      1. actionsscript 2.0 classes
      2. Movie
      3. Button
      4. event handlers
      5. on Release
And click "on release"

18. The click the area that says "object" like your going to ad text to it then click the little crosshair icon near to the + icon

19. You'll get a small pop up window with a list in it, click the button you created earlier (symbol 1)

20. Then a warning window will pop up, so rename your symbol in that window to something like "button" or whatever

21. When that is done, in the object  text area it should say "this.button" and below it should say onrelease

22. Now click the plus sign again and follow this tree (see attachment 2)
      1. Global functions
      2. browser/network
      3. get URL

22. A now type the desired URL for the advert to direct people to.

the code will look like this

Code: Select all

this.button.onRelease = function() {
   getURL("http://www.sinaigrandcasino.com");
};


*Remember it will say your chosen url not mine

THATS IT  ;D You've done it

Now test your movie and see if it works and publish it in the joomla core banner component and now everyone that clicks it will go to your advertisers desired URL. I hope this helps someone out. I initially created a bunch of screenshots for this tutorial but I'm limited to only adding four of them per article, kinda a drag as I know some people might need the photos, but I'm adding the movie tonight (depending on my crap connection in Egypt).

Re: Step by Step how to create a clickthru URL button for your swf adverts

Posted: Sun Dec 09, 2007 6:32 pm
by freelancenow
Thanks for the tip, it is really simple and useful.

Re: Step by Step how to create a clickthru URL button for your swf adverts

Posted: Mon Dec 10, 2007 11:55 am
by Perkdaddy
Awesome... :)