Open PerezSen opened 1 year ago
function onCreatePost() addHaxeLibrary('VideoHandler')
makeLuaSprite('videoSprite', 'videoNone', 500, 100) setObjectCamera('videoSprite', 'camGame') setLuaSpriteScrollFactor('videoSprite', 0.5, 0.5) addLuaSprite('videoSprite', true) scaleObject('videoSprite', 2.5, 2.5); setObjectOrder('videoSprite',10) end
function onStepHit()
runHaxeCode([[ var video = getVar('video'); game.getLuaObject('videoSprite').loadGraphic(video.bitmapData); ]])--it need update so dont delete it or put at create()
if curStep == 376 then runHaxeCode([[ var filepath = Paths.video("toast/freddy1"); var video = new VideoHandler(); video.volume = 0; video.playVideo(filepath); video.visible = false; setVar('video',video); FlxG.stage.removeEventListener('enterFrame', video.update); ]]) end end
but pls use hscript to use runhaxecode,lua have problem for some reason(OG version also have problem)
Describe your bug here.
I do not know why but when using the runHaxecode to put a video on the stage it does not play and shows the default icon I would like if there is a possibility to fix it since there are mods that I would like to play them because their stage is based on the videos Or is there another way to use it? This problem only occurs on android On pc if the runHaxecode works
runHaxeCode([[ var filepath = Paths.video('VideoName');
var video = new MP4Handler(); video.playVideo(filepath); video.visible = false; setVar('video',video); FlxG.stage.removeEventListener('enterFrame', video.update); ]])
Command Prompt/Terminal logs (if existing)
No response
Are you modding a build from source or with Lua?
Lua
What is your build target?
Windows
Did you edit anything in this build? If so, mention or summarize your changes.
No and edited anything