473,387 Members | 1,365 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

getURL and browser settings

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.
Aug 7 '07 #1
10 2771
kestrel
1,071 Expert 1GB
Hey, welcome to the scripts.

Try this on for size:

Expand|Select|Wrap|Line Numbers
  1. var jscommand:String = "window.open('http://www.adobe.com','win','height=200,width=300,toolbar=no,scrollbars=yes');"; getURL("javascript:" + jscommand + " void(0);");
  2.  
Aug 7 '07 #2
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!!
Aug 10 '07 #3
kestrel
1,071 Expert 1GB
Are you talking about the new window when it opens?
Aug 10 '07 #4
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.
Aug 12 '07 #5
kestrel
1,071 Expert 1GB
can i see your exact actionscript code, aswell as the html in your pop-up? that would help alot.
Aug 12 '07 #6
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>
Aug 12 '07 #7
obviously, remember to put these style tags in the html before you create the image. aka put them inside the <head> ... </head>
Aug 12 '07 #8
kestrel
1,071 Expert 1GB
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
Expand|Select|Wrap|Line Numbers
  1. <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
Aug 13 '07 #9
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!
Aug 17 '07 #10
kestrel
1,071 Expert 1GB
No problem, Just glad i could help
Aug 18 '07 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

0
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...
1
by: michal2 | last post by:
Is there any way to have the referring field blank when using the GetURL command?
2
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()); ...
1
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...
1
Atran
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(){ ...
1
neliy
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");...
2
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...
5
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...
0
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,...
0
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$) { } ...
0
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...
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
marktang
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,...
0
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...
0
Oralloy
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,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.