Solved

Alternative for GetURL function

Posted on 2004-09-14
6
527 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
6 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 93 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 92 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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

770 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