Hello,
How do you display PlaceObject2's image on PictureBox using its name property? I mean, every PlaceObject2 in external SWF file should be added on ArrayList and should be viewed in PictureBox.
I have here the code snippet that views any flashbitmap found on the external SWF file. It populates the arraylist and araylist will be used on displaying images in picturebox. But I am using here FlashBitmap, I want to use PlaceObject2 to show each image using its name.
My Goal is not to include the background image coz in this code, it will get included.
Private Sub ViewImages(ByVal strFC As String)
Dim flash As New FlashContainer(strFC)
Dim imageNumber As Integer = 0
For Each obj As Object In flash.Objects
If TypeOf obj Is FlashBitmap Then
imageNumber += 1
Dim image As FlashBitmap = CType(obj, FlashBitmap)
If image.Bitmap IsNot Nothing Then
myAList.Add(image)
image.Bitmap.Save(tempFolderPath & "\image" & imageNumber & ".png", _
System.Drawing.Imaging.ImageFormat.Png)
End If
End If
Next
MaxVal = imageNumber
If MaxVal <= 1 Then
HScrollBar1.Visible = False
Else
HScrollBar1.Visible = True
End If
HScrollBar1.Minimum = 1
HScrollBar1.Maximum = MaxVal + 9
HScrollBar1.Value = 1
Dim fs As FileStream
If File.Exists(tempFolderPath & "\image" & HScrollBar1.Value & ".png") Then
fs = File.Open(tempFolderPath & "\image" & HScrollBar1.Value & ".png", FileMode.OpenOrCreate, FileAccess.Read, FileShare.None)
picboxImage.Image = Image.FromStream(fs)
fs.Close()
Else
Exit Sub
End If
End Sub
Please Help,
Neil John
Neil John