SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Jun 2003
    Location
    walsall
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    linking to external files

    You will have to forgive me as my action script knowledge isnt great, and Im sure this must be really easey,
    I am currently trying to put together a showreel of my 3D work in flash, and im trying to link from thumb nails on the flash doc to jpg's, avi's etc which I will include on the CD along with the exe version of the flash file.

    I was using
    on(release){
    getURL("c:/path/file.extention", _blank);
    }

    Until I realised that when linking to the files on the CD this wouldnt work, I was told that if I removed drive name, and used the folder as a relative postion this should work from the hard drive or the CD, but I cant get it to work.

    Can anyone tell me where Im going wrong please, and please dont tell me I need to learn more about actionscripting again, I know I do, but have very little time at the moment.

  2. #2
    SitePoint Wizard aaron.martone's Avatar
    Join Date
    Feb 2003
    Location
    Florida, USA
    Posts
    2,322
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Well... a couple key points

    (a) this may not work, because messing with local files might be a HUGE security risk.

    (b) the proper syntax for getURL is ("path", "target", "GET/POST")

    (c) the slash sytax for a local machine is \ and not / (c:\path\file.extension)

    Try giving those a change and see what comes of it.

  3. #3
    SitePoint Member
    Join Date
    Jun 2003
    Location
    walsall
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cheers, I was a little unsure what you meant by point a, the files will be included on the CD for people to link to from the exe, but Ill give it a go, as for the point b, I had used it in normal mode, and that was the syntax that I ended with, and the slashes was just me typing too fast, with no care, thanks a again, Ill post back up if it works.

  4. #4
    SitePoint Zealot webQS's Avatar
    Join Date
    Oct 2002
    Location
    Sydney : Australia
    Posts
    144
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try using file://

    e.g
    file:///C:/Program%20Files/Macromedia/Flash%20MX/Help/Flash/html/20_integrating3.html

    This will tell Flash to look on the local file system for the file.

    for a cd try :

    file:///directory/file.txt

    if you use d: you may have trouble with users who stick the CD in e: or p: or g: or z:

    hth
    James


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
  •