Skip to main content
Known Participant
July 2, 2021
Answered

publishing air apk with videos

  • July 2, 2021
  • 5 replies
  • 2425 views

Hi, i created an Air App, using more than 1 video in diferent layers,

 

the app has buttons to show and play the videos.

when tested in Air for mobile all videos are shown and played.

 

When publishing I add the video files links on the AIR for andoid settings. at Included files.

When installed on the android device only 1 video is visible.

 

Attached settings image. 

appreciate any help!

 

thanks!

 

    Correct answer kglad

    This is a screenshot of the setup, ant the error i get whn i test.

     


    mc1 and mc2 are instance names of two movieclips on stage 

    5 replies

    Participant
    April 2, 2022

    I am a newbie and I am having the same problem.

    kglad
    Community Expert
    Community Expert
    April 2, 2022

    which is what?

    oro1985Author
    Known Participant
    July 4, 2021

    Here is the code im using:

    LA_INDIA.visible = false;
    
    background_slider.button_LA_INDIA.addEventListener (MouseEvent.CLICK, play_LA_INDIA);
    
    function play_LA_INDIA(event:MouseEvent):void
    
    {
      LA_INDIA.visible = true
      LA_INDIA.la_india_dormida_video.play();
    }
    
    background_slider.seeatt_LA_INDIA.CHORRO_LINK_1.addEventListener (MouseEvent.CLICK, play_LA_INDIA_2);
    
    function play_LA_INDIA_2(event:MouseEvent):void
    
    {
      LA_INDIA.visible = true
      LA_INDIA.la_india_dormida_video.play();
    }
    
    LA_INDIA.back_LA_INDIA.addEventListener (MouseEvent.CLICK, back_LA_INDIA);
    
    function back_LA_INDIA(event:MouseEvent):void
    
    {
    	LA_INDIA.la_india_dormida_video.stop();
    	LA_INDIA.la_india_dormida_video.seek(0)
    	LA_INDIA.anim_LA_INDIA.gotoAndStop(1);
    	LA_INDIA.visible = false
    	menu_inicial.gotoAndStop(1);	
    }
    
    LA_INDIA.stop_LA_INDIA.addEventListener(MouseEvent.CLICK, stop_LA_INDIA);
    
    function stop_LA_INDIA(event:MouseEvent):void
    {
    	LA_INDIA.la_india_dormida_video.pause();
    }
    
    LA_INDIA.play_LA_INDIA.addEventListener(MouseEvent.CLICK, play_LA_INDIA_3);
    
    function play_LA_INDIA_3(event:MouseEvent):void
    {
    	LA_INDIA.la_india_dormida_video.play();
    }
    oro1985Author
    Known Participant
    July 5, 2021

    put one flvpb instance on stage with no source assigned in the comp param panel, assign it an instance name (eg, flvpb), and add two mcs (mc1 and mc2).  add code

     

    for(var i=1;i<=2;i++){
    this["mc"+i].addEventListener(MouseEvent.MOUSE_DOWN, f);

    }

    function f(e:MouseEvent):void{
    if(e.currentTarget.name.indexOf("1")>0){
    flvpb.source="vid1";  // use valid name

    } else {
    flvpb.source ="vid2";  // valid name

    }

    }

     


    i get this error: 

    oro1985Author
    Known Participant
    July 3, 2021
    hi here example of the code:

    //1-EL MACHO

    EL_MACHO_VIDEO.visible = false;

    background_slider.button_1.addEventListener (MouseEvent.CLICK,
    FunctionName);

    function FunctionName(event:MouseEvent):void

    {
    EL_MACHO_VIDEO.visible = true
    EL_MACHO_VIDEO.movieClip_8.play();
    }

    background_slider.seeatt_chorro.CHORRO_LINK_1.addEventListener
    (MouseEvent.CLICK, openatt_1);

    function openatt_1(event:MouseEvent):void

    {
    EL_MACHO_VIDEO.visible = true
    EL_MACHO_VIDEO.movieClip_8.play();
    }

    EL_MACHO_VIDEO.back_chorro.addEventListener (MouseEvent.CLICK,
    FunctionName3);

    function FunctionName3(event:MouseEvent):void

    {
    EL_MACHO_VIDEO.movieClip_8.stop();
    EL_MACHO_VIDEO.movieClip_8.seek(0)
    EL_MACHO_VIDEO.info_anim.gotoAndStop(1);
    EL_MACHO_VIDEO.visible = false
    menu_inicial.gotoAndStop(1);
    }

    EL_MACHO_VIDEO.stop_macho.addEventListener(MouseEvent.CLICK,
    fl_ClickToPauseVideo);

    function fl_ClickToPauseVideo(event:MouseEvent):void
    {
    EL_MACHO_VIDEO.movieClip_8.pause();
    }

    EL_MACHO_VIDEO.play_macho.addEventListener(MouseEvent.CLICK,
    fl_ClickToPlayVideo_4);

    function fl_ClickToPlayVideo_4(event:MouseEvent):void
    {
    EL_MACHO_VIDEO.movieClip_8.play();
    }
    oro1985Author
    Known Participant
    July 3, 2021

    ive tried changing directory, reloading videos but i cant make it play more than 1 video.

     

    any help ewould be appreciated.  thanks!

    oro1985Author
    Known Participant
    July 2, 2021

    the only visible video is : video/cerro_pajita_video.mp4

     

    o