Skip navigation
arjunender
Currently Being Moderated

swf file in android

Apr 23, 2013 2:04 AM

Hi,

 

i am developing air app for ANDROID

 

i am using swfloader to load swf file

 

swf not stopping at the end and it is looping

 

the same is working in the android web browser

 

any suggesstions

 

thanks

 
Replies
  • Currently Being Moderated
    May 28, 2013 8:41 AM   in reply to arjunender

    Rather than trying to rely on external swf timeline

    you could create a bridge to communicate with the externally loaded swf from the main application and control it programmatically.

     

    // set up a variable to communicate with

    public var loadedSWFMainTimeline:MovieClip;

     

    //add a function to initialize and communicate with the swf

    public function onSWFCompleted(event:Event):void

    {

         loadedSWFMainTimeline = mySWF.content;

     

         //call some function to reset or control something.

         loadedSWFMainTimeline5.doMyFunction();

         //or maybe direct it to a frame

         loadedSWFMainTimeline5.gotoAndStop( 1 );

     

    };

     

    <mx:SWFLoader id="mySWF" complete="onSWFCompleted(event);" source="/assets/mySWF.swf" trustContent="true" autoLoad="true"/>

     

     

    You can now control fuctionality in the external swf.

    This will work in a browser or compiled app.

     

    HTH

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points