A Flash Developer Resource Site

Results 1 to 17 of 17

Thread: launching video file from flash

  1. #1
    Senior Member
    Join Date
    Jul 2007
    Posts
    243

    launching video file from flash

    i have been trying to launch a video file from flash for a couple of days now, i know it has to be through the fscommand file using the fscommand subdirectory. i have been scouring around and i beleive i need a bat file which i have created and when i double click, it launches the file so i know that it is correct.
    on the flash application i have:
    on (release) {
    fscommand("exec", "waw.bat");
    }

    as the actionscript for the button.

    this doesn't open it though, i see the cmd box fly open and close in less than a milisecond but nothing else happens.
    what am i doing wrong?

  2. #2
    Senior Member
    Join Date
    Jul 2007
    Posts
    243
    im using flash cs3 and flash player 9, if that info is also needed
    thanks

  3. #3
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    This http://board.flashkit.com/board/showthread.php?t=738781 post is right below yours and may hold some answers for you

  4. #4
    Senior Member
    Join Date
    Jul 2007
    Posts
    243
    lol, that is the bat code i used that i found here, obviously changing their video with my video. when i double click ur little exe utility to get rid of the cmd box it loads fine, so it isnt a problem with the code in the bat i dont think, more to do with flash.
    i am no using the code that is supplied with your proxy file
    cmd = waw.exe
    fscommand = ("exec", cmd)

    but nothing happens when the button is clicked!

  5. #5
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    The bat file (waw.bat) and the exe file (waw.exe) you want to launch are both in the fscommand folder right? And your projector should be outside the fscommand folder. If that's how it's set up and you call it like this (below) it should work.

    Code:
    fscommand("exec", "waw.exe")

  6. #6
    Senior Member
    Join Date
    Jul 2007
    Posts
    243
    just doesn't work im at a complete loss. the thing is with your proxy that i downloaded the test swf file with the 2 buttons doesn't load either.
    on my cd i have:
    E:\
    shockwave.exe (the main file)
    autorun.inf
    fscommand \ waw.exe, waw.bat, waw.mpg

    when i double click either the exe or the bat files then windows medial player opens and the video begins.

    my entire code in flash on the button is
    on (rollOver) {
    tellTarget ("/gumvid") {
    gotoAndStop(2);
    }
    }

    on (release, rollOut) {
    tellTarget ("/gumvid") {
    gotoAndStop(1);
    }
    }

    on (release) {
    fscommand("exec", "waw.exe")
    }

    i have tried the on release without the other parts of the code to no avail, the button also has an "over" keyframe applied to it but i dont think that is going to have anything to do with this.

    i cannot find a solution...
    any ideas northcode?

    NB im running flash cs3 on windows vista.

  7. #7
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    tellTarget? Holy Flash4 Bat-Man! What version of Flash are you publishing to?

  8. #8
    Senior Member
    Join Date
    Jul 2007
    Posts
    243
    lol, it was just a bit of code i found on a tutorial to load a movie clip that was within the file. is there a more up to date piece of code for that now then?

    it is publishing to flash player 9.

    if i change the fscommand to launch for instance mplayerc.exe which is a windows media player standalone file. i can get the application to work, so the problem lies somewhere between telling the proxy.exe to launch and it actually launching as double clicking that proxy launches the video.
    are there any settings in flash player or anything that i need to change?
    thanks
    dan

  9. #9
    Senior Member
    Join Date
    Jul 2007
    Posts
    243
    has anybody any ideas or suggestions that i can try as i can't solve this problem.

    thank you in advance for any information you can give me

    dan

  10. #10
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    I've attached a very simple Flash 8 FLA that works for me on Vista along with the other required test files. I didn't include a copy of my test.mpg because it made the file too large to upload to FK.

    On my Vista test system, the user name is "test" and I threw everything on the desktop for testing so the BAT file looks like this...

    start wmplayer.exe c:\users\test\desktop\test.mpg

    You'll have to replace the path to the video file with the correct path to your video file. It has to be a fully qualified path.
    Attached Files Attached Files

  11. #11
    Senior Member
    Join Date
    Jul 2007
    Posts
    243
    exactly the same thing is happening northcode, i changed the path and when i double click the bat or the exe file mplayer opens and the file begins but when i press the button nothing happens.

  12. #12
    Senior Member
    Join Date
    Jul 2007
    Posts
    243
    argh it seems i am the only one unable to do this but i cannot see what im possibly doing wrong. if the fscommand works if i load mplayerc.exe, and the bat and exe files both work if i double click them then why doesnt the fscommand open the exe files??

    northcode do you have any alternatives for a user to view video's, it looks like im going to have to have a button that opens up a folder for the user to open up the movie themselves..

  13. #13
    Senior Member
    Join Date
    Jul 2007
    Posts
    243
    i can't see how it would, but would it make a difference that i am compiling the cd using windows instead of an application like nero for eg?

  14. #14
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    When you launch your application is it a SWF you're launching or have you published it as an EXE. If you try to run an fscommand from a SWF it won't work.

  15. #15
    Senior Member
    Join Date
    Jul 2007
    Posts
    243
    no its a projector exe file im launching.
    are there any known compatibility issues with Flash CS3, Flash Player 9 and Vista?
    is it worth getting a copy of flash 8 and loading that onto my old computer with XP?

  16. #16
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    I just built you a simple Flash 8 EXE file that just launches waw.exe if you want to try that. You can grab it from http://www.northcode.com/misc/projector.zip. I've included the FLA, SWF and EXE files.

  17. #17
    Senior Member
    Join Date
    Jul 2007
    Posts
    243
    i installed flash 8 on my pc running xp and everything runs fine so i can only presume that the problem lies with flash cs3 and the program. thanks for all your help with this i knew it was something that neither you or i were doing wrong just one of those things!
    i now need a bit of help in my other thread lol
    thanks a lot
    dan

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