Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 324
  • Last Modified:

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
0
Tezdread
Asked:
Tezdread
  • 4
  • 2
  • 2
1 Solution
 
Dushan De SilvaCommented:
As I know, we cant not do with only Flash. We should use Flash with Java script.

BR Dushan
0
 
TezdreadAuthor Commented:
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
0
 
Dushan De SilvaCommented:
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
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
TezdreadAuthor Commented:
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?
0
 
muxxterCommented:
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
0
 
TezdreadAuthor Commented:
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...
0
 
muxxterCommented:
Yep.

In getURL you can put Javascript:

getURL("JavaScript:window.open('http://www.javascript-coder.com','mywindow','location=1,status=1,scrollbars=1,width=100,height=100');");

So, anything you can put in the open method, you can have Flash call.
0
 
TezdreadAuthor Commented:
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!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 4
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now