Link to home
Start Free TrialLog in
Avatar of Tezdread
Tezdread

asked on

SWF Button that will open a new browser window and resize, remove menu, toolbar etc

Hi, I've not really used Flash but know that if I'm to achieve what I'm trying to do this is most likely the only thing that will do it.

I have a myspace.com account and the profile page is customisable to a point. DHTML/HTML and CSS are allowed but Javascript is disabled and not allowed. Also the IFrame and Object tags in HTML are not allowed. I can however use the Embed tag to Embed SWF files.

So, is it possible to have an SWF file that I Embed into the HTML without using any of the above restrictions that would allow me to open a new browser window, resize it, remove toolbar, menu, address bar etc?

I'm only putting 20 points into this post as I don't expect a soloution but if you think it's possible and you could provide all the help I need I'll post another thread with as much points as I can.

Thanks in advance
Avatar of Dushan Silva
Dushan Silva
Flag of Australia image

As I know, we cant not do with only Flash. We should use Flash with Java script.

BR Dushan
Avatar of Tezdread
Tezdread

ASKER

But can the Javascript be added into the Actionscript for the button and therefore remove the need to have any Javascript in the HTML page? The problem isn't using Javascript it just can't be in the HTML page. So if the Javascript can be put in the Actionscript and then the whole Flash file save as an SWF file this could be embeded into the HTML and resolve the issue.

I saw somewhere else that this 'might' be possible using Actionscript and getURL or ExternalInterface but like I said I don't really know Flash and certainly don't know anything about Actionscript :-/

Thnaks
We can use JavaScript inside our Flash Action scirpt. You can have an idea from following video.

http://www.kirupa.com/developer/flash8/video/popUpWindows.htm


BR Dushan
Thanks for that. The problem with that is that it still has the Javascript in the HTML which will not work.

Can the Javascript be embeded into the Actionscript so that there is no Javascript in the HTML?
Hi Tezdread.

Flash has a function called getURL. It can create a new window, but without Javascript, I'm afraid you can't resize, remove the toolbar, etc.
But it's a good place to start:

getURL("http://www.someplace.com/blah.html", "_blank");

That will pop a new window. See the Flash help page for more info.

Gav
Thanks muxxter. the thing is, getURL("http://www.someplace.com/blah.html", "_blank");
is no different that having a standard HTML link using the target="_blank"

If I was to have a working Javascript that opens and resizes a browser window using HTML, would this Javascript be able to be removed from the HTML page and inserted directly into the Actionscript and perform the same operation?

If I can't use Javascript in the Actionscript then what I'm trying to achieve isn't going to be possible...
ASKER CERTIFIED SOLUTION
Avatar of muxxter
muxxter

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ah that's sound I'll give you the 20 points because that perfectly answers the question! and will start a new post with my remaining points because I'm gonna need some help in getting this to work. I have tried but I get errors and when I click the button in the browser nothing happens...thanks again!