A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: How to restrict to direct acess to SWF file in browser

  1. #1
    Registered User
    Join Date
    Jul 2016
    Posts
    2

    How to restrict to direct acess to SWF file in browser

    Hi friends
    Have a nice day to you all.

    I am working in Macromedia flash 8.

    I have created a photo album. I have created SWF files for each scene and each SWF file
    is called from one small flash exe ,called Title.exe.

    Now the problem is started when some of my users open SWF file directly ( double clicking)
    in browsers like Internet explorer, mozilla etc.

    I want to restrict the user to open the SWF file this way and forced them to open it from within exe only.

    I need help from the experts of macromedia flash.
    Thanks in advance.

  2. #2
    Senior Member realMakc's Avatar
    Join Date
    Oct 2002
    Posts
    927
    maybe stop them at frame 1 and make title.exe to call gotoAndPlay(2)
    who is this? a word of friendly advice: FFS stop using AS2

  3. #3
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    I had this before, it's simple really, I had a var on the exe file, example,

    var internal:String = "execute";

    and in the external swf files i looked for the var.

    on frame 1 of each external swf

    stop();
    if (_root.internal == "execute")
    {
    goto next frame
    }
    else
    {
    fscommand("quit");
    or goto and stop end frame if fscommand unable to work in browser mode;
    }


    I'm sure you can figure it out

  4. #4
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    no i think its:
    if(internal==external){
    externalize_internalizer.internalization.internet. international.swag

  5. #5
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    Seems you have nothing to add here Alloy... Other than to pester somebodies thread.
    There are many ways that this could be achieved

  6. #6
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    Just noticed Alloy, not sure why but many thanks.

  7. #7
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    goto keep the fruit fruity

  8. #8
    Registered User
    Join Date
    Jul 2016
    Posts
    2
    Thanks friends
    You friends did help me
    But I am not much familiar with flash coding.
    Can you give me step by step guide or may be example FLA please ?

  9. #9
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    What I would do is make the .swf extension to .rng remove the last character in the former .swf file, when the exe opens the .rng file add the extra missing chracter than launch it

  10. #10
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    HI,

    However Alloy, that does not stop somebody trying to open the swf file with flash player even if it has been given a different extension.

    Then not than.

    I think they wanted some working code or files, which he/she has almost been given in posts above.

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