News:

Function Finder  Find all the functions within source code files

Main Menu

Flash Movie

Started by Juha Kämäräinen, September 03, 2014, 08:19:59 AM

Previous topic - Next topic

Juha Kämäräinen

I am trying to load and play and swf flash animations.
I have converted avi files to swf, but I don't know how to make it work in the playbasic.

NewId = GetFreeFlash()
LoadFlash \\AVI\flashclip.swf, NewId, 1, 1
playflash NewId

I tried something like that, but it doesn't work.. Also LoadFlash or any commands like these are not in bold letters.
Why is that? And how could I make it work?

Thanks for the help.
Check out my comic - Bujercon 1

Juha Kämäräinen

Here is the improved code

----------------------------------
#Include "PBFlash.pba"

OpenScreen 1920,1080,32,2

LoadFlash "flashclip.swf",video,1,1
playflash video

print isflashvisible(video)
print isflashplaying(video)

sync
waitkey

----------------------

It returns values -1
and  0

So any help would be needed.
I even attached the SWF file.


Check out my comic - Bujercon 1

kevin


Not too sure it'll supports full screen exclusive modes,  so try a windowed screen it instead.

Juha Kämäräinen

Result is same in windowed mode too.
Also if the resolution had been lowered to 800x600.

Also positionflash doesn't bring anything to screen as well.

Could it have something to do with the playbasic video codecs or something?
I have no idea. Hopefully you can figure it out.

The file is there for testing as well.. It works in internet explorer.

I was able to activate the keyword highlights from the library highlighters so that helps a bit.
But still can't see no visuals.


Check out my comic - Bujercon 1

kevin

#4
 The library assumes the Screen is open before it,  so when call openscreen you're destroying the original Window the library was trying to attach too.

PlayBASIC Code: [Select]
OpenScreen 800,600,32,1

#Include "PBFlash.pba"


Video=1
LoadFlash "E:\Downloads\flashclip.swf",video,1,1
playflash video

print isflashvisible(video)
print isflashplaying(video)

sync
waitkey



Juha Kämäräinen

#5
This made it possible to see a white box where the flash movie is supposed to be.
but no flash can be seen. The box stays white.

Now I have tweaked it more.


OpenScreen 800,600,32,1

cls rgb(128,128,128)

#Include "PBFlash.pba"

video = GetFreeFlash()
LoadFlash CurrentDir$() + "flashclip.swf", video, 0, 0
flashdrawmode video, 0
playflash video

text 700,0,isflashvisible(video)
text 700,50,isflashplaying(video)
text 700,100,GetFlashStatus(video)
text 700,150,GetFlashFrameCount(video)

If GetFlashStatus(video) = 0 Then Text 700, 200, "Flash movie not loaded."

sync
waitkey


This actually displays the video and sound, but I need to keep mousebutton clicked and move the opened window around so it will do playback. Also exiting the program is impossible so I need to use task manager for that. Still need help on having it working properly.

Has anybody ever been succesful with making flash animation working with the PBflash?
Check out my comic - Bujercon 1