From: Phyton232 on
Hi there.
My boss drop this bomb in my desk and I have no idea of how to sort. He gave a
director file that I need to modify in order to work (apparently the project
was started by the guy who left). Basically I got this director that using the
WebXtra should try go to a certain web page. If there is no internet connection
on user's computer should read a file in the cd. Ive got the code to search for
the file, but I dont know how to do the rest.
Can anyone help? Thanks!

on exitFrame
set the searchCurrentFolder to TRUE
put navigate ( sprite 1, the applicationPath & "file.htm")
end



From: takekha on
On Apr 12, 11:02 pm, "Phyton232" <webforumsu...(a)macromedia.com> wrote:
> Hi there.
> My boss drop this bomb in my desk and I have no idea of how to sort. He gave a
> director file that I need to modify in order to work (apparently the project
> was started by the guy who left). Basically I got this director that using the
> WebXtra should try go to a certain web page. If there is no internet connection
> on user's computer should read a file in the cd. Ive got the code to search for
> the file, but I dont know how to do the rest.
> Can anyone help? Thanks!
>
> on exitFrame
> set the searchCurrentFolder to TRUE
> put navigate ( sprite 1, the applicationPath & "file.htm")
> end

You can use baOpenFile function from buddy API Xtra to launch the
file..

on exitframe me
baOpenFile( the moviePath & "file.htm" , "maximised" )
end

Buddy API is free if you use 2 functions. download from here >>
http://www.mods.com.au/budapi/default.htm



From: takekha on
On Apr 12, 11:02 pm, "Phyton232" <webforumsu...(a)macromedia.com> wrote:
> Hi there.
> My boss drop this bomb in my desk and I have no idea of how to sort. He gave a
> director file that I need to modify in order to work (apparently the project
> was started by the guy who left). Basically I got this director that using the
> WebXtra should try go to a certain web page. If there is no internet connection
> on user's computer should read a file in the cd. Ive got the code to search for
> the file, but I dont know how to do the rest.
> Can anyone help? Thanks!
>
> on exitFrame
> set the searchCurrentFolder to TRUE
> put navigate ( sprite 1, the applicationPath & "file.htm")
> end


I assume Sprite 1 is your browserSprite..?
Then Try this script attach to your button

on mouseup me
theURL=the moviepath&"file.htm"
sprite(1).Navigate(theURL)
end


From: Sean Wilson on
> on exitFrame
> set the searchCurrentFolder to TRUE
> put navigate ( sprite 1, the applicationPath & "file.htm")
> end

So you already have the WebXtra sprite navigating to the file on CD (or
beside the projector).
What remains is for you to determine whether there is an internet
connection and navigate to an 'online' URL instead of a local page if
there is.
From what you already have (navigate()) can you see how to complete the
second part - navigating the sprite to an online URL?
What research have you done about the first part - determining whether
there's an internet connection?
From: Phyton232 on
The only research Ive done was within the company's previous projects, and
unfortunately they don't anything like that ready. What I have noticed is with
WebXtra (which we do have) you can type an url within a project and it works (I
have tried) so I thought maybe there would be something in WebXtra itself that
could do that, but I'm not sure.
If WebXtra can't do that (check internet connection) I don't know what to do,
to be honest. Like I said, I'm a bit lost... Thank you for your reply