A Flash Developer Resource Site

Results 1 to 13 of 13

Thread: repeating external swf in air for android problem

  1. #1
    Senior Member
    Join Date
    May 2016
    Posts
    133

    repeating external swf in air for android problem

    hi friends

    I need your help
    my problem:
    I have a file in animate cc that loads an external swf using this code

    PHP Code:
    stop();
    var 
    myloader:Loader = new Loder();
    var 
    url:URLRequest = new URLRequest("myswf.swf");
    myloader.load(url);
    myloader.x=0;
    myloader.y=0;
    addChild(myloader); 
    When i test my project in animate , the file is working fine
    But when I export the file to Android and test the file, I find the flash does not stop and works repeatedly

    i tested an other code

    PHP Code:
    var context:LoaderContext = new LoaderContext();
    context.allowCodeImport true;

    var 
    loader:Loader=new Loader();

    loader.contentLoaderInfo.addEventListener(Event.COMPLETEonLoaded);
    loader.load(new URLRequest("myswf.swf"), context);

    function 
    onLoaded(e:Event):void
    {
        
    addChild(loader);
        
    }
    this.stop(); 
    but the same problem

    Is any expert to modify the programming of this file?

    thank you
    Attached Files Attached Files

  2. #2
    Member Alloy Bacon's Avatar
    Join Date
    Apr 2011
    Posts
    1,087
    Hey, I made this cross scripter, took very long studying:

    so basically the child swf can control the parent swf functions, and vice versa, and the child swf can even be loaded from a url with the same access features.

    https://board.flashkit.com/board/sho...as3&highlight=
    Last edited by Alloy Bacon; 07-17-2020 at 11:58 PM.

  3. #3
    Member Alloy Bacon's Avatar
    Join Date
    Apr 2011
    Posts
    1,087
    For the iphone, they didn't allow cross-scripting, no swf shows up but with new updates theres a small chance they allow it now, really small. Because when I upload to the apple store they decompile the swf binaries for security checks, and when dealing with new swfs being loaded from a website it is dangerous. They don't want unexpected hacks that can take the users personal data/modify the iphone os from new scripts which is why everyone probably gets the iphone because they don't want surprises, but maybe they should accept it like the android. dont use someone because you have them on lock, trust the maker you are dealing with.
    Last edited by Alloy Bacon; 07-18-2020 at 12:20 AM.

  4. #4
    Senior Member
    Join Date
    May 2016
    Posts
    133
    can you send fla file please

  5. #5

  6. #6
    Senior Member
    Join Date
    May 2016
    Posts
    133
    sorry not working for me

  7. #7
    Member Alloy Bacon's Avatar
    Join Date
    Apr 2011
    Posts
    1,087
    Put the var_reader.swf in the include files before packaging? test the apk: download
    Last edited by Alloy Bacon; 07-22-2020 at 03:43 PM.
    M6 Cluster screenshotter by MangoWave, for your custom digital cluster operating systems will be released soon.

  8. #8
    Member Alloy Bacon's Avatar
    Join Date
    Apr 2011
    Posts
    1,087
    M6 Cluster screenshotter by MangoWave, for your custom digital cluster operating systems will be released soon.

  9. #9
    Senior Member
    Join Date
    May 2016
    Posts
    133
    Do you have a fla file with code to load an external flash and is ready for export to Android format?

    please

  10. #10
    Member Alloy Bacon's Avatar
    Join Date
    Apr 2011
    Posts
    1,087
    ok, if you install the apk, you will see text from the loaded swf.

    If you download this you open swf.fla and package for android, should say var_reader.swf in the included files.

  11. #11
    Senior Member
    Join Date
    May 2016
    Posts
    133
    I would like to thank you
    but I tried to apply my file but it did not work for me.
    The last request, please,
    this is my file, can you program it for me and send me the files

    https://www.mediafire.com/file/uakrv...myswf.rar/file
    Last edited by kofa; 07-23-2020 at 05:31 AM.

  12. #12
    Member Alloy Bacon's Avatar
    Join Date
    Apr 2011
    Posts
    1,087
    It does flash when myswf.swf is embedded, I cant tell how to write the container to make it work without seeing the .fla

  13. #13
    Member Alloy Bacon's Avatar
    Join Date
    Apr 2011
    Posts
    1,087
    If that is as2, that file is not good for as3 scripted player for android, or (maybe) the problem is you use "stage." in your script.

    can you join this project that mini game might go well for it

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