Skip to main content
Participant
September 1, 2009
Question

Adding alert boxes to movie items with clickable links?

  • September 1, 2009
  • 1 reply
  • 653 views
Hi all, i currently have a movie (i'm no programmer and it was all "poke and hope" creating it) where i have an icon (image) and a block of text as a clickable button (locked together) the button takes you to a specific url
ActionScript Code:
on(release){     geturl("http://www.thecodecage.com/forumz/excel-forum/"); }
what i need to do is replace the geturl with some script that will add an alert box with 2 options (the reason is i've added more forums i.e Members-excel-forum and Newsgroup-excel-forum....there are many more like this), i would like the box to have a title something like "Where would you like to go from here?" then two text links "Members Excel" (which will take them to http://www.thecodecage.com/forumz/members-excel-forum) and "Newsgroup Excel" (which will take them to http://www.thecodecage.com/forumz/newsgroup-excel-forum), like i said i have many more to add but once i have the code and a "How to" i should be able to adapt it.

I will have to do this for each of the items (i'll have to unlock them first) there are 24 items in my movie (it looks like 12 as there is an icon and text locked together for each category) so i need to do this for 16 of them, if anyone knows a quicker way i'm all ears!

I say Alert box as this won't be bothered by a pop up blocker.

Regards,
The Code Cage
This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
September 1, 2009

you should create an "alert" box movieclip in flash that contains two button links.  those links can use variables that are defined by your button so one "alert" movieclip can be used by all your buttons.  attach that movieclip when your button is clicked.

if you want to create a modal alert box, add a background to your alert box that covers the stage and add a null mouse handler.  you can disable the mouse cursor.

Participant
September 1, 2009

Kglad, thanks for the reply........thats easy for you to say, could you explain how please?, like i said it took lots fiddling with things i have no clue on how to use to get as far as i did originally, now the movie is set i don't know how to change that.

A smarter way would be if the box that appears that has the two buttons could be generic but takes the url from the geturl, so for the example

ActionScript Code:
on(release){     geturl("http://www.thecodecage.com/forumz/excel-forum/"); }

if the Members button could take that url and add "members-" after "forumz/" and likewise for the Newsgroup it could add "newsgroup-" after "forumz" then the one "options" box would suffice for all of the categories i need, one other thing with that thought would be how do i get it to only show with the categories i want rather than all of them?

I can supply the .fla if you wish.

Regards,

Simon