PDA

View Full Version : Load popup window from external text file


busty
08-06-2003, 09:15 AM
Using Flash 5.

I want to spawn a customised popup window from a external text file but can't get the damn thing to work. Here is the part of my external text file that want to open the popup:

<FONT FACE="Verdana" SIZE="10" COLOR="#FF0000"><B><U><a href="contactform.html" target="sdpop" onClick="javascript:window.open('contactform.html','conpop' ,'width=300,height=300,scrollbars=yes');">contact form</a></U></B></FONT>



Does Flash 5 support this?
Am I typing it wrong?
Would I be better off using variable?
Why am I such an embicile.

Any help here would be greatly appreciated. I've checked the usual sites for tutes, and scan the search engines in the hope that there was something on this but could not find anything.

One last thing though this is not important. Can I get my external text file to tell Flash to do tellTarget actions?

busty
08-07-2003, 06:29 AM
I believe the origonal code didn't work because the swf file that was reading from the external .txt document was nested in level 2 of the base clip in the html page that had the javascript in the head content. It had no problem opening the window, but it wasn't parsing the javascript.

The way around this was to create an asfunction in the flash file, and then have the link in the external text file as follows:
<A HREF="asfunction:MyFunc">Contact Form</A>

This tell flash to carry out the function, which in this case was telling a movie clip in the base movie to goto and play a certain frame. This frame has the getURL action which containts the Javascript and has no problems parsing the Javascript in the HTML page it all sits in.


Yipeeeeeeeeeeeeeeeeeeeeeeeee.