Forum Moderators: open

Message Too Old, No Replies

Opening URL from a stand alone swf file

         

pault

5:29 pm on Apr 2, 2005 (gmt 0)

10+ Year Member



I'm having problems getting a web site to open from a stand alone swf file. This would seem to be a simple thing, but it's not working and has me stumped.

Here's what needs to happen:

I have to put a web site on a CD, so the whole site will be localized on the CD itself. However, I don't want the user to have to go in and find the index file and open it manually. So I'm trying to create a simple Flash intro that will autorun and then jump the user to the local index.html file when it reaches the end frame. So all the user has to do is pop in the CD, the Flash file will run, and the web site will launch all by itself.

I'm using the "getURL" command in the Action palette, but it's not working. It launches the browser, but not the page. Here's the code:

getURL("index.html");
stop();

I've also tried:

getURL("index.html", "_blank");
stop();

Any clues as to why this isn't working? TIA

pault

5:48 pm on Apr 2, 2005 (gmt 0)

10+ Year Member



Further information -

I just tried a test on a CD just to see what would happen.

It ran the Flash file without problems, when it got to the last frame it launced my default browser and then I got an error saying that it couldn't find the URL "www.index.html"

Is Flash automatically putting the "www" in front of the URL? If so, how can I turn that off! Again, I don't need the link to go out over the web, the site will be included on the CD, it needs to launch the index page that's sitting right next to the swf file in the same directory.

thanks.

electricocean

11:31 pm on Apr 2, 2005 (gmt 0)

10+ Year Member



you need to use the on rease---


on (release) {
getURL("index.html", "_NEW");
}

I don't use flash that much but I think it'll work-

electricocean

pault

12:01 am on Apr 3, 2005 (gmt 0)

10+ Year Member



Thanks for the resonse, unfortuneatly, it didn't work.

I thought the "on release" would apply to a button action, not a frame action.

I don't want the user to have to click on anything, I just want them to be sent directly to the page.

eljaykay

5:12 am on Apr 3, 2005 (gmt 0)

10+ Year Member



Hi -
I've found that Flash won't open a local [any?] url from within the program or a published standalone - yet it works fine when embedded in an .html page!

Although not ideal, you might need to try that just to save yourself future headaches.

Good luck,
El

[I've used a nice & free prog. called Quick Menu Builder before when doing web designs for CD's - but the downside is that it won't autorun on a Mac, of course.]

rocknbil

4:19 pm on Apr 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



^ ^ Probably correct, but pault have you tried D:\path_to\index.html? Of course this relies on the CD-ROM being the D drive, but it would tell you if it could be done. If that works, you can look into windows scripting and play with the autorun configuration - there is a way to substitute a command for the drive letter (something like '%CDROM%\yourfile.html' - sorry, that's not correct but it's something like that, it's been a long time . . .)

Another plan of attack is instead of auto-loading the Flash - auto-load a web page with the flash in it, then you will be able to communicate with the page from Flash via Javascript using FScommand. When the Flash is done tell the page to redirect to the other HTML page - that would work for sure! :-D

pault

5:27 pm on Apr 4, 2005 (gmt 0)

10+ Year Member



If I can get the autorun to work on the html file, I might not need to use the Flash at all. The goal is to get to the site, I was just using a Flash intro because I knew I could get it to work with the autorun.

Thanks for the suggestions. I'll see what I can work out.
Paul

pault

7:02 pm on Apr 6, 2005 (gmt 0)

10+ Year Member



Autorunning the index file didn't work. Not even when trying the "D:\index.html" attempt. I get an error saying that "D:\ is not a valid Win32 application..."

I'm starting to wonder if this is possible at all. I couldn't even get a button to open the page in the Flash on the local drive or even to a live web site.? And I know that's possible, because I've done it before. However, not on a stand alone swf file. But even if I've never done that, I've seen it work. (sigh...)

I'm back to square one. Anyone else have a suggestion? TIA

rocknbil

6:11 pm on Apr 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I hate to point you to this frustrating resource, but have you been to the microsoft site to search for autorun? You should be able to script a method to locate the default browser, launch it, and open the index.html file. Don't give up, I KNOW this can be done, I just don't remember the specifics.

Another way is to find a demo that does what you want and pick it apart, see how they did it and emulate the methods.

eljaykay

2:18 am on Apr 20, 2005 (gmt 0)

10+ Year Member



Hi -
Thwack! [Shoe on head...]
I totally forgot - you need to use a relative path when opening files on a CD when you cannot be sure of the end user's drive letter!

Try:
"\index.html"
and place it it the correct location from the file you're opening it from...

Or - have you found another solution yet?

El

Jben

3:26 pm on Apr 20, 2005 (gmt 0)

10+ Year Member



I've got the same kinda problem: from a standalone flash movie on a cd, i'd like to open a directory (in a windows explorer); the directory is on the cd. I thought about a getUrl with this path: file://<path>. But as the cd drive letter is different for evreyone, i need a substitute.

Thanks for your help.

Jben

4:03 pm on Apr 20, 2005 (gmt 0)

10+ Year Member



Answering to my own post after some researchs, i can tell you there's no environment variable pointing to the cd drive: that means the type of %cdrom% substitute does not exist.

If anyone can still solve problem ...

Thanks.

SWFWizard

2:28 am on Apr 24, 2005 (gmt 0)

10+ Year Member



You need to use fscommands. Flash is very limited in them that's why there's a bunch of third party Flash Projector solutions. My favorite, and by far the best (the client doesn't even need the flash play ocx), MDM Zinc. They have a free trial version that never expires, however, it's not for commercial use.

Site: [multidmedia.com...]

pault

3:06 am on Apr 24, 2005 (gmt 0)

10+ Year Member



I found a solution!

[whirlywiryweb.com...]

This little app. cleared up all my problems.
Opened a strait HTML file and did what I wanted it to do.

Thanks for the help/advise.
P