DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4

Thread: app.path help

  1. #1
    UfoPilot Guest

    app.path help

    GlacierI'm using a flash file on a form and am using movie=app.path &
    "\mymovie.swf" in my code. It works but when I copy all the files to a
    floppy it no longer works. Does app.path not work from floppies?




  2. #2
    michiel de bruijn Guest

    Re: app.path help

    Hi Patrick,

    >I'm using a flash file on a form and am using movie=app.path &
    > "\mymovie.swf" in my code. It works but when I copy all the files to a
    > floppy it no longer works. Does app.path not work from floppies?


    App.path works just fine in that case -- it's your code that is causing the
    problem by always appending a backslash to it.

    If your app resides in a subdirectory, App.path will return something like
    'C:\foo'. In the case your app is in the root of a drive, the result is
    'C:\'

    The correct code therefore is:

    Movie = App.Path
    If Right(Movie, 1) <> "\" Then Movie = Movie & "\"
    Movie = Movie & "MyMovie.swf"

    '//mdb




  3. #3
    Larry Rebich Guest

    Re: app.path help

    UfoPilot,

    Some months ago I wrote a tip of the month that I call 'Get Path, Name or
    Extension'. Link to http://www.buygold.net/tips.html then look for the May
    1999 tip of the month. I included a function called 'AddBackslash' which
    tests a folder's name and if it does not contain a right most backslash then
    it adds one.

    In your sample you would change your code to something like:

    movie=AddBackslash(app.path) & "mymovie.swf"

    Cheers,
    Larry Rebich

    More tips link to:
    http://www.buygold.net/tips.html

    Please:
    No personal e-mail questions :-)


    "UfoPilot" <patrickn@grapevine.net> wrote in message
    news:39e8e071@news.devx.com...
    > GlacierI'm using a flash file on a form and am using movie=app.path &
    > "\mymovie.swf" in my code. It works but when I copy all the files to a
    > floppy it no longer works. Does app.path not work from floppies?
    >
    >
    >




  4. #4
    UfoPilot Guest

    Re: app.path help

    Thanks, I knew it had to be something simple. It was late..what can I
    say...
    "Larry Rebich" <lrebich@earthlink.net> wrote in message
    news:39e93565$1@news.devx.com...
    > UfoPilot,
    >
    > Some months ago I wrote a tip of the month that I call 'Get Path, Name or
    > Extension'. Link to http://www.buygold.net/tips.html then look for the May
    > 1999 tip of the month. I included a function called 'AddBackslash' which
    > tests a folder's name and if it does not contain a right most backslash

    then
    > it adds one.
    >
    > In your sample you would change your code to something like:
    >
    > movie=AddBackslash(app.path) & "mymovie.swf"
    >
    > Cheers,
    > Larry Rebich
    >
    > More tips link to:
    > http://www.buygold.net/tips.html
    >
    > Please:
    > No personal e-mail questions :-)
    >
    >
    > "UfoPilot" <patrickn@grapevine.net> wrote in message
    > news:39e8e071@news.devx.com...
    > > GlacierI'm using a flash file on a form and am using movie=app.path &
    > > "\mymovie.swf" in my code. It works but when I copy all the files to a
    > > floppy it no longer works. Does app.path not work from floppies?
    > >
    > >
    > >

    >
    >




Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links