Go Back   CodingForums.com > :: Client side development > Flash & ActionScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-22-2003, 12:59 PM   PM User | #1
supernova82
New to the CF scene

 
Join Date: Aug 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
supernova82 is an unknown quantity at this point
attaching Javascript to Flash button in Dreamweaver.

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.

javascriptopUp('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 javascriptopUp('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.

Chryssi

Last edited by supernova82; 08-22-2003 at 03:18 PM..
supernova82 is offline   Reply With Quote
Old 08-22-2003, 01:06 PM   PM User | #2
supernova82
New to the CF scene

 
Join Date: Aug 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
supernova82 is an unknown quantity at this point
^ I think you all know what goes there in place of the smiley face! it's : P without the space. Oops!
supernova82 is offline   Reply With Quote
Old 08-22-2003, 04:34 PM   PM User | #3
bradyj
Senior Coder

 
Join Date: Apr 2003
Location: San Francisco, CA
Posts: 2,469
Thanks: 0
Thanked 0 Times in 0 Posts
bradyj is an unknown quantity at this point
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?
__________________
// Art is what you can get away with. <-- Andy Warhol
...:.:::: bradyjfrey.com : htmldog : ::::.:...
bradyj is offline   Reply With Quote
Old 08-22-2003, 07:05 PM   PM User | #4
supernova82
New to the CF scene

 
Join Date: Aug 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
supernova82 is an unknown quantity at this point
http://www.macromedia.com/support/dr..._behaviors.htm


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.
supernova82 is offline   Reply With Quote
Old 08-22-2003, 07:47 PM   PM User | #5
bradyj
Senior Coder

 
Join Date: Apr 2003
Location: San Francisco, CA
Posts: 2,469
Thanks: 0
Thanked 0 Times in 0 Posts
bradyj is an unknown quantity at this point
You're more than welcome!

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?
__________________
// Art is what you can get away with. <-- Andy Warhol
...:.:::: bradyjfrey.com : htmldog : ::::.:...
bradyj is offline   Reply With Quote
Old 09-05-2003, 06:42 PM   PM User | #6
Kev@DDN
New Coder

 
Join Date: Sep 2003
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Kev@DDN is an unknown quantity at this point
Try this code:

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,resizable=1,width=500,height=300,top='+eval((screen.availHeight - 300) / 3)+',left='+eval((screen.availWidth - 500) / 2));mypopup.focus();"); }
__________________
http://www.dotdragnet.com
http://www.kevinleitch.co.uk
Kev@DDN is offline   Reply With Quote
Old 09-05-2003, 09:16 PM   PM User | #7
supernova82
New to the CF scene

 
Join Date: Aug 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
supernova82 is an unknown quantity at this point
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.
supernova82 is offline   Reply With Quote
Old 09-05-2003, 09:20 PM   PM User | #8
Kev@DDN
New Coder

 
Join Date: Sep 2003
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Kev@DDN is an unknown quantity at this point
Quote:
Originally posted by supernova82
Kev@DDN, thank you for replying.
np feller
__________________
http://www.dotdragnet.com
http://www.kevinleitch.co.uk
Kev@DDN is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:08 AM.


Advertisement
Log in to turn off these ads.