First off hi all,
This is probably simple to someone but I'm stuck.
I created a button on a flash movie, .swf, insert it into a webpage created in Dreamweaver, the idea is when the button is clicked, a new browser window opens to a size of 600 x 600, no scroll bars to toolbar, just a way to close it. The browser will just contain a simple .jpg image of a map.
Now I've looked at heaps of sites and tried the following actionscript.
on (release) {
getURL("javascript:openNewWindow( \mysite\pictures\simple.jpg, height=600, width=600, toolbar=no, scrollbars=no );");
}
The above opens the browser and immediately closes again?????
As you can also see it's a relative site not an absolute site. It works fine if I use just getURL without the javascript stuff eg:
on (release) {
getURL("\mysite\pictures\simple.jpg", "_blank");
}
However it opens a new window "which is what I want" but it's obviously not sized to 600 x 600, and has scrollbars toolbar etc.
What am I doing wrong? I am TOTALLY new to FLASH and actionscript, and I am now more confused than ever, so your help would be appreciated
Hope all of the above makes sense!
Thanks in advance.
10 2771
Hey, welcome to the scripts.
Try this on for size: -
var jscommand:String = "window.open('http://www.adobe.com','win','height=200,width=300,toolbar=no,scrollbars=yes');"; getURL("javascript:" + jscommand + " void(0);");
-
Thanks Kestrel,
It worked when I remembered to include the 'on release'
and {}. However I found I had to use the full WWW address, it wouldn't work with a relative address and also, It doesn't go right up into the corners. Leaves a gap at top of window and left side. Anyway of correcting that?
Thanks again!!
Are you talking about the new window when it opens?
Sorry for the late reply,
yes when the new window opens to the size I set 600 x 600, the .jpg which is also 600 x 600 is not right up into the corner of the window there's a few pixels gap at the top and the left side of the image.
Also I noticed in IE7 browsers there's a drop down box that shows the full address of the .jpg. Anyway of fixing the 2 above issues?
Many thanks in advance.
can i see your exact actionscript code, aswell as the html in your pop-up? that would help alot.
did you make sure that all your css styles are defaulted? on the page you are opening, put this in there
<style>
*, html {
border: 0 px;
padding: 0 px;
margin: 0 px;
}
</style>
obviously, remember to put these style tags in the html before you create the image. aka put them inside the <head> ... </head>
Ok, so i created a pop up, and i also had that white space in the corner.
Your html popup page just has an image in it right? with <img />
Heres what i did - <img alt="" src="http://www.guitarzone.com/w-images/d/de/Pink_floyd_darkside.jpg" style="position: absolute; top: 0px; left: 0px;" />
That squares the image right up to the corner
Great thanks for your assistance everyone. And again so sorry for the tardy replies I don't have a heap of time to visit the site much.
Thanks again for ALL your time it is very much appreciated!
No problem, Just glad i could help
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Pieter |
last post by:
Hi,
I've a activex browser control in a form. I've added proxy server
support to the control by modifying the proxy server settings in the
registry. This works fine before the browser control is...
|
by: michal2 |
last post by:
Is there any way to have the referring field blank when using the
GetURL command?
|
by: therefor |
last post by:
I have the following in Flash 8
BriefLook_mc.btnStudentLife_mc.onRelease = function():Void
{
this.createEmptyMovieClip("craveLoader_mc", this.getNextHighestDepth()); ...
|
by: camphor |
last post by:
hi,
I am getting this error message when using getURL
**Error** Symbol=contact, layer=text, frame=1:Line 1: Statement must appear within on handler
email_btn.onRelease = function(){
Total...
|
by: Atran |
last post by:
Hello EveryBody, I am new to ActionScript.
I make to my flash page a button, I want make the button open a web using getURL commnad.
See this code:
button1.onRelease = function(){
...
|
by: neliy |
last post by:
hello there. Well I actually have 2 small problems with getURL. I need to connect a button with a web site an my code looks like this:
on (release) {
getURL("http://www.blahblahblah", "_blank");...
|
by: streammalvern |
last post by:
I'm working with a client's site where I have the header created in flash. The site is hosted by a third party and I have sent them the code for the flash header, which is hard coded to look for the...
|
by: cstansbu |
last post by:
This is the item selection piece for a Sharepoint knowledge base. If you type a valid plan code you get info, but if you type garbage you get a 404 file not found. I want to check user input against...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |