Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 14 of 14
  1. #1
    Join Date
    Aug 2009
    Posts
    11

    Grin "ON FINISH" evento for Flash?

    Is there a way to set an ON FINISH event to a flash file (without be necessary to open the FLASH program and write fscomands)?

  2. #2
    Join Date
    Aug 2003
    Posts
    2,427
    You have obviously done a search of the forum .

    I don't know of a direct way but perhaps if you know how long it should play for, you could use a timer.

  3. #3
    Join Date
    Aug 2009
    Posts
    11
    thanks longedge,

    Yes, I did a search before asking the forum.
    What I want is to lunch some actions at the finish of the flash files, like appearing some buttons, dialog messages etc. My project has dozens of flash files; I am looking for a way to set the actions at the on finish event of the files.

    But seems that I will have to edit each of the files to set a fscomand. Would be better if the flash movies could have the same events of AVI files, like on finish, and not only the fscomannds.

  4. #4
    Join Date
    Oct 2009
    Location
    127.0.0.1
    Posts
    279
    It would be hard to detect the actual "end" of a flash movie in some instances. Some flash files are several layers deep and although the main time frame ends on frame 10, a movie in the layer may continue play on until frame 60. It would be difficult for any program to detect the finish without a confirmation or command from flash. A better choice may be using the free encoder Format Factory (http://www.pcfreetime.com/download.html) and convert your flash files to videos.
    There are 10 types of people in the world: those who understand binary, and those who don't.

  5. #5
    Join Date
    Aug 2003
    Posts
    2,427
    Quote Originally Posted by Scriptonite View Post
    ....convert your flash files to videos.
    You lose a lot of the benefits of using flash objects though. My uses are as buttons and timers (and sometimes as videos) all of which I create from scratch. Possibly a different story if you are using an .swf where you don't have control of the source. Conversion would probably take as long as pasting a couple of lines of code in the last frame of the .fla.

  6. #6
    Join Date
    Oct 2009
    Location
    127.0.0.1
    Posts
    279
    I agree that flash is extremely beneficial. I have a program that has a flash interface with changeable text that is updated through the .swf and AMS just processes and handles the data. The flash is extremely versatile inside AMS. It sounded like he only had the .swf of the files though, and Format Factory is a batch converter that is pretty speedy unless you are using the disk functions. I only meant that if you are using the flash to playback animated content then there is no reason the files need to be in a flash format.
    There are 10 types of people in the world: those who understand binary, and those who don't.

  7. #7
    Join Date
    Aug 2003
    Posts
    2,427
    Quote Originally Posted by Scriptonite View Post
    ... if you are using the flash to playback animated content then there is no reason the files need to be in a flash format.
    I agree you have to be aware of all (or most anyway) the options whilst bearing in mind the drawbacks.

  8. #8
    Join Date
    Aug 2009
    Posts
    11

    Grin How to stop a video in the last frame?

    Well, after trying a little, I think the best option is to use another file format, instead flash. With WMV, for example, I can set an ON FINISH event, and that event is very important because I want to ask questions to the user about the position in the last frame of the video.

    When the video finish, then the on finish event will lunch the buttons with the questions.

    But the problem is that the video is not stopping in the last frame, there is a BLACK SCREEN. I need the video stopping in the last frame, in a STILL frame.

    I was reading another similar post, in http://www.indigorose.com/forums/sho...ighlight=frame but the answers there are not clear.

    I will have dozens of videos in my project, and I need a way to do it fast, without spending so much time in each video.

  9. #9
    Join Date
    Aug 2003
    Posts
    2,427
    There's always a way to achieve what you want. Assuming the video is not set to loop, when you detect the video has stopped you could perhaps seek backwards a second or two.

  10. #10
    Join Date
    Oct 2009
    Location
    127.0.0.1
    Posts
    279
    I had similar problem with the video object in a project, I switched to the mediaplayer plugin and it resolved these issues. Before I figured that out however, I used AMSWaves timer plugin and set the timer based on Video.GetLenth to trigger a function to change videos.
    There are 10 types of people in the world: those who understand binary, and those who don't.

  11. #11
    Join Date
    Oct 2009
    Location
    127.0.0.1
    Posts
    279
    Sorry my mistake, it's actually the timer object by Reteset.
    There are 10 types of people in the world: those who understand binary, and those who don't.

  12. #12
    Join Date
    Aug 2009
    Posts
    11

    solution

    Using a WMV file, I set an ON FINISH event like this:

    Video.Seek("Video1", SEEK_END, 0);
    Video.Pause("Video1");
    Button.SetVisible("Button1", true);

    It works OK, the video stop in a still last frame, and not a black screen.

    I have another question now: I want to set visible 4 buttons. How can I set the 4 buttons to visible in just one line? I tried:

    Button.SetVisible("Button1", "Button2", "Button3", "Button4",true);
    and also tried:
    Button.SetVisible("Button1, Button2, Button3, Button4",true);

    but in both cases I got an error message.

  13. #13
    Join Date
    Aug 2003
    Posts
    2,427
    Posting the same question in two different threads will cause confusion .

    I've given a couple of possibilities in your other post.

  14. #14
    Join Date
    Aug 2009
    Posts
    11

    no redundance!

    ok longedge, you are right, it is better do not have redundance in the forum!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts