GetURL function
Hi,
I am trying to work out how or if I can resize a browser
window to a preset size for example 800 x 600. I have an FAQ
application and when the user clicks on video tutorial a swf is
displayed. The swf was made using Captivate and has a resolution of
800 x 600.
At present when you click on the button it displays the
tutorial in a full browser window, which depends on the users
screen resolution. I want to force the new window to open the swf
at 800 x 600 without having to embed the swf into an html page. The
site this app will be loaded onto is content management site and do
not want too many managed files created, which will need to be
maintaining (if I embed the swf to a html page I will need to
upload the swf and the html page). However if I can force the new
browser window to the correct size I will only need to upload the
swf.
Hope I have explained this well enough and I look forward to
any assistance.
i guess the SWF has to be in a HTML file or it is not
possible for the browser to "get" any command. i mean with a
javascript in the HTML file when the SWF is embedded you could
resize the browser window, but without HTML, no javascript, no
direct communication with the browser.
Similar Messages
-
Hello ActionScripters,
I have a series of html files with embedded flash content.
I have one html file with embedded flash, that always opens a
new browser window
when a button is clicked. I always want the button, when
clicked to open the next html file (along with its embedded flash
file) to open in the same browser window.
I am using Windows XP, Flash 8 (and Flash CS3).
The button is really a movieclip that when clicked calls the
getURL() function. I am using _self as the parameter for the
function as well as the
http://www.myflashpage.com/coolFlash.html
(etc).
I have other html files where the getURL functions correctly,
and opens the next page in the same window.
But there is a difference between these pages. In the page
that does not work, I create an empty movieclip container, and then
attach the movie (in this case the button as a movie clip) to the
container. There is more than one movieclip container. The button
is clickable in the container (I use swapdepth to put container on
top, etc).
On my other html files I do not have the button (a movieclip)
on any layer (aka container) other than the top layer. The button
works fine this way, using _self as the parameter.
Any ideas on how I can get my attachmovie version to work??
Thanks,
eholz1Hello All,
Thanks for the reply. I have attached some code for the
button, etc.
I have "found" a workaround of sorts (forgetting my lack of
ActionScript codeing know-how).
When I leave the "_self" off the getURL function, I stay with
the same browser window (tested with IE 6).
Thanks,
eholz1 -
Hello, i am designing a site in dreamweaver, with a flash
intro screen.
site
www.ciplastering.co.uk
I have added action script to the movie button i have
created, to point to the www.ciplastering.co.uk/home.htm page, but
it does not work. The muroon square you see is the button, and i
have added the getURL funtion ontot he same keyframe as the
rollOVER and rollOUT funtions - any ideas as to why this does not
work ???
thanksactionscript code error.
you have:
onRelease = function ()
getURL("
http://www.ciplastering.co.uk/home.htm");
it needs to be
square_mc.onRelease = function ()
getURL("
http://www.ciplastering.co.uk/home.htm"); -
GetURL function - PDF not opening on a PC on first click.
Hi there!
I have a simple Flash button with the following script attached:
on (release) {
getURL("http://URL/sample.pdf", "_new");
And I've also tried this:
on (release) {
getURL("http://URL/sample.pdf", "_blank");
...and my client (Who uses Firefox, on a PC) has to click on the button twice to view the PDF. The first time they click on the button, they have to close the blank window that pops up and then click on the Flash button again to view the PDF. It opens fine the second time. Is this just a PC problem? On my Mac (Safari) it works fine, but (Firefox) seems to want to save the document before I can view it.
Thank you,
CamHi,
The issue does not seem to be with flash instead it is probably the browser settings on how to handle the PDF files.(you can check this by opening the URL directly in your Firefox browser and see how it behaves) It looks like the browser settings for acrobat is different in the Firefox browser you are trying to view. Please go thorough the below link and see if any of the discussions/solutions that help you rectify the problem.
http://www.bnl.gov/itd/webapps/pdf_help.asp
Thanks! -
GETURL is not working in flash player 9.0.124.0.
Dear Friends,
My swf and my html are in different domain so i got a issue
in GETURL function , It is not working in flash player 9.0.124.0.
in IE browser so that i add one parameter like allowScriptAccess
=always then its working fine.but my question is what will happed
if they will introduce any new flash version in future please tell
me what is the permanent solution for this issue.
ThanksThere is no way to know what will change in the future. This
is the solution that works now. It will probably remain in place
for the reasonable future. -
Using getURL to access network files
I am working on an Intranet site and I need a button in Flash
to open a file that's on our network share. I know about the getURL
function and use it often to link to HTML files that are on the
same server as the web files, but I don't know how to use getURL to
open external files on the network:
example:
on (release) {
getURL("page1.html", "_blank");
page1.html is located on the webserver but contains a link to
\\server1\share1\document1.doc (server1 is a different server on
our network)
I want to eliminate the middle man and link directly to
document1.doc, but I don't know how to do that with getURL since
document1.doc is not on the webserver.
Thanks for any advice.I don't believe you can like directly to this file on your
network because of the security features built into flash which
will not allow network access such as this. -
Do Flash getURL links work when SWF is embedded in Director?
I’ve got a simple test rig that says no, the links
won’t work. Anybody get this to work?
My test rig has two buttons in Flash, one gets a pdf from a
remote server, the other opens a local PDF on my hard drive.
When played from the Flash player the local link works fine,
the remote link looks like it would work if I were willing to
change my security settings and restart.
When embedded in Director both links are inactive.
And, although this is not terribly relevant, when the SWF is
played remotely through a browser, the remote link worksYour Flash .swf is expecting to be housed in an HTML doc, and
so a getURL function is trying to reach out to the browser. When
you import your .swf into a Director movie, that Director movie is
taking the place of the browser window. So your function fails to
reach a browser. This is compounded if you are playing the .swf
from a Director projector as there's no browser immediately
available.
There is a simple solution. You can use the on getURL
me,string function in Director to intercept the url.
So, if your Flash movie has something like this:
myButton.onRelease = function() {
getURL("www.disney.com",_blank);
Then in your Director movie, write a behavior something like
this:
property thisSprite
on beginSprite me
thisSprite = me.spriteNum
end
on getURL me,link,target
gotoNetPage link,target
end
Then attach that behavior to the Flash sprite. -
I am using AS2 in Flash CS3. I am trying to simply us the
getURL to open a url in the same window. Does not work, it will
work if I use the "_blank" statement but I need it to open in the
same window. I have tried saving it as FP8 and 9 with no resolve.
on (release) {
getURL("events_home.htm", "_blank");notworkingadobe,
> I am using AS2 in Flash CS3. I am trying to simply us
the
> getURL to open a url in the same window.
That's the default behavior; it requires the least typing.
> Does not work, it will work if I use the "_blank"
statement
> but I need it to open in the same window.
To open in the same window, use "_self" to just leave that
second
parameter blank.
> I have tried saving it as FP8 and 9 with no resolve.
>
> on (release) {
> getURL("events_home.htm", "_blank");
> }
You can publish it much earlier than a Flash Player 8 SWF,
and it'll
work ... but you have to actually test it in a browser. If
you don't
already have a browser open, the getURL() function will
naturally have to
open a browser.
Publish your SWF, embed it in an HTML document, and test the
link from
there. If you get a security error warning, that's Flash
Player protecting
you from a "potentially unsafe" operation, because you're
testing from your
hard drive. Upload the HTML file and your SWF to a server,
and test from
there. Should work just fine.
David Stiller
Co-author, Foundation Flash CS3 for Designers
http://tinyurl.com/2k29mj
"Luck is the residue of good design." -
Hi,
I'm a bit stuck at the moment with using a button in Flash 8
to launch a new URL in the browser.
This is what i've done (after searching the web for answers):
- Created my button (yes, it has the proper "button" icon
- Selected the button and gone to Actions
- Turned on Script Assist
- I've added the getURL function for on (release) and entered
my URL (i've tried multiple URLs to see if that was the issue)
- Published the SWF
As I said, I launch the published Html file and click on my
button, but nothing happens.
I can't find any explanation for this. Can someone help at
all?
Really sorry if this is a really simple thing - I just can't
figure it out.
Thanks in advance for any help.
ChrisI would upload the .swf to a server somewhere, and test it
there. Sometimes local environments cause problems with getURL.
Also, pop-up blocker can cause issues. Check those when you get a
chance. -
Javascript calls via getURL not working anymore
After upgrading to flash player 9,0,115,0 a simple call like
getURL("javascript(alert'message')); doesn't work anymore on
Internet Explorer (it fails without any error in policyfiles.txt,
but it still work on Firefox). My IE version is 7.
I can't use ExternalInterface 'cause i need to publish as
Flash Player 7 AS2.0.
Any comment or suggestion?I have a similar problem. When running a local HTML file,
using IE7 and FP 9,0,115,0, all the getURL function calls cease to
work.
If I downgrade to FP8, still using IE7, everything works.
If I downgrade to IE6, still using FP9.0.115.0, everything
works.
If I load the HTML via HTTP (instead of local), using IE7 and
FP9.0.115.0, everything works.
If I use Firefox, with FP9.0.115.0, everything works.
So, the function calls fail only when the swf is contained on
a
local HTML file, using
IE7, and
FP9.0.115.0. The problem is, most of our customers have that
software profile, and all of them need to load the content locally
(its very heavy for network transmission).
All the getURLs are like this:
getURL("javascript:someFunction()");
We're setting the 'allowScriptAccess' to 'always'.
Also, if we put the OBJECT tag inside the HTML (instead on an
external JS file), the function calls still do not work. -
I am using two buttons with a getURL function. The
actionscript is set to open the url in a new browser window, which
works, however, when I have opened one of the URL's in a new
browser window, the second one opens in that same window, instead
of opening another window. Is there a way around this ? The code I
use is something like this:
forum.btn onRelease = function(){
getURL("url","_blank")
and
webwinkel.btn onRelease = function(){
getURL("url","_blank")
Any help appreciated. T.I.A.Use different window names....
e.g. change the second button to :
webwinkel.btn onRelease = function(){
getURL("url","_blank2")
} -
Passing get or post parameter with getUrl()
Hello I need to pass get or post parameter with getUrl, the
help say that:
firstName = "Gus";
lastName = "Richardson";
age = 92;
getURL("
http://www.macromedia.com",
"_blank", "GET");
but it dosen't work! I dont anderstan where I have to tell to
getUrl wicht variavle it have to send in the get? Where can I tell
to the getUrl function, the variables to send are firstName,
lastName and age, per example?
Thanks, can youI want to send the variables to an html page, but I don't
know how to do this? Can you help me please? -
I'm trying to use getURL to pass a value to another template.
I'm having no luck. the URL variable cfgridkey is "undefined".
<cfsavecontent variable="getRecord">
getURL('comment.cfm?cfgridkey=' +
searchResults.dataProvider[searchResults.selectedIndex]['COMMENT_KEY'],'_self');
</cfsavecontent>
<cfgrid format="flash" name="searchResults"
colheaderfontsize="10" colheaderalign="center" colheaderbold="yes"
height="210" onchange="#getRecord#">
<cfgridcolumn name="comment_key" header="Comment ID"
dataalign="center"/ >
<cfgridcolumn name="lastname" header="Last Name"/>
<cfgridcolumn name="firstname" header="First Name"/>
<cfgridcolumn name="comment_date" header="Comment Date"
dataalign="center"/>
<cfgridcolumn name="comment" header="Comment Preview"
width="400"/>
</cfgrid>
The grid is being populated with remoting. Would that make
any difference as to whether the dataProvider can be viewed by the
application?
Thanks.I would say the problem has to be that the value is not being
added to the url.
Is there a reason your still using cfsavecontent ?
To debug, I would do the following:
1. Put in an
Alert(searchResults.dataProvider[searchResults.selectedIndex]['COMMENT_KEY'])
To see if the value is being returned
2. Put in a hard coded value and see if this works
Let's assume a valid comment_key is "search", then
getURL('comment.cfm?cfgridkey=' + 'search';
How are you trying to access the value in the comment.cfm
page ?
I think by default it is URL.cfgridkey
You can also include the attribute of "post" or "url" in the
geturl function call.
On reading the doc's about geturl, I can't see anything about
a default value. So I would suggest putting it in
getURL('comment.cfm?cfgridkey=' +
searchResults.dataProvider[searchResults.selectedIndex]['COMMENT_KEY'],'_self',
'GET');
Ken -
Dear all how can I open a file on a cd rom using flash action
script with the geturl() function without specifying the name of
the drive?For example"E:\\Firas.ppt",I dont want to put the "E"
letter ing my url coz the cd rom drive may be using another letter
such as "F" and "G",Thanks for ur helpYou can assign simply as its parents folder.
No need to mentions the drive letter in all the cases.
Look , Consider this is your folder structure.
MyProject/Flash/Index.swf
MyProject/Flash/Files/(The files which in turn open by Flash)
In this case,
To open any files in the "Files" folder from Index.swf file,
You can use the
getURL("Files/YourFile.pdf");
If you want to open any files in the "Flash" folder means,
you can
directly give the file name as argument for getURL. -
GetURL issue on browser "interactive" mode
Hello all.
I'm having a hard time to show a webpage back on the browser,
after getURL is triggered to get it.
The environment is the following: Nokia N95, S60 3rd
Edition's web browser, Flash Lite 2.0.
Opening the mobile browser, I have a XHTML page, with a link
to a SWF. Upon clicking on it, the browser opens the Flash
Lite SWF properly (in the browser context - as opposite to
standalone - or more correctly even: "
interactive mode")
I'm seeing my very simple Flash application and I have a link
in a getURL on a movieclip
(see the code attached below)
Now, I know page is being accessed by the mobile browser in
the background - once i click the on the clip. However I can't see
it because my Flash Lite app is still visible on the screen.
How can I get to see the web page for which i called with
getURL in Flash?
Trying to come up with a solution, quitting the player by
adding fscommand2("quit"); right after the getURL call, seems to
immediately prevail as it actually closes the player, but doesn't
open the page before.
Does this means that it is not possible to click an object in
flash lite and view a webpage, when the player has been loaded in
browser context, rather than standalone?Thanks for your reply dietmar.
In my case I wish to have different links with different
URLs.
Say like 3: one for homepage, other for favorites and a last
one for user profile for example.
Whenever the user would push a distinct button, it should
open a distinct URL.
In your solution you will still need to close using
fscommand("Quit");
which represents another new click. The user should not need
to think that he must close Flash in order to actually view the
page that the browser has loaded in the background.
Someone, Adobe or Nokia should be responsible to handle this
faulty behavior. But my first guess would be that it is a Flash
Lite Bug.
Also I am not able to pass JavaScript commands via Flash Lite
2.0 getURL function, to the S60 3rd ed. browser. Note that this
browser can handle window parameters like "_blank". I was able to
simulate the behavior I wanted with XHTML and JavaScript.
Unfortunately not with Flash Lite 2 and XHTML.
Maybe you are looking for
-
Can't create a PDF using "print" from Office 2010 w/ Acrobat 9.5.1 installed
I've been working on a lengthy Word document for the past three days, upgrading most of the inserted images and straightening out the formatting. Converting the entire 180-odd page document every time I made a few updates is a bit time-consuming. I a
-
It started after upgrading Adobe shockwave, and I have used the Adobe remove tool and reinstalled and I have removed and reinstalled Firefox and it continues,
-
I cannot search the secondary TO, or CC field in apple mail
I cannot search the secondary receivers in the TO field in apple mail, or the CC field. The search function appears to not be working. Any suggestions?
-
I have seen some iBooks Author books where there are images places embedded integrated in the paragraphs, so they can be displayed both in vertical and horizontal orientations, but the text properly wraps around these images. According with my experi
-
Unable to handle fault thrwon by BPEL in ESB
hi , my bpel process(syncronous request&reply) is throwing the remote fault and my ESB process is not picking the fault even both fault schema are same. error message: <MSG_TEXT>An error occurred for port: BPEL_OC4J_SOAP_Provider: javax.xml.rpc.soap.