cancel the progressive download with FLVPlayback

I created a SWF file with three main sections. Every section has at least one video that is displayed using the FLVPlayback component. To reduce the bandwidth and the unnecessary process in general, I want the tapes only dependants if the user currently viewing this article.

The first part is quite simple: just call the method for the FLVPlayback source until the video is necessary. Great, works very well. However, problems arise to cancel the download.

I searched the documentation from Adobe, and it seems almost impossible to stop a progressive download using FLVPlayback. (To be honest, I just use FLVPlayback so I can't build my own player.   ) "This is a whole other level of complexity that simply, I don't want to get into, unless ABSOLUTELY necessary.) 

Methods from Adobe that puts an end to the watercourse (closeVideoPlayer(), etc.) make the occurrence of FLVPlayback once called useless. I was looking for a way to stop a download AND be able to reuse the FLVPlayback instance.

So, I did some research one came in the following script:

http://Pastie.org/310174

To test this, I created a simple file (ACE is below) with only a FLVPlayback component and a button on the stage. The button is linked to a function that erases the video and then resets the FLVPlayback instance to read the file again.

Everything works (play, pause, volume, etc.). Except that once the button has been clicked and the reset function has been called, by clicking on the stop button of the component "break" the player. The seekbar component displays its streaming mode and clicking on any other button inside the player does nothing. (I couldn't reproduce the problem in the Flash IDE (imagine that!), but it seems constantly during the test in a browser.)

Being relatively new AS, I have really no idea of what is "under the hood" in the FLVPlaybackUtils class file. What can I do to fix this? y at - it a better way to go about this?

Any help would be greatly appreciated.

---------------------------------------------------------------------------------

Fl.video import. *;

Import FLVPlaybackUtils;

myFLVPlayback.autoPlay = false;

myFLVPlayback.autoRewind = true;

myFLVPlayback.fullScreenTakeOver = false;

function onClick(event:MouseEvent):void

{

myFLVPlayback.addEventListener (VideoEvent.AUTO_REWOUND, clearVideo);

myFLVPlayback.stop ();

}

button.addEventListener (MouseEvent.CLICK, onClick);

function clearVideo(event:VideoEvent):void

{

myFLVPlayback.removeEventListener (VideoEvent.AUTO_REWOUND, clearVideo);

FLVPlaybackUtils.reset (myFLVPlayback);

resetVideo();

}

function resetVideo (): void

{

myFLVPlayback.autoPlay = false;

myFLVPlayback.autoRewind = true;

myFLVPlayback.fullScreenTakeOver = false;

myFLVPlayback.source = "http://myFLVPlayback.url.example"; ""

}

you use something like:

Import fl.vido.FLVPlayback;

var myFLVPlayback:FLVPlayback;

function closeVideoF (): void {}

var a: Array = [];

a.push (myFLVPlayback.x);

a.push (myFLVPlayback.y);

a.push (myFLVPlayback.Width);

a.push (myFLVPlayback.Height);

myFLVPlayback.closeVideoPlayer (?);

myFLVPlayback = new FLVPlayback();

myFLVPlayback.x = a [0];

etc.

}

Tags: Adobe Animate

