Solved

Alternative for GetURL function

Posted on 2004-09-14
6
519 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
Comment Utility
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
Comment Utility
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
Comment Utility
You may also try to use Javascript inside Actionscript

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

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
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 how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now