Results 1 to 11 of 11
  1. #1
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Flash Media (A2K)

    I'm nothing if not persistant.
    Attempting to run an App which will, when it works, run a Flash Media file:

    Private Sub AGMHelp_001___UsingOpeningMenu_Click()
    On Error GoTo Err_P01_Click
    Dim stAppName As String
    stAppName = "Eocumentation SystemsUnderConstructionGPEGPEFlash.swf"
    Call Shell(stAppName, 1)
    Exit_P01_Click:
    Exit Sub
    Err_P01_Click:
    MsgBox Err.Description
    Resume Exit_P01_Click
    End Sub

    All I get is the following:

    Invalid procedure call or argument

    Any suggestions, and please be kind.
    Cheers,
    Andy

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Flash Media (A2K)

    I presume it is the Call Shell... command it is complaining about. What is the ,1 in the Shell command?

    Check <post#=407444>post 407444</post#>

  3. #3
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Flash Media (A2K)

    Pat,

    Thanks for responding. Unfortunately, I can't even begin to answer your question. I basically took an application-type scenario including the ,1 in the Shell command and attempted to run the Flash movie. I have no idea what the 1 or lack of it or something else in its' stead signifies. One would think that there would be a common thread or approach in how "Shelled" items can be run. Guess not. I did check out your suggested post but was unable to really apply it to what I'm attempting to do. Anyway, thanks again,
    Cheers,
    Andy

  4. #4
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Flash Media (A2K)

    Did you notice Charlotte's <post#=407460>post 407460</post#> in the same thread?

  5. #5
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Flash Media (A2K)

    As I mentioned above, I did and I feel that I have a slightly different situation. I'm attempting to run something within my system and never at any point in time referring to an outside site. It's just when you run this HTML file, it brings up the Explorer interface. It's always the simple ones.

    Andy
    Cheers,
    Andy

  6. #6
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Flash Media (A2K)

    I think you may be misunderstanding the situation. You can't just "run" a flash media file, any more than you can just "run" an html file, you have to run it in the program that is the default for that file type. You seem to be trying to avoid that.
    Charlotte

  7. #7
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Flash Media (A2K)

    Charlotte, succinct and to the point as always. Yes, I do believe that it is a misunderstanding on my part. I felt that if one could 'click' on a .doc file and Word was present in the system, up would come the document. However, when I looked at it more closely, if one wants to run a Word document from inside of Access, one must call upon Word first to run said document. So, the name of this particular game, is to find the exact name of the executable file, the equivalent of Word, to initiate the Flash file and the name of the executable file that runs an HTML. Thanks again. Once I get these exact names, I'll probably run into more problems, but that'll be another story. If someone out there could give me a quick clue as to the legitimate programme names before I find them, it would be appreciated.

    Added this after the initial note above
    NewsFlash: Went to a really neat site called: Whatis.techtarget.com and found that SAFlashPlayer.exe runs Flash file

    So, what I now have and it's almost 100% is the following:

    Private Sub RunFlashMovie_DblClick(Cancel As Integer)
    On Error GoTo Err_RunFlashMovie_Click
    Dim stAppName As String
    stAppName = "E:AGMConSystemsFilesGreenParkAccessSystemsEstimat ingSAFlashPlayer.exe E:AGMConSystemsFilesGreenParkAccessSystemsEstimati ngGPEFlash.swf"
    Call Shell(stAppName, 1)
    Exit_RunFlashMovie_Click:
    Exit Sub
    Err_RunFlashMovie_Click:
    MsgBox Err.Description
    Resume Exit_RunFlashMovie_Click
    End Sub

    I'm now at exactly the same point that Chris Greaves was in your Post 407460 and that is, how do I make it disappear after its' been run.

    You suggested using:
    AppActivate RetVal
    SendKeys "%{F4}"

    but I'm not entirely clear as to where exactly to insert it. Thanks for all your help so far.

    Andy
    Cheers,
    Andy

  8. #8
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Flash Media (A2K)

    Replace the command:

    Call Shell(stAppName, 1)
    with:

    Dim RetVal as Variant
    RetVal = Shell(stAppName)
    AppActivate RetVal
    SendKeys "%{F4}"

  9. #9
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Flash Media (A2K)

    Pat, thanks for responding. In now looks like ths and is starting to get closer:

    Private Sub RunFlashMovie_DblClick(Cancel As Integer)
    On Error GoTo Err_RunFlashMovie_Click
    Dim stAppName As String
    stAppName = "E:AGMConSystemsFilesGreenParkAccessSystemsEstimat ingSAFlashPlayer.exe E:AGMConSystemsFilesGreenParkAccessSystemsEstimati ngGPEFlash.swf"

    Dim RetVal As Variant
    RetVal = Shell(stAppName)
    AppActivate RetVal
    SendKeys "%{F4}"

    Exit_RunFlashMovie_Click:
    Exit Sub
    Err_RunFlashMovie_Click:
    MsgBox Err.Description
    Resume Exit_RunFlashMovie_Click
    End Sub

    When executed, it starts the 'movie' minimized in the Taskbar. I maximized it while it was running, viewed it until it ended and it then just sat there without closing down. Sigh .....
    Cheers,
    Andy

  10. #10
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Flash Media (A2K)

    Maybe you need some code to wait for a few seconds, don't know how many, then de-activet the app, however that's done.
    Sorry, I cannot help you here.

  11. #11
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Flash Media (A2K)

    Pat,
    Just to keep you up to date because I refuse to give in. The following starts up the movie, runs it maximized, but....................... silly @#$!% refuse to quit.

    Private Sub RunFlashMovie_DblClick(Cancel As Integer)
    On Error GoTo Err_RunFlashMovie_Click
    Dim stAppName As String
    stAppName = "E:AGMConSystemsFilesGreenParkAccessSystemsEstimat ingSAFlashPlayer.exe E:AGMConSystemsFilesGreenParkAccessSystemsEstimati ngGPEFlash.swf"
    Dim RetVal As Variant
    RetVal = Shell(stAppName, vbMaximizedFocus)
    Exit_RunFlashMovie_Click:
    Exit Sub
    Err_RunFlashMovie_Click:
    MsgBox Err.Description
    Resume Exit_RunFlashMovie_Click
    End Sub Resume Exit_RunFlashMovie_Click

    As a matter of curiousity, where does one find the excruciating details re little things like RetVal & AppActivate RefVal, etc.? I've got a bunch of pricey VBA books, but they don't even mention them. Just curious.

    <img src=/S/bananas.gif border=0 alt=bananas width=33 height=35> <img src=/S/groovin.gif border=0 alt=groovin width=21 height=21>

    Houston, we have Liftoff! After messing around some more I decided to go back to the source file in DemoBuilder and discovered that instead of finishing it off with "Close Movie", I had used "Stop Movie".
    Duh!

    Anyway, my thanks to you and Charlotte for your ongoing patience and advice. I can now concentrate and produce some "Flashy" online instructional examples. A picture is worth
    Cheers,
    Andy

Posting Permissions

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