View Full Version : attaching Javascript to Flash button in Dreamweaver.

08-22-2003, 01:59 PM
Hello all.

As stated I'm trying to add a javascript to a Flash button but I'm not exactly sure how to, by hand or via dreamweaver ultradev. I already have a popup on my site from a link so I know how to do them, it's attaching them to Flash buttons that confuses me.

javascript:popUp('http://www.whatever.html') is what I've put for the link for the flash button + I have the necessary code in the <head> tag but a regular sized window opens with javascript:popUp('http://www.whatever.html') in the location bar, and it says that the page cannot be found. If anyone would be so gracious as to tell me what I am doing wrong it would be greatly apprecitated. Thank You in advanced.


08-22-2003, 02:06 PM
^ I think you all know what goes there in place of the smiley face! it's : P without the space. Oops!

08-22-2003, 05:34 PM
In DreamWeaver UltraDev you should be able to click on the flash button in your window, and, in the behaviors panel on the right hand side, click the '+' button and add any javascript element they let you. Did you try that?

08-22-2003, 08:05 PM

I didn't think additional behaviors could be applied to Flash text via Dreamweaver. So I figured it would be possible to do it manually. the article says I could apply more behaviors with Flash, but I don't have flash and was looking for a work-around. But thank you so much bradyj for taking the time out to even read and reply, I really appreciate it.

08-22-2003, 08:47 PM
You're more than welcome!:thumbsup:

Hmm... that is unusual, but it does make sense. I know I can use ActionScript in Flash to do similiar things, but I was unaware that the <embed> would not work otherwise with javascript.

Are you on a PC or Mac?

Any of you JavaScript junkies know if there's a work around?

09-05-2003, 07:42 PM
Try this code:

on (release) { getURL("javascript:var mypopup = window.open('http://www.google.com','mySite','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizab le=1,width=500,height=300,top='+eval((screen.availHeight - 300) / 3)+',left='+eval((screen.availWidth - 500) / 2));mypopup.focus();"); }

09-05-2003, 10:16 PM
Kev@DDN, thank you for replying. I will keep that code for future reference but since my post I have scrapped the idea of adding popup windows to Flash buttons. lol, I couldn't figure out, but now I have a completely new layout devoid of the buttons period.. But thank you so much for helping, whether the code works or not, I really appreciate your time.

09-05-2003, 10:20 PM
Originally posted by supernova82
Kev@DDN, thank you for replying.

np feller ;)