A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 22

Thread: Flash DVD-Rom Content - Linking to PDF Files

  1. #1
    Senior Member foochuck's Avatar
    Join Date
    Aug 2000
    Location
    Estero, FL
    Posts
    522

    Flash DVD-Rom Content - Linking to PDF Files

    Hello All,

    I'm looking to create some DVD-ROM content using a basic flash menu that I'd like to link to some PDF files that will be included on the disc.

    I have made CD-ROMs in the past, but when it comes to DVD-ROM I haven't done too many of these.

    My first question is launching a PDF from flash. Do I use a simple getURL command to launch a PDF file from the projector?

    Next, am I able to include an autorun file on the DVD-ROM so that the user can launch the flash menu when they put the disc in their computer or will the DVD video play by default?

    I'm using Adobe Encore CS3 to build my DVD if that is any help.

    If anyone has any more info on this or knows of a tutorial that could help me along it would be greatly appreciated.
    Foochuck
    http://www.myspace.com/foochuck

  2. #2
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,764
    Are you making a DVD for DVD players or a DVD for computers? You won't be able to open PDF files on a DVD player. If it's for a computer then the DVD is bascially treated like a bigger CD. I don't know enough about Encore or the DVD format to know if you can make some kind of dual mode DVD but someone here must know!

  3. #3
    Senior Member foochuck's Avatar
    Join Date
    Aug 2000
    Location
    Estero, FL
    Posts
    522
    I am making the DVD-ROM content for computers only.
    Foochuck
    http://www.myspace.com/foochuck

  4. #4
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,764
    Then it's exactly the same as building a CD. You can use an autorun.inf file to start a Flash projector when the DVD is inserted as long as the user has AutoPlay enabled. You can use getURL to open a PDF file on disk or you can use something like my free proxy tool.

    Here are the steps you need to follow to be able to open a PDF file without the ugly DOS box that appears when you normally do this from Flash...

    1. Create a BAT file called doc1.bat that contains just the following line. This is just a simple text file that you create with notepad or your favorite plain text editor.

    start doc1.pdf

    2. Put the BAT file in a folder called fscommand along with a copy of proxy.exe (from the attached ZIP file).

    3. Rename the copy of proxy.exe to doc1.exe (same base name as the BAT file you created).

    4. Place your PDF document (called doc1.pdf) in the fscommand folder with the BAT and EXE files. You don't have to store the files you want to open in the fscommand folder, but for your first test this makes things easier.

    5. Add the following command to your FLA where you want to open the PDF document (probably on a button release action).

    fscommand("exec", "doc1.exe");

    Now put your Flash EXE and the fscommand folder on your desktop and run the Flash EXE. When the EXEC command is called your PDF document should open.

    You will need one BAT file and one EXE file (renamed copy of proxy.exe) for every file you want to open from Flash. The reason for this is that Flash doesn't allow you to pass parameters using the EXEC command. It's a wee bit clunky, but it's FREE and it works.

  5. #5
    Senior Member foochuck's Avatar
    Join Date
    Aug 2000
    Location
    Estero, FL
    Posts
    522
    Thanks for the info Northcode.

    I have another question that is kind of off subject but it's involved with the same project - do you recommend any specific third party software that will allow me to autorun an HTML file?
    Foochuck
    http://www.myspace.com/foochuck

  6. #6
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,764
    Just a warning, in case this is what you're planning, but you can't use the EXEC fscommand from a SWF in an HTML page, it has to be done from a projector or it won't work.

    I built a FREE tool a looong time ago called runfile that allows you to use any file with the AutoPlay feature. Just create an autorun.inf file that looks like this...

    Code:
    [autorun]
    open=runfile.exe index.html
    Now create an index.html file, place it in the root of your CD structure along with a copy of runfile.exe and you're ready to go. As an added bonus, runfile will work with any registered file type on your system, not just HTML files.

  7. #7
    Senior Member foochuck's Avatar
    Join Date
    Aug 2000
    Location
    Estero, FL
    Posts
    522
    Thanks Northcode, that's what I was looking for.
    Foochuck
    http://www.myspace.com/foochuck

  8. #8
    Senior Member foochuck's Avatar
    Join Date
    Aug 2000
    Location
    Estero, FL
    Posts
    522
    Quote Originally Posted by Northcode View Post
    Just a warning, in case this is what you're planning, but you can't use the EXEC fscommand from a SWF in an HTML page, it has to be done from a projector or it won't work.

    I built a FREE tool a looong time ago called runfile that allows you to use any file with the AutoPlay feature. Just create an autorun.inf file that looks like this...

    Code:
    [autorun]
    open=runfile.exe index.html
    Now create an index.html file, place it in the root of your CD structure along with a copy of runfile.exe and you're ready to go. As an added bonus, runfile will work with any registered file type on your system, not just HTML files.
    Does the html file have to be named index.html? I tried naming it datasheets.html and the autorun didn't work.

    Code:
    [autorun]
    open=runfile.exe datasheets.html
    Foochuck
    http://www.myspace.com/foochuck

  9. #9
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,764
    It shouldn't matter what the filename is.
    Did it work when you called the file index.html?
    What happens if you just type runfile.exe datasheets.html at a DOS prompt?

  10. #10
    Senior Member foochuck's Avatar
    Join Date
    Aug 2000
    Location
    Estero, FL
    Posts
    522
    I opened CMD and went to the folder where my dvd-rom contents are located. I typed in runfile.exe datasheets.html and it opened right up in Firefox.

    However I tested the DVD I burned from Encore in both Windows XP & Vista and it doesn't launch the datasheets.html file.

    I explored my DVD and the autorun.inf, runfile.exe & datasheets.html files are all in the root folder of the DVD.
    Last edited by foochuck; 04-29-2009 at 12:08 PM.
    Foochuck
    http://www.myspace.com/foochuck

  11. #11
    Senior Member foochuck's Avatar
    Join Date
    Aug 2000
    Location
    Estero, FL
    Posts
    522
    I think I just caught my problem...I had autorun named .ini instead of .inf...I'm going to re-burn and test.
    Foochuck
    http://www.myspace.com/foochuck

  12. #12
    Senior Member foochuck's Avatar
    Join Date
    Aug 2000
    Location
    Estero, FL
    Posts
    522
    Okay it works now in Windows XP, however it's not working in Vista. I'm guessing there are autorun issues when it comes to Windows Vista.
    Foochuck
    http://www.myspace.com/foochuck

  13. #13
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,764
    Does runfile.exe work on Vista when you launch it manually? If it's only failing to launch when the DVD is inserted there might be another issue at work here. Does the runfile.exe on the DVD show a shield on the icon on Vista? That would mean that Vista thinks the application requires elevation and that would prevent it from working via AutoPlay. The solution for that is to add an application manifest to runfile.exe, which I can do.

  14. #14
    Senior Member foochuck's Avatar
    Join Date
    Aug 2000
    Location
    Estero, FL
    Posts
    522
    I was able to open cmd.exe and navigate to my DVD drive - I typed in runfile.exe datasheets.html and it opened in Firefox on Vista.

    When I look at the icon for runfile.exe on vista it does not show a shield icon it shows a small notepad icon with a cog wheel on it.

    Is it a big deal to add the application manifest to runfile.exe?
    Foochuck
    http://www.myspace.com/foochuck

  15. #15
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,764
    If there's no shield added to the icon then Vista isn't blocking it for security reasons and it doesn't need a manifest file. If you want to verify that you can use an external manifest file. Just create a text file called runfile.exe.manifest and put this in it.

    Code:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
      <assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="runfile.exe" type="win32" />
      <description>runfile</description>
      <dependency>
        <dependentAssembly>
          <assemblyIdentity
            type="win32"
            name="Microsoft.Windows.Common-Controls"
            version="6.0.0.0"
            processorArchitecture="X86"
            publicKeyToken="6595b64144ccf1df"
            language="*" />
        </dependentAssembly> 
      </dependency>
      <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
        <security>
          <requestedPrivileges>
            <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
          </requestedPrivileges>
        </security>
      </trustInfo>
    </assembly>
    Do you have any problem starting other AutoPlay enabled CDs or DVDs?

  16. #16
    Senior Member foochuck's Avatar
    Join Date
    Aug 2000
    Location
    Estero, FL
    Posts
    522
    Northcode,

    As it turns out, I'm going to autorun my Flash Projector (EXE).

    I have a couple of questions I was wondering if you could point me in the right direction as it's been a few years since I authored a flash projector file.

    1. What's a good size to set my projector to? Should I set it so that it can be resized?

    2. I want to load an FLV in my projector, what's a good size for the FLV video? I'm also looking for a control to load my FLV to full screen.

    3. Are there any issues with using getURL(); to launch html pages from a projector that I should be aware of?

    4. I also want to launch a powerpoint file (PPT) from flash. Can I use getURL for this?

    Thanks for your help!
    Last edited by foochuck; 04-30-2009 at 01:39 PM.
    Foochuck
    http://www.myspace.com/foochuck

  17. #17
    Senior Member foochuck's Avatar
    Join Date
    Aug 2000
    Location
    Estero, FL
    Posts
    522
    I found this solution for launching powerpoint from Flash:

    http://joeabiraad.com/action-script/...-from-flash/84
    Foochuck
    http://www.myspace.com/foochuck

  18. #18
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,764
    1 That will depend on how CPU hungry your projector is. If you're doing a lot of complex tweens or animation you'll want to keep the size down to something that doesn't suck up so much CPU that it degrades performance. It's going to require some testing, no way around that.

    2 The stock FLV player component does a decent job and you can add your own button for going into fullscreen mode easily enough. The size of the video you should use depends again on how much CPU it will take to render the video. The higher the qualilty, the smaller the size should be to avoid taxing the machine.

    3+4 That's the same method I described above for launching PDF files, except my PROXY tool will suppress the ugly DOS box you get when you launch a BAT file. You can use that same method for any type of file you want to open. getURL is fine for HTML pages.

  19. #19
    Senior Member foochuck's Avatar
    Join Date
    Aug 2000
    Location
    Estero, FL
    Posts
    522
    Thanks Northcode.

    I have decided to use Actionscript 3 for this project since I want to include the ability to use full screen video.

    However some basic AS I'm using seems like it's been outdated.

    Could someone help me with these or should I post them in the Actionscript 3 forum?

    code:

    stop();

    fscommand("allowscale", "false");

    btn1.onRelease = function() {
    }

    btn2.onRelease = function() {
    fscommand ("exec", "launcher.bat");
    }

    btn3.onRelease = function() {
    getURL("datasheets.html");
    }

    btn4.onRelease = function() {
    }

    exit.onRelease = function() {
    fscommand("quit");
    }

    Foochuck
    http://www.myspace.com/foochuck

  20. #20
    Senior Member foochuck's Avatar
    Join Date
    Aug 2000
    Location
    Estero, FL
    Posts
    522
    Quote Originally Posted by Northcode View Post

    2 The stock FLV player component does a decent job and you can add your own button for going into fullscreen mode easily enough. The size of the video you should use depends again on how much CPU it will take to render the video. The higher the qualilty, the smaller the size should be to avoid taxing the machine.
    Can I use the stock FLV player with one of the AS3 components to automatically add a scroll bar / full screen button? I exported to an EXE file and didn't see any of the swf files that are usually included with flash video skins.
    Foochuck
    http://www.myspace.com/foochuck

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center