GrowtopiaFli / openfl-haxeflixel-video-code

My research on how to play videos in openfl haxeflixel
MIT License
7 stars 3 forks source link

source/Main.hx:23: characters 24-33 : Unknown identifier : gameWidth source/Main.hx:23: characters 24-33 : For optional function argument 'GameWidth' #39

Closed FuseIsHere813 closed 3 years ago

FuseIsHere813 commented 3 years ago

This bug happens when adding this code:

addChild(new FlxGame(gameWidth, gameHeight, initialState, zoom, updateframerate, drawframerate, skipSplash, startFullscreen));

var ourSource:String = "assets/videos/DO NOT DELETE OR GAME WILL CRASH/dontDelete.webm";

if web

var str1:String = "HTML CRAP"; var vHandler = new VideoHandler(); vHandler.init1(); vHandler.video.name = str1; addChild(vHandler.video); vHandler.init2(); GlobalVideo.setVid(vHandler); vHandler.source(ourSource);

elseif desktop

var str1:String = "WEBM SHIT"; var webmHandle = new WebmHandler(); webmHandle.source(ourSource); webmHandle.makePlayer(); webmHandle.webm.name = str1; addChild(webmHandle.webm); GlobalVideo.setWebm(webmHandle);

end

if !mobile

addChild(new FPS(10, 3, 0xFFFFFF));

end

I am using FNF's Old system and the latest version (0.2.7.1). Not kade engine.

GrowtopiaFli commented 3 years ago

recheck the code before making issues it said gameWidth gameHeight where exactly is that? u see new FlxGame in there why dont you change gameWidth to 1280 and gameHeight to 720

FuseIsHere813 commented 3 years ago

recheck the code before making issues it said gameWidth gameHeight where exactly is that? u see new FlxGame in there why dont you change gameWidth to 1280 and gameHeight to 720

Now, why would i do that if the Main.hx code is this:

package;

import flixel.FlxGame; import openfl.display.FPS; import openfl.display.Sprite;

class Main extends Sprite { public function new() { super(); addChild(new FlxGame(0, 0, TitleState, 1, 60, 60, true));

    #if !mobile
    addChild(new FPS(10, 3, 0xFFFFFF));
    addChild(new MemoryCounter(10, 3, 0xFFFFFF));
    #end
}

}

FuseIsHere813 commented 3 years ago

fixed it now, everything is fine now.