Hi, I would love any and all help.

Currently, I am loading a style sheet and a .txt file (which has the code below in it ) into my flash file. Its working fine but I would like to specify the window size it opens. Is this possible, and if so how?


info=<textformat leading="2"><p>
<span class="hilight">Classics</span><br>
<a href="1957Chevy/index.html" target="_blank">1957 Chevy</a></p></textformat>


Thank You In advance,
Apple Sauce

Dani AI

Generated

Short answer: yes — the browser API that lets you control size/position must run in the page's JavaScript context, not inside a stylesheet or a raw .txt blob that Flash is just rendering as text. pointed you toward the right mechanism, but putting that call into a CSS/.txt file that Flash displays will usually do nothing because Flash/text fields and stylesheets do not execute inline JavaScript event handlers.

Practical approaches:

  • If the link can live in the HTML that hosts the SWF, move the clickable element there and attach a script-level click handler that opens the new window with the desired features. Keep the open call tied to a user gesture so browsers do not treat it as a popup.
  • If the clickable content must be inside Flash, have Flash ask the page to open the window. In ActionScript 3 use the Flash-to-JS bridge so the browser runs the open call; in older AS2 projects the common fallback was a javascript: call from Flash. Also confirm same-origin rules and that the HTML/JS actually contains the opening code — stylesheets and plain .txt files will not execute scripts.

Troubleshooting checklist: verify the open call is in browser JS (not a stylesheet), check the console for errors, test with popup blockers disabled while debugging, and test in multiple browsers. For API details and the feature-string options used by the browser, see the Window.open documentation on MDN: Window.open (MDN).

I just use this command to specify the window properties:
<a href="" onClick="window.open('sample.asp','MYWindow','toolbar=no,width=600, height=300,left=20,top=100, screenX=500,screenY=200,status=no, scrollbars=yes, resize=yes, caption=no'); return false">This is a sample</a>

Filipina,

Thank U, but unfortunately (ugh) its still not working. What Im doing is putting the code into a CSS .txt file --would i need to put any code into the head of the html. doc, maybe?

Tx!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.