Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Flash swf

Flash swf

Scheduled Pinned Locked Moved C / C++ / MFC
c++comadobetoolstutorial
11 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Nishad S

    Hi, I need to play swf file in VC++ application using flash ocx. One condition is that, swf file should not be played if the user open the file in normal flash player. So something should be done at the flash side (I am not so clear about how to do that right now). But it should be played only from my application (A kind of protection from playing and so spreading the files discreetly). (I am thinking about some method to pass some values to swf script. And there, if the passed value is checked and if it is OK then only allow to play the swf.) I wish to get ideas from you. Probably some of you had gone through such a requirement... :) Thank you.

    - NS - [ODBaseBtn]

    N Offline
    N Offline
    Nibu babu thomas
    wrote on last edited by
    #2

    NS17 wrote:

    I need to play swf file in VC++ application using flash ocx.

    Got this link using google... http://www.codeguru.com/forum/archive/index.php/t-310290.html[^]

    Nibu babu thomas Microsoft MVP for VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http://nibuthomas.wordpress.com

    N 1 Reply Last reply
    0
    • N Nibu babu thomas

      NS17 wrote:

      I need to play swf file in VC++ application using flash ocx.

      Got this link using google... http://www.codeguru.com/forum/archive/index.php/t-310290.html[^]

      Nibu babu thomas Microsoft MVP for VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http://nibuthomas.wordpress.com

      N Offline
      N Offline
      Nishad S
      wrote on last edited by
      #3

      Thank you... But it is just about telling how to load the file. I can load the file by inserting the flash ocx in to my (MFC) application. There is no problem at all. I actually need to make the swf file played only by my application. I know both the application side and the flash side need something to be done for that. So I wish to get ideas regarding this. I am also googling for some solutions... but not got yet... so continuing the search... :)

      - NS - [ODBaseBtn]

      1 Reply Last reply
      0
      • N Nishad S

        Hi, I need to play swf file in VC++ application using flash ocx. One condition is that, swf file should not be played if the user open the file in normal flash player. So something should be done at the flash side (I am not so clear about how to do that right now). But it should be played only from my application (A kind of protection from playing and so spreading the files discreetly). (I am thinking about some method to pass some values to swf script. And there, if the passed value is checked and if it is OK then only allow to play the swf.) I wish to get ideas from you. Probably some of you had gone through such a requirement... :) Thank you.

        - NS - [ODBaseBtn]

        J Offline
        J Offline
        Jijo Raj
        wrote on last edited by
        #4

        NS17 wrote:

        One condition is that, swf file should not be played if the user open the file in normal flash player. So something should be done at the flash side (I am not so clear about how to do that right now). But it should be played only from my application (A kind of protection from playing and so spreading the files discreetly).

        1. One method is to corrupt the file, which you know how to reverse back. All the SWF files formats start with "CWS". So modify your flash file by changing it to something like this - "CWT" or something like that. When you play the file, check whether the file starts with "CWT" and in that case reverse it to "CWS" and play. Once played, corrupt it again. 2) Another method is to encrypt the entire file and for playing in you application decrypt it back.

        NS17 wrote:

        I need to play swf file in VC++ application using flash ocx.

        Well, if you need to know how to play swf in VC++ application, then check out this tutorial - How to display Flash animation in Visual C++ MFC application[^] Regards, Jijo.

        _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

        N 1 Reply Last reply
        0
        • J Jijo Raj

          NS17 wrote:

          One condition is that, swf file should not be played if the user open the file in normal flash player. So something should be done at the flash side (I am not so clear about how to do that right now). But it should be played only from my application (A kind of protection from playing and so spreading the files discreetly).

          1. One method is to corrupt the file, which you know how to reverse back. All the SWF files formats start with "CWS". So modify your flash file by changing it to something like this - "CWT" or something like that. When you play the file, check whether the file starts with "CWT" and in that case reverse it to "CWS" and play. Once played, corrupt it again. 2) Another method is to encrypt the entire file and for playing in you application decrypt it back.

          NS17 wrote:

          I need to play swf file in VC++ application using flash ocx.

          Well, if you need to know how to play swf in VC++ application, then check out this tutorial - How to display Flash animation in Visual C++ MFC application[^] Regards, Jijo.

          _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

          N Offline
          N Offline
          Nishad S
          wrote on last edited by
          #5

          Jijo raj wrote:

          1. One method is to corrupt the file, which you know how to reverse back. All the SWF files formats start with "CWS". So modify your flash file by changing it to something like this - "CWT" or something like that. When you play the file, check whether the file starts with "CWT" and in that case reverse it to "CWS" and play. Once played, corrupt it again. 2) Another method is to encrypt the entire file and for playing in you application decrypt it back.

          This is a good idea... :) But please don't feel bad, I would like to take this as a last resort... ;) Because if I get some other direct method, I will follow it...

          Jijo raj wrote:

          Well, if you need to know how to play swf in VC++ application, then check out this tutorial - How to display Flash animation in Visual C++ MFC application[^]

          Actually I know how to play the swf in VC++. But have no better experience... Thank you very much for sharing your thoughts... :)

          - NS - [ODBaseBtn]

          J 1 Reply Last reply
          0
          • N Nishad S

            Jijo raj wrote:

            1. One method is to corrupt the file, which you know how to reverse back. All the SWF files formats start with "CWS". So modify your flash file by changing it to something like this - "CWT" or something like that. When you play the file, check whether the file starts with "CWT" and in that case reverse it to "CWS" and play. Once played, corrupt it again. 2) Another method is to encrypt the entire file and for playing in you application decrypt it back.

            This is a good idea... :) But please don't feel bad, I would like to take this as a last resort... ;) Because if I get some other direct method, I will follow it...

            Jijo raj wrote:

            Well, if you need to know how to play swf in VC++ application, then check out this tutorial - How to display Flash animation in Visual C++ MFC application[^]

            Actually I know how to play the swf in VC++. But have no better experience... Thank you very much for sharing your thoughts... :)

            - NS - [ODBaseBtn]

            J Offline
            J Offline
            Jijo Raj
            wrote on last edited by
            #6

            NS17 wrote:

            But please don't feel bad, I would like to take this as a last resort... Wink Because if I get some other direct method, I will follow it...

            No Problem mate. And I sincerely wish for someone to come with better idea! :-D Regards, Jijo.

            _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

            N 1 Reply Last reply
            0
            • J Jijo Raj

              NS17 wrote:

              But please don't feel bad, I would like to take this as a last resort... Wink Because if I get some other direct method, I will follow it...

              No Problem mate. And I sincerely wish for someone to come with better idea! :-D Regards, Jijo.

              _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

              N Offline
              N Offline
              Nishad S
              wrote on last edited by
              #7

              :D Probably I may use your idea... no better method than this got yet... BTW, could you tell me the basics of the way to decrypt (no need to describe about decryption methods) a file in memory than creating an actual file. I need it because if I create the temporary file in the disk, then possibility is there to get that file to the user as it is... (then he/she can play it directly)

              - NS - [ODBaseBtn]

              J 1 Reply Last reply
              0
              • N Nishad S

                :D Probably I may use your idea... no better method than this got yet... BTW, could you tell me the basics of the way to decrypt (no need to describe about decryption methods) a file in memory than creating an actual file. I need it because if I create the temporary file in the disk, then possibility is there to get that file to the user as it is... (then he/she can play it directly)

                - NS - [ODBaseBtn]

                J Offline
                J Offline
                Jijo Raj
                wrote on last edited by
                #8

                NS17 wrote:

                I need it because if I create the temporary file in the disk, then possibility is there to get that file to the user as it is... (then he/she can play it directly)

                Well, Just create the temporary file and open with flags OF_SHARE_DENY_READ and OF_SHARE_DENY_WRITE. So that no one else can read or write to your temp file. So that it will be safe from the bad guys. ;) Once you finished, Just delete it. Well, I'm not sure whether Memory Mapped Files[^] can help you. Well, have a look at it too. Regards, Jijo.

                _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

                N 1 Reply Last reply
                0
                • J Jijo Raj

                  NS17 wrote:

                  I need it because if I create the temporary file in the disk, then possibility is there to get that file to the user as it is... (then he/she can play it directly)

                  Well, Just create the temporary file and open with flags OF_SHARE_DENY_READ and OF_SHARE_DENY_WRITE. So that no one else can read or write to your temp file. So that it will be safe from the bad guys. ;) Once you finished, Just delete it. Well, I'm not sure whether Memory Mapped Files[^] can help you. Well, have a look at it too. Regards, Jijo.

                  _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

                  N Offline
                  N Offline
                  Nishad S
                  wrote on last edited by
                  #9

                  But I think i need to close the file for giving it to the flash ocx for playing... am i right? Because it is accepting the swf as a file.

                  - NS - [ODBaseBtn]

                  J 1 Reply Last reply
                  0
                  • N Nishad S

                    But I think i need to close the file for giving it to the flash ocx for playing... am i right? Because it is accepting the swf as a file.

                    - NS - [ODBaseBtn]

                    J Offline
                    J Offline
                    Jijo Raj
                    wrote on last edited by
                    #10

                    Oooop! That's right. And now i got a grant Idea!!! Got for Active Data Streams[^]. Create the temp file as an ADS to some existing file. So that it will be perfectly hidden. Then, pass the filename of stream to flash OCX. I hope it should work. Just try it. Regards, Jijo.

                    _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

                    N 1 Reply Last reply
                    0
                    • J Jijo Raj

                      Oooop! That's right. And now i got a grant Idea!!! Got for Active Data Streams[^]. Create the temp file as an ADS to some existing file. So that it will be perfectly hidden. Then, pass the filename of stream to flash OCX. I hope it should work. Just try it. Regards, Jijo.

                      _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

                      N Offline
                      N Offline
                      Nishad S
                      wrote on last edited by
                      #11

                      That's good... :) I will have a try... Thanks a lot... But I wish to keep this thread open to get more ideas... ;)

                      - NS - [ODBaseBtn]

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups