FlashPlayerWrapper "Beta Release"

Discussion in 'Additional Libraries' started by Cableguy, Dec 16, 2008.

  1. Cableguy

    Cableguy Expert Licensed User

    FlashPlayerWrapper "ALPHA Release"

    Playing Flash files has been possible, since the release of the WebBrowser Library, but we could not Control the Movie being played...

    I found a very interesting piece of code, wich wrapped a Flash Movie Player, and took a peak at it...

    The result is my FlashPlayerWrapper...

    This DESKTOP wrapper consist of 3 seperate dlls, that must all be in the same Folder...
    You only need to add as a component the FlashWrapper.dll...

    With the very usefull sugestions from marathon332, Here's what IS DONE:

    ALPHA RELEASE 0.1

    The constructor now has a new syntax:
    New(FormName) were FormName is the Form To host the FlashPlayer Control
    Author - Returns my Nickname...
    DllVersion - Returns "0.1"
    Left - sets/gets the corresponding value
    Top - sets/gets the corresponding value
    Width - sets/gets the corresponding value
    Height - sets/gets the corresponding value
    Movie - The FileName of the file to be played. * Usualy the movie plays automatically after this line.
    Enabled - sets/gets the corresponding value
    TotalFrames - GETS the total number of frames in the current file
    MenuEnabled - sets/gets the corresponding value, this being the context menu..
    MovieLoop - sets/gets the corresponding value, Had to add the prefix "Movie" because the IDE was having some issues with it..
    BackColor - sets/gets the corresponding value
    Mode - sets/gets the corresponding value, possible values are "Window", "Opaque" and "Transparent"
    Quality - sets/gets the corresponding value. possible most common values are "Low", "Medium" and "Best"
    CurrentFrame - returns the current Frame number.
    Play - Starts the file.
    Stop - hugh, Stops the file.
    Foward - Speeds up the file playing
    Back - Not sure about this one, I need a biggers swf to test...
    Rewind - Same as a video player I guess..
    Focus - Sets the focus to the player, if possible
    GotoFrame(Frame) - Jumps to a specific frame, the playing gets stopped...
    Zoom - Cool feature but a bit confusing...It does zomm the movie, but i cant make sense of the range...Play a bit with it...
    Dispose - Well, disposes of the control

    Since this is still an alpha releas, this IS the help file..
    When I release V1.0, I will also provide the cs and chm files.

    I will also try to combine this 3 parts dll into a single dll, but this may take some time to acomplish...
     

    Attached Files:

    Last edited: Dec 20, 2008
  2. Mr_Gee

    Mr_Gee Active Member Licensed User

    this is great!
    Christmas came early this year ;-)

    Any chances this will be ported to the PPC?
     
  3. Cableguy

    Cableguy Expert Licensed User

    Thanks for your Words MrGee...
    This DLL is still in a very embryonary stage, and some more usefull and powerfull functions and events will be added...
    I don't think a device version will be possible at this point, as flash support for the device, not WebBrowser embeded, is also very recent, but I will try it...
    I would like to know from the Users with more Flash knowleage than me, what are the props, methods and events that they would like to see implemented, in order to achieve TRUE Flash movie playing control...
     
  4. marathon332

    marathon332 Member Licensed User

    This is great...

    How do you load a movie into the flash player?

    I tried swf.Movie("example.swf") but it won't work. What's the trick?

    Keep up the good work cableguy!

    --Steve
     
  5. Mr_Gee

    Mr_Gee Active Member Licensed User

    This is what I did

    Code:
    Sub App_Start
        Form1.Show
    'FP = FlashPlayer Object 
        FP.New1("Form1",0,0,Form1.Width, Form1.Height)
        FP.Movie = AppPath &
    "\449961_StarBaron.swf"
    End Sub
    Sub mnuPlay_Click
        FP.Play
    End Sub
     
  6. marathon332

    marathon332 Member Licensed User

    Thanks Mr.Gee!

    That did the trick...

    Sure hope this gets developed further because I have a lot of flash animations that I can use.

    --Steve
     
  7. Cableguy

    Cableguy Expert Licensed User


    At least one more release will be posted, with version number, but I NEED the users to tell me what props, methods and events ARE USEFULL in swf playing...
     
  8. marathon332

    marathon332 Member Licensed User

    CableGuy:

    I'll try to give you some useful feedback.

    A Frame property would be good so that the animation can be controlled on the main timeline. Such as Goto Frame 1 or Stop Frame 1

    Disabling the right-click menu so that you don't get all the options would be handy too since the flash would be embedded and users shouldn't have too many options there that could mess up on the presentation.

    A means of passing variables to and from the flash movie would be excellent since flash has a lot of Internet data connectivity.

    Making the flash transparent would be very useful for interface applications. You could then have fancy animated buttons.

    Making a device version would be excellent but maybe not possible as you've indicated previously.

    As of now I'm having problems controlling the height and width of the flash object. Not sure if you can overcome that or not.

    That's it for now, but if I can think of any others, I'll add to the list..

    Keep up the good work CableGuy.

    --Steve
     
  9. Cableguy

    Cableguy Expert Licensed User

    Thanks for the sugestions, i believe most of then are "easely" implemented...

    I too had some issues understanding why I couldn't set the width and height of my sample swf file, but then, moving the height and width props to AFTER the movie propertie solved it...
     
  10. Cableguy

    Cableguy Expert Licensed User

    @marathon332
    Could you please upload a swf file with known Frames count, variables etc so I can run some tests...?
    I will be working on this tomorrow aftermoon, and probably be releasing v0.1 ln early evening....
     
  11. marathon332

    marathon332 Member Licensed User

    CableGuy:

    I'll upload something later today...

    --Steve
     
  12. Cableguy

    Cableguy Expert Licensed User

    Done. GotoFrame(frame)
    Done. MenuEnabled=True/False
    Still trying to understand how this works. I need a movie with known variables so that I can check interaction.
    Still to be implemented...hopefully tomorows first update will have also this implemented.
     
  13. marathon332

    marathon332 Member Licensed User

    CableGuy:

    Here are the flash files...

    The American flag is just an animation on the main timeline. It has 35 frames.

    The MapZoom is a flash file that zooms a map in and out with a slider. You can set the zoom from the main timeline. The actionscript is AS2.

    I've included source code compatible with Flash 8 for both files.

    Any questions, let me know...

    --Steve
     

    Attached Files:

  14. Cableguy

    Cableguy Expert Licensed User

    All I'm getting is corrupted files after download..
    Please re-upload the files..
     
  15. marathon332

    marathon332 Member Licensed User

    Sorry,

    I forgot to mention that these files are rar files. I renamed them to zip so that I could upload them.

    Just rename the extension to rar and unpack with winrar...

    Also, I thought of some other suggestions for the flash wrapper...

    The object should have its own click event for use as a button.

    It would be nice to have rotation too such as rotate(90) or such.

    Also, loading of external swf, flv and jpg would be handy. Loading an external flv or swf would allow you to make a cool movie/pic viewer..

    Sorry about the mistake and keep up the great work.... you're doing a fine job!

    --Steve
     
  16. Cableguy

    Cableguy Expert Licensed User

    Hi marathon332

    Yhis is comming along quite nicely...
    A lot of new Props and methods have been added, and later today I will be posting the Version 0.1 of this Dll, wich i consider to be an "Alpha" release...
    I have found some very interesting articles about the flash movies properties, and now NEED a KNOWN TO BE TRANSPARENT movie to test the Mode setting property...
    Do you have any?
     
  17. marathon332

    marathon332 Member Licensed User

    CableGuy:

    That's excellent...

    I don't have a transparent flash but all you need is a png graphic with transparency in the swf.

    Do you have Flash installed? If not, I'll whip one up for you later. I'm on the go right now...

    The main movie background cannot be set to transparent, so you need to specify a color for that.

    Looking forward to your Alpha release...

    --Steve
     
  18. Cableguy

    Cableguy Expert Licensed User

    No, I havent, can you please provied me with one?
    Interesting, needs more testing...
     
  19. Cableguy

    Cableguy Expert Licensed User

    ALPHA VERSION 0.1 RELEASED....
    See post #1
     
  20. marathon332

    marathon332 Member Licensed User

    CableGuy:

    You're moving along quickly with this...

    The attached file is a 550x400 movie with a transparent animation. There are 6 frames and the background is white.

    As before, rename the zip file to rar and use winrar...

    Hope this helps out and thanks for making this possible.

    BTW, will the flash wrapper source code be available at any point?

    Thanks,

    --Steve
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice