Solved

Alternative for GetURL function

Posted on 2004-09-14
6
529 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.

821 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