Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: FLASH: Javascript help
From: Pete Benedict
Date: Tue, 14 Mar 2000 03:04:40 GMT

Cheri,

The way I understand this is done through JavaScript in the HTML of a page is
with the FSCommand, in which case, in addition to the newWindow() function, in
the page you also need to add the filename_DoFSComand function, which is used to
route your particular command to the proper function in the page:

function putNameOfYourSwfHere_DoFSCommand(command, args)
{
if ( command=="openWindow" ) {
newWindow();
}
}

and then in your button you have something like:

On (Release)
FS Command ("openWindow")
End On
(you could also pass the URL as in argument of the FS Command, say, if the URL's
going to change ...)

However, you probably don't need to go to such length is you just want to pop a
new browser window from a button in Flash.
Just use the pseudo-JavaScript right in the button:

On (Release)
Get URL
("javascript:window.open('http://members.home.com/advantagewebsolutions/singles/thisisit.htm","windowname",toolbar=0,scrollbars=0,resizable=0,height=350,width=600');")

End On

Hope this helps,

Pete Benedict
Benedict Design
http://www.bennyd.com
peteatbennyd [dot] com
(201) 659-0395



Cheri Harder wrote:

> OK, it is time I learn Javascript. I used the bloodykisses tutorial to open
> a new window. I put the
>
> <script language="JavaScript">
> <!-- function newWindow()
>
> window.open("http://members.home.com/advantagewebsolutions/singles/thisisit.
> htm","windowname",toolbar=0,scrollbars=0,resizable=0,height=350,width=600");
> } // -->
>
> </script>
>
> after </title> and before </head> in my HTML page with my main Flash movie.
> Within Flash, I put
>
> javascript:newWindow()
>
> in the URL window of the GetURL action and left the "window" box blank for a
> resultant code of:
>
> On (Release)
> Get URL ("javascript:newWindow()")
> End On
>
> Can't check it in IE because I'm using the 5.5 beta & javascript isn't
> working with that. Netscape gives me javascript error
>
> "JavaScript Error: [unknown origin]:
> newWindow is not defined. "
>
> Now, I know that newWindow is the name of the function I just created in the
> html document. What I don't understand is what is telling the Flash movie
> to look at the originating html page to find the function? Or, I guess,
> what is _supposed_ to be telling it to look there? Since it is not finding
> that function, I am assuming I've missed a major concept here.
>
> ~~~~Cheri Harder~~~~~
> charderatawsolution [dot] com
> Advantage Web Solution
> www.awsolution.com


flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and The Flash Film Festival
"The World�s Premier Flash Solutions Conference and Expo"
March 27-29, Nob Hill Masonic Center, San Francisco, California

-Register before Feb 25 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  Re: FLASH: Javascript help, Cheri Harder

Replies
  FLASH: Javascript help, Cheri Harder

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]