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

x
?
Solved

Alternative for GetURL function

Posted on 2004-09-14
6
Medium Priority
?
551 Views
Last Modified: 2008-03-10
Hi There,

I've a flashmovie in which I want to use a button with a relative path to open a document.
I've tried the following:

on(release)
{getURL("../Glossary/Glossary1.html","_blank");}

This works fine when I publish my FLA file to HTML but it doesn't work when I publish it to SWF.

Perhaps this is because the function is getURL and the relative path isn't an standard URL like http://.
When I change the relative path to:

on(release)
{getURL("http://www.google.com","_blank");}

it works fine in HTML and SWF.

I need to work with relative paths in mij SWF file. Any Ideas? Perhaps an alternative method for get URL???

Thanx in advance!

Geerd
0
Comment
Question by:Geerd
3 Comments
 
LVL 10

Expert Comment

by:muso120999
ID: 12054806
Looks like you are right about needing the full path - I guess it's a security thing.   You could try something with fscommand("exec" ... I guess.
0
 
LVL 4

Accepted Solution

by:
mrdilliard earned 372 total points
ID: 12058654
Hmmm...i tried it for myself and it worked for me. Here's my code:

mcButton.onRelease = function() {
      getURL("../some_file.htm", "_blank");
};

It's not much different from yours though. I know this seems obvious, but I would check to make sure you're pointing in the right place. According to your code, you need to move up one folder in the directory from where your flash movie is running, then to another folder named Glossary, and inside that folder to a file called Glossary1.html

Is that right?
0
 
LVL 16

Assisted Solution

by:vickerleung
vickerleung earned 368 total points
ID: 12061167
You may also try to use Javascript inside Actionscript

on (Release)
{
     getURL ("javascript: window.open (url, name, features)");
}
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question