Results 1 to 7 of 7

Thread: VB6.0 - Basic Flash Player

  1. #1
    Web developer Nightwalker83's Avatar
    Join Date
    Dec 01
    Location
    Adelaide, Australia
    Posts
    9,723

    VB6.0 - Basic Flash Player

    Hi,

    Here is a basic flash player I made in VB6.0 you can download the source code below.

    Below is the current code!

    Code:
    'By Aaron "Nightwalker83" Spehr
    Dim n As Integer
    
    Private Sub File1_Click()
    File1.Drag
    End Sub
    
    Private Sub Form_Load()
    'Set the background colour, etc
    Me.BackColor = &H80000008
    Me.BorderStyle = Sizable
    File1.Pattern = "*.swf"
    File1.DragMode = 0
    End Sub
    
    Private Sub Form_Unload(Cancel As Integer)
    'Close the program
    Unload Me
    End
    End Sub
    
    Private Sub ShockwaveFlash1_DragDrop(Source As Control, X As Single, Y As Single)
    'This loads the movie
    Call ShockwaveFlash1.LoadMovie(0, File1.Path + "\" + File1.FileName)
    End Sub
    
    
    Private Sub Dir1_Change()
    File1.Path = Dir1.Path
    End Sub
    
    Private Sub Drive1_Change()
    On Error GoTo err:
    Dir1.Path = Drive1.Drive
    Exit Sub
    err:
    MsgBox ("Please choose another drive!")
    End Sub
    I can't get the keyboard to interact with the flash control. However, I have noticed that if the screen is big enough you can use the control inside the flash movie to start, stop, etc.

    Check link below for any problems relating to getting the project to work correctly.

    Nightwalker

    Edit:

    Just a word of warning though, use the above code with flash 10e or earlier, the other versions of flash 10 seem to have problems which, can be talked about in this thread.
    Attached Files Attached Files
    Last edited by Nightwalker83; Oct 9th, 2011 at 08:01 PM. Reason: Adding more
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    Please consider giving me some rep points if I help you a lot.
    DON'T BUMP YOUR POSTS!!! Links to my code examples can now be found on my website: My websites
    Please rate my post if you find it helpful!
    Technology is a dangerous thing in the hands of an idiot! I am that idiot.

  2. #2
    Web developer Nightwalker83's Avatar
    Join Date
    Dec 01
    Location
    Adelaide, Australia
    Posts
    9,723

    Re: VB6.0 - Basic Flash Player

    I have created the code below to re-size the player and also player online shockwave flash files.

    vb Code:
    1. Private Sub Command1_Click()
    2. '15/01/2011
    3. ' Play a streaming video
    4. ' The base url
    5. ShockwaveFlash1.Base = "http://www.mysite.com/Nights%20Hell%20Hole/"
    6. 'URL leading the actual movie file
    7. ShockwaveFlash1.Movie = "http://www.mysite.com/Nights%20Hell%20Hole/media/media.swf"
    8. Call ShockwaveFlash1.Play
    9. End Sub
    10.  
    11. Private Sub Form_Resize()
    12. '15/01/2011
    13. 'Resize the the shockwave flash player
    14. ShockwaveFlash1.Height = Me.Height
    15. ShockwaveFlash1.Width = Me.Width
    16. End Sub
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    Please consider giving me some rep points if I help you a lot.
    DON'T BUMP YOUR POSTS!!! Links to my code examples can now be found on my website: My websites
    Please rate my post if you find it helpful!
    Technology is a dangerous thing in the hands of an idiot! I am that idiot.

  3. #3
    Web developer Nightwalker83's Avatar
    Join Date
    Dec 01
    Location
    Adelaide, Australia
    Posts
    9,723

    Re: VB6.0 - Basic Flash Player

    This code allows you to move the animation to the frame specified:

    vb Code:
    1. 'Replace "2" with the frame number you want the animation to jump to.
    2. Private Sub cmdGoto_Click()
    3. Call ShockwaveFlash1.GotoFrame(2)
    4. End Sub
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    Please consider giving me some rep points if I help you a lot.
    DON'T BUMP YOUR POSTS!!! Links to my code examples can now be found on my website: My websites
    Please rate my post if you find it helpful!
    Technology is a dangerous thing in the hands of an idiot! I am that idiot.

  4. #4
    PowerPoster
    Join Date
    Feb 06
    Posts
    8,571

    Re: VB6.0 - Basic Flash Player

    The source you give for that flash.ocx is violating Adobe's licensing terms.

    Basically in order to use Flash as a user, you must download and run the full installer package. To redistribute Flash you must apply for a license to do so, and then you still must give the user the whole install package and they must run it and go through the setup user interface.

    Silent installs of all or part of Flash violates the licensing terms.

  5. #5
    Hyperactive Member DavesChillaxin's Avatar
    Join Date
    Mar 11
    Location
    WNY
    Posts
    423

    Re: VB6.0 - Basic Flash Player

    Quote Originally Posted by dilettante View Post
    The source you give for that flash.ocx is violating Adobe's licensing terms.

    Basically in order to use Flash as a user, you must download and run the full installer package. To redistribute Flash you must apply for a license to do so, and then you still must give the user the whole install package and they must run it and go through the setup user interface.

    Silent installs of all or part of Flash violates the licensing terms.
    ...and that's why flash fails.
    Please rate if my post was helpful!
    Per favore e grazie!




    Code Bank:
    Advanced Algebra Class *Update | True Gradient Label Control *Dev | A Smarter TextBox *Update | Register Global HotKey *Update
    Media Library Beta *Dev | Mouse Tracker (Available in VB.net and C#.net) *New | On-Screen Numpad (VB.net) *New

  6. #6
    Frenzied Member ladoo's Avatar
    Join Date
    Nov 12
    Posts
    1,068

    Re: VB6.0 - Basic Flash Player

    very nice walker nice!!!!!!!!!!!!!!!!!!

  7. #7
    PowerPoster
    Join Date
    Feb 06
    Posts
    8,571

    Re: VB6.0 - Basic Flash Player

    Quote Originally Posted by DavesChillaxin View Post
    ...and that's why flash fails.
    The main reasons are that (a.) Adobe doesn't want users complaining that Flash got installed "by stealth" onto a system, (b.) that they get credit for it, and most importantly (c.) that the mechanism to provide security patches and other updates gets put into place on users' machines.

    The free license is to make sure that developers are aware of and conform to these requirements - or face litigation.

Posting Permissions

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