Embeding In-Game Video Clip


  • Posts: 5

i must embed video clips in my game for intro, levels tutorials, between scenes cuts and also for commercial / sponsors use.
my current video clip (and first trial) is a 15 seconds swp file, 320*480 (to match full screen mobile portrait scale).
actually, i believe all my planned video clips will be full size, between game scenes, so they will run without interruption, except user's click to abort clip and continue playing next scene. also, no video clip will exceeds 10-15 second.

i tried the builtin behavior "Video Player" but it wont accept 'local' file. i tried variations of syntax like:​​​​​​ file://c:/folder/file.swf, file:///c|/folder/file.swf etc. and it doesn't find the file.
furthermore, i do not like the idea that EVERY video clip must be on the internet rather than locally on the mobile. why should it? or am i wrong?

i've found on StencylForge a behavior called 'Load SWF Splash' by rob1221 (great work, buddy) for embedding swf file and i tried it.
when i run 'TestGame' (desktop flash mode) it works well and as expected.
when 'Publish -> Android' - it generates error (see screenshots) while compiling. it would not even build the apk file.

my questions are:
1. is there a valid way to embed ANY kind of video clips in the game that will work for sure on mobiles (android and ios)?
2.  what am i doing wrong with the behaviors i mentioned? is it a bug? unhandled scenario i ask the behavior to perform?
3. is there a reasonable alternative to swf / flv / avi etc. that can act like a video clip? maybe gif sequence or such? maybe instead of preparing my video clips in a video or an animation editor i will compose a SCENE ON STENCYL as if it is a scene running, only i'll stage it as if it is a 'regular' animation? maybe i can use Actor Type as a container for the video clip itself, using actor's animation, frame by frame?

thanx a lot guys :)

* as understood, i'm using the Stencyl Pro with andriod publishing capabilities.


  • Posts: 1654
The reason that the extension (http://community.stencyl.com/index.php/topic,46822.0.html) is streaming from internet only is that the size of your app will increase dramatically. I never even attempted on doing it from the device-storage itself. I can't think of a reason why it shouldn't work, but as most of the times I say that it turned out that it couldn't be done 'normally'.
You would need to adjust the code as it now only does internet loading.
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.


  • Posts: 5
thanks, mdotedot

yep, i guess you right about the app size issue.
i'm going to try and fiddle with that extention you mentioned.
i saw it earlier but afraid to try and go deaper :)


  • Posts: 5
i could not get the video extension to work.
i use the latest stencyl 3.4.1 build 9180 (windows 10 pro 64bit)
i go settings->extensions->install extension and i selected the video.zip file.
then there is nothing.
stencyl extracts the zip file to stencyl appdata 'extentions' folder, but i cannot see the extension anywhere on stencyl.
i read somewhere in this forum that stencyl 3 changed the location of appdata or such. could it be the problem?
if there's a way to manullay intall the video extension i'll be glad to know.
thanks in advance :)


  • *
  • Posts: 259
The zip file gets unpacked into the wrong directory for some reason (all the content is unpacked into engine-extensions instead of into a subdirectory.)

Unpacking it manually makes it work for me, but not for the original poster, apparently.


  • Posts: 5
are there any ways to control it, such as 'when done playing', 'on user click' (to abort video)?


  • Posts: 1654
I have no need for the controls myself so I didn't make them. You are welcome to change the code yourself for your own mechanisms.
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.


  • Posts: 5
mdotedot, you did a GREAT job.
i'm just being spoiled  :P
my background in proramming is very poor, so i ask naive questions :)