Similar Questions

  • Interrupt the progressive download help

    I'm looking for a way to stop the 'progressive download' a flv file.
    I use a .swf to call in the flv source and assign to flvplybk by a flashvar. I use a metadatareceived listener object to load the flashvars param tags. The flv file is 150Meg. The flv downloading is no matter what client side short of the computer being off. Destruction of the object programmatically has no effect. Any attempt by the client browser (IE7 or FF 2.0) to clear the cache translates the complete system failure leading to hard reboot.

    Here's the actionscript *.

    Mx.video import. *;
    Stage.scaleMode = "noScale";

    my_FLVPlybk.contentPath = _level0.myVideo;
    my_FLVPlybk.skin = _level0.mySkin;
    my_FLVPlybk.AutoPlay = false;


    var listenerObject:Object = new Object();
    listenerObject.metadataReceived = {function(eventObject:Object):Void}
    my_FLVPlybk.width = _level0.myWidth;
    my_FLVPlybk.height = _level0.myHeight;
    my_FLVPlybk.skinAutoHide = false;
    Stage.Align = "TL";
    Stage.Width = _level0.myWidth;
    _Level0.myHeight = Stage.Height;

    }
    my_FLVPlybk.addEventListener ("metadataReceived", listenerObject);

    Here is the embed code object *.

    < object classid = "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase ="" http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8, 0,0,0 " width ="800"height ="450">"
    < param name = "movie" value = "player.swf" / > "
    < param name = "FlashVars" value = "myVideo = movie.flv & mySkin = control.swf & myWidth = 800 & myHeight = 500" >
    < param name = "quality" value = "high" / >
    < param name = "bgcolor" value = "#ffffff" / >
    "" < embed src = "player.swf" FlashVars ="myVideo = movie.flv & mySkin = control.swf & myWidth = 800 & myHeight = 500" quality = "high" bgcolor = "#ffffff" width = "800" height = "500" name 'player' = align = "middle" allowScriptAccess = "sameDomain" type = "application/x-shockwave-flash" pluginspage = " http://www.macromedia.com/go/getflashplayer ' / >
    < / object >

    Flash 8 professional is used to generate the .swf

    Any help would be appreciated.

    Hi, I'm not 100% sure I understand what your problem is, but here's an example of how do to cancel a request to download flv. You must set the activeVideoPlayerIndex of the player to something other than zero (we will use 1), because it is impossible to close the player by the index 0. Then we use the method closeVideoPlayer on the FLVPlayBack component to stop the request coming from the load method of the player:

  • iPad 2 Mini stuck on the progress bar with the Apple logo and progress bar is not loaded, his impasse

    I pressed on restart all the settings on my iPad Mini 2, so it loaded but it drained. So I rebooted it until he turned back when he turned his back, it was still showing the progress bar, but it was quite moving. I tried to hold down the lock button and the home button, but still, it loads, its stuck on the progress bar and did not progress. I tried to connect to my computer to connect to itunes, but it does Duke host because its deadlock on the progress bar with the apple logo.  .pls help me!

    Try restoring your backup and recovery mode: If you cannot update or restore your iPhone, iPad, or iPod touch - Apple Support

  • Need for a dedicated server with the progressive download video

    I'm likely to need to have a dedicated server for my Web site, which has a page with progressive downloaded video?

    Correct, you should not need a dedicated server for only 7 videos.

  • Vista will not start - stuck on the progress bar with MS logo

    Yesterday afternoon, my HP desktop PC would not initialize. The progress bar would be continually scroll down with MS logo, and it will never change. I tried unplugging all USB ports and running system recovery. This morning, the PC said something to the tune of «this machine could not be restored...» If you have recently made a hardware change try to return to your old configuration. If problems persist, please contact your administrator. »

    We had the machine for about 18 months with no problems at all. It is equipped with AMD processors and is running 32-bit Vista Home Premium. I currently have anti-virus protection of software and spyware. I don't think that the office came with a recovery CD. There is a restore disc but I don't know if that was consulted. I tried to boot normally and repair the command prompt startup files with no luck.

    I hope that we bought the extended warranty from Staples, but meanwhile information or suggestions would be greatly appreciated.

    Thank you

    lucasmartin,

    The Advanced Boot Options menu lets you start Windows in advanced troubleshooting mode. You can access the menu by turning on your computer and pressing the F8 key before Windows starts. Try the loads up in safe MODE , there may be some drivers that are corrupt or using last known good Configuration.

    For more information http://windowshelp.microsoft.com/Windows/en-US/Help/f9c50a72-04ec-4088-9fd4-a4f979eef5a71033.mspx#EAF

    Engineer Support Justin M. Microsoft Answers visit our Microsoft answers feedback Forumand let us know what you think.

  • How to cancel the print job with HP8610 Control Panel

    Is it possible to cancel a job using the control panel of the HP8610 instead of using the Task Manager?

    @LucyRicky,

    If a print job is in progress, you should see an option 'Cancel' on the display on the printer. Press Cancel to stop the print job.

    I hope that helps!

  • My dsc-wx200 cancels the import image with wifi on its own.

    Hello, my dsc wx200 can connect to my computer and "preparing to import" the PlayMemories window appears, and he finds the images I want to import. But my camera gets stuck on "sending...". "part and on the screen LCD it says for a fraction of second something in the sense of"cancel import", then it turns off. PlayMemories import window progress bar goes full and said that where imported images, but they were not in reality. I tried to uninstall/reinstall the drivers, but that doesn't seem to work. I am running Windows 7 64 bit and I recently changed my motherboard, but I don't know if this is the problem and that is that I have no idea of what would be the problem. What should I do to fix this?

    Thank you!

    Good day Tichondrious

    Try resetting the camera it of default factory configuration that could help to correct this problem, please follow the steps below to initialize the device.

    MENU (settings) (main settings) [initialize] [all parameters] [OK] .

    After initialization, connect to your wireless network and import the files to Playmemories House. The guide on how to connect the camera to the wireless access point is located on the following link. Parameters of the Access Point.

    If my post answered your question, please mark it as "accept as a Solution.

  • progressive download with multiple video files, noob user.

    I have here a question of "minor".

    I need to make a swf file and load external video files to it, which will be online, and along the clip key to have the ability to load more video clips in the player, the clip currently playing.

    I had a little experience with flash, I can read/change actionscript a little. how hard it would be to do?

    Pointers where I can get the examples/tips on how to do it?

    Thanks in advance,

    Manual zeeman

    Design & illustration

    Yes, it is possible, but you'll need to preload the clips so the seek point is already downloaded when you want to make the transition.

  • my camera crashed on the first download with what appeared to be done, now it is stuck "downloading desktop creative cloud" to about 10% to 90% internet works fine.

    My machine crashed at the first attempt to download, now the Adobe installer is stuck at 10% when you try to download Creative Cloud desktop. I must purge some files to get going? iMac 10.6.8 Internet service is very good. Thank you.

    Thomh57685518 I strongly encourage you to run Mac OS 10.7 or later if possible.  You can find the system requirements for Cloud applications to creative system requirements | Creative cloud.

  • Problem with progressively downloaded FLV files

    Hello world

    I will be much obliged if anyone can identify the problem here.

    I created a Web site in flash that contains about among other things, 12-13 FLV files in different sections and about 4 audio files. A section does not appear more than one FLV. To view FLV files, I used the function "Import Video" and chose the "progressive download from a Web server" option because the site is hosted on a Web server. Once the import is complete, the video playback component appears on the scene. For audio files, I used the loadSound() function.

    Now the problem is that the videos work very well on some computers, but some other videos, and his game and some are not. I was wondering if the following may be the cause of the DIF:

    (a) the speed of internet connection


    (b) in addition, I have different sections of the Web site on different images on stage (yes I know not the ideal strategy), so when an article with video is met, the program will simply to this image on the stage and the video starts to play that it self. Similarly, when the user switches to a different section, and therefore the program moves to a different frame on scene, I guess the video stops downloading by itself that the player is no more in this context. Is the right way to do it or what I need to add code asking explicitly the video stop before stopping the framework?


    (c) Finally, I was wondering if the videos do not appear because / cache the user of the buffer is full and we need clear this each time before a video is displayed.

    The site is ready to be deployed and its so frustrating that these glitches occurred at the last minute. I'll be grateful for any help/idea.

    Thank you very much

    Essaeyu

    I found the solution. The problem was due to the wrong MIME type in IIS for FLV server. So I changed the MIME of Application/octet-stream video/x-flv type and the website now works fine.

  • Cannot cancel the job

    I have the following comprehensive code. After pressing the Undo button, it must cancel the file download, but it doesn't. It continues to download the file. Do not cancel kill instance (thread) FirstLineService download takes place? What is that cancel when not to kill FirstLineService instance?
    import java.io.BufferedInputStream;
    import java.io.BufferedOutputStream;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.net.MalformedURLException;
    import java.net.URL;
    
    import javafx.application.Application;
    import javafx.concurrent.Service;
    import javafx.concurrent.Task;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.TextField;
    import javafx.scene.layout.VBox;
    import javafx.scene.paint.Color;
    import javafx.stage.Stage;
    
    public class Thr extends Application {
    
         @Override
         public void start(Stage stage) throws Exception {
              // TODO Auto-generated method stub
              final Group rootGroup = new Group();
               final Scene scene = new Scene(rootGroup, 500, 400, Color.GHOSTWHITE);
               stage.setScene(scene);
               stage.setTitle("Testing downloads from Spring");
               stage.show();
               setS(rootGroup);
         }
         
         private void setS(Group rg) {
              VBox vbox = new VBox();
              javafx.scene.control.Button btn = new javafx.scene.control.Button("START!");
              final TextField tf = new TextField();
              javafx.scene.control.Button btnC = new javafx.scene.control.Button("CANCEL!");
              vbox.getChildren().add(btn);
              vbox.getChildren().add(tf);
              vbox.getChildren().add(btnC);
              rg.getChildren().add(vbox);
              final FirstLineService serv = new FirstLineService();     
              btn.setOnAction(new EventHandler<ActionEvent>() {
                   @Override
                   public void handle(ActionEvent arg0) {
                        serv.start();
                        tf.setText("STARTED!");
                   }
              });
              btnC.setOnAction(new EventHandler<ActionEvent>() {
                   @Override
                   public void handle(ActionEvent arg0) {
                        // TODO Auto-generated method stub
                        serv.cancel();
                        tf.setText("CANCELLED!");
                   }
              });
         }
         
         private class FirstLineService extends Service {
    
            protected Task createTask() {
                return new Task<Void>() {
                    protected Void call() {
                         URL url;
                             try {
                                  url = new URL("http://s3.amazonaws.com/dist.springframework.org/release/SPR/spring-framework-3.1.1.RELEASE.zip");
                               InputStream in = url.openStream();
                               File f = new File("spring.zip");
                               BufferedInputStream bin = new BufferedInputStream(in, 1024);
                               FileOutputStream fos = new FileOutputStream(f);
                               BufferedOutputStream bos = new BufferedOutputStream(fos, 1024);
                               int n;
                               System.out.println("Let the download begin!");
                               while((n = bin.read())!=-1){
                                    bos.write(n);
                               }
                               bos.close();
                             } catch (MalformedURLException e) {
                                  // TODO Auto-generated catch block
                                  e.printStackTrace();
                             } catch (FileNotFoundException e) {
                                  // TODO Auto-generated catch block
                                  e.printStackTrace();
                             } catch (IOException e) {
                                  // TODO Auto-generated catch block
                                  e.printStackTrace();
                             }
                          System.out.println("File successfully downloaded!");
                          return null;
                    }
                };
            }
        }
         
         public static void main(final String[] arguments)
         {
              Application.launch(arguments);
         }
    
    }

    Hello. I made 2 small changes:
    1. your loop is incorrect. I replaced

     while((n = bin.read())!=-1){    
    

    with

     while (n !=  -1) {
                                n = bin.read() ;  
    

    2. I added the following to your loop:

       if (isCancelled()) {
    
                   n = -1;  //set eof to true
                   System.out.println("Cancelling...");
                                }
    

    Here's the modified code:

                      protected Void call() {
                        int n = 0;
                        boolean cancelled = false;
                        URL url;
                        try {
                            url = new URL("http://s3.amazonaws.com/dist.springframework.org/release/SPR/spring-framework-3.1.1.RELEASE.zip");
                            InputStream in = url.openStream();
                            File f = new File("spring.zip");
                            BufferedInputStream bin = new BufferedInputStream(in, 1024);
                            FileOutputStream fos = new FileOutputStream(f);
                            BufferedOutputStream bos = new BufferedOutputStream(fos, 1024);
    
                            System.out.println("Let the download begin!");
                            while (n !=  -1) {
                                n = bin.read() ;
                            System.out.println(n);
                                if (isCancelled()) {
                                    cancelled = true;
                                    n = -1;  //set eof to true
                                    System.out.println("Cancelling...");
                                }
    
                                bos.write(n);
                            }
                            bos.close();
                        } catch (MalformedURLException e) {
                            // TODO Auto-generated catch block
                            e.printStackTrace();
                        } catch (FileNotFoundException e) {
                            // TODO Auto-generated catch block
                            e.printStackTrace();
                        } catch (IOException e) {
                            // TODO Auto-generated catch block
                            e.printStackTrace();
                        }
                        if (n == -1  && cancelled) {
                                System.out.println("Task cancelled!");
                            }
                        else {
                          System.out.println("File successfully downloaded!");
    
                        }
    
                        return null;
    
                    }
    
  • progressive download

    Has anyone found a way to disable the progressive download? I would like to make the setting as the entire collection/folio downloads at the same time.

    We call this "download content explicit", a way to trigger the download of a collection complete and mark for offline use. We actively write this feature now. Stay tuned!

    Neil

  • I m trying to install first pro, but beside the page to inform that the download is in progress, nothing happens. The page remains with the message... that.

    I m trying to install first pro, but beside the page to inform that the download is in progress, nothing happens. The page remains with the message... that.

    You MUST have a 64-bit computer and operating system... What is your computer?

    -http://windows.microsoft.com/en-AU/windows7/find-out-32-or-64-bit

  • Hi all, I am wanting to know how to solve this problem, I will have with my creative cloud downloads. I am trying to cancel the application Adobe DC and it download it again. But it's frozen on the "cancellation of...» "and don't move. I can't redownload

    Hi all, I am wanting to know how to solve this problem, I will have with my creative cloud downloads. I am trying to cancel the application Adobe Acrobat DC and it download it again. But it's frozen on the "cancellation of...» "and don't move. I use a mac, I can't redownload until it is gone from the top of the cloud. Can someone tell me if this has happened to them before and what I can do to remove it so I can redownload. Ive put a picture below so that you can understand what I mean.

    Screen Shot 2016-01-22 at 11.30.25 pm.png

    Hello

    Click the "Finder" on your dock to Open a Finder window. Click on 'Applications' in the side bar of the Finder window to see your Mac applications. In this folder, double-click the folder "utilities". Double-click the "Activity Monitor" icon to access the application.

    Now exit Adobe all associates of process as creative cloud, CC, CCX, Core sync, broker CIB Adobe and then launch creative cloud app again and try to download Acrobat.

  • Progressive download video can synchronize with the PlayBar?

    I have 8 Captivate courses with a progressive download video. The video plays well, but it seems that the only way to control the video is of a skin. I prefer not to use skin since using the playback bar course.  Is there a way to do the sync of the course with the video PlayBar?

    Insert the video as drag video and no video event.  Then the play bar can be used to combat it.

Maybe you are looking for