473,387 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

vb.net 2005 shockwave file not playing

Hi,

I'm trying to create a class (see code below) that will give me direct
control over a flash component, and still have it as a form control. To
do this I'm retrieving data from the database that tells me which file
to load etc.

However, whilst I get no errors, the flash movie won't play. I've tried
inheriting form various controls, but they all exhibit the same
behaviour. I've tried looking at the variables of SWF and I get the
following...

Playing = true
CurrentFrame = -1 - It is always -1
ReadyState = 3
TotalFrames = [Data not yet available]

Any help would be greatfully recieved.
TIA
Rich

Imports System.Collections

Public Class iQ_Flash

Inherits ContainerControl

Private SWF As New ShockwaveFlashObjects.ShockwaveFlash

Public objectID As Integer
Public mediaPath As String
Public connStr As String
Public pVisable As Boolean
Public Sub New(ByVal debug As Integer, ByVal mediaPath As String,
ByVal connstr As String, ByVal objectID As Integer, ByVal pVisable As
Boolean, ByVal pTop As Integer, ByVal pLeft As Integer, ByVal pHeight
As Integer, ByVal pWidth As Integer)
Me.mediaPath = mediaPath
Me.connStr = connstr
Me.objectID = objectID
Me.pVisable = pVisable
Me.Top = pTop
Me.Left = pLeft
Me.Height = pHeight
Me.Width = pWidth

loadFLASH(objectID, connstr)

End Sub

Sub loadFLASH(ByVal objectid, ByVal connstr)

Dim sqlConn As New SqlConnection(connstr)
Dim sql As String = "select * from pageObjectFLASH where
objectid=" + objectid.ToString

Dim adapter As SqlDataAdapter = New SqlDataAdapter(sql,
sqlConn)
Dim pageObjectFLASH As DataSet = New DataSet

adapter.Fill(pageObjectFLASH, "pageObjectFLASH")

Dim pRow As DataRow

For Each pRow In pageObjectFLASH.Tables("pageObjectFLASH").Rows

SWF.Movie = mediaPath + "\" + pRow(1)
SWF.Play()

Next

MsgBox(SWF.Movie + "-" + SWF.TotalFrames.ToString)

SWF.Play()
sqlConn.Close()

End Sub

Sub myShow()

SWF.StopPlay()
SWF.Play()

Me.Show()

End Sub


End Class

Feb 16 '06 #1
0 2197

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Isaac Grover | last post by:
Hi everyone, I have recorded some conference calls for my business partners, put them online in Shockwave audio format using a player available from Shockwave. And I'm encountering an annoying...
9
by: Keith Rowe | last post by:
Hello, I am trying to reference a Shockwave Flash Object on a vb code behind page in an ASP.NET project and I receive the following error: Guid should contain 32 digits with 4 dashes...
1
by: UJ | last post by:
Is there any way with the Shockwave object to tell when a SWF file has finished playing? It would be nice if there was an event like in the Media Player that is called when the state changes. ...
0
by: UJ | last post by:
I have a shockwave object that plays an object. Works fine. When it's done, I want to load another file. Problem is, I have an event on the PlayStateChange that checks the status of the control to...
3
by: regtrashcan | last post by:
I have a webpage that detects whether Shockwave Player is installed and the version number. The javascript/vbscript that I use has worked fine until the latest release of the Shockwave Player. I am...
5
by: UJ | last post by:
I have a program that uses the Shockwave Flash Objects (ShockwaveFlashObjects) to display a SWF. Everything works fine. When IE7 is installed on the machine, suddenly we get an 'Invalid char line...
0
xxoulmate
by: xxoulmate | last post by:
what can i do or what components is much better to use., on playing a flash file (swf) i use shockwave flash(flashb8.ocx) but i cnt control the flash. i mean is there a way to know if the flash file...
2
xxoulmate
by: xxoulmate | last post by:
Hi! is there a way to control the shockwave flash in vb., i try to control the flash but., it cn't stop as is, neither i cnt determine whether the flash is finished on playing. cud i seek help,,,,tnx
0
by: kimiraikkonen | last post by:
Hi, First i faced that bug in VB.NET 2005 then saw the "same" in Visual C# .NET 2005. If you try to insert a "shockwave flash object" to your project you get error message. The shortest solution...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.