Man, that's pretty fun. I spent more time playing that than I meant to. Thanks for sharing the source, too.
jdmatson
@jdmatson
Posts made by jdmatson
-
RE: Valley Race
-
RE: Manually delete when switching states?
After some experimenting it looks like I can add() the objects to the state and just kill() them to keep them from being drawn and updated, thus sidestepping the issue.
-
Manually delete when switching states?
I've got a lot of objects that I've created inside a FlxState that I am not add()ing to the state because they don't need to be updated or drawn. Do I need to manually delete these objects when switching to another state?
-
RE: Sound Trouble with Tutorial
@cg-tv Yep, that was it all right. Thanks for looking into this, it would have taken me longer than I want to admit to figure this out on my own.
-
RE: Sound Trouble with Tutorial
I feel better knowing that it's not just me then. I hope I can find out how to fix this and avoid it in the future.
-
Sound Trouble with Tutorial
Hi! I'm brand new to HaxeFlixel and I've been working through the tutorial and I've made to this stage:
http://haxeflixel.com/documentation/sound-and-music/
I did the first step to load a music file, and I had some trouble because I've been building for windows instead of flash, but after converting the mp3 to ogg, the music has been working fine. On step 2, where you add a sound "select.wav" to the buttons in MenuState.hx, the sound doesn't play when the buttons are pressed. However, the same code and sound in OptionsState.hx works just fine and other sounds play in CombatHUD.hx as well.
A quick search turned up this: https://github.com/openfl/openfl/issues/998 , so I made a new state, InitState.hx to try initializing the sound before getting to MenuState.hx. I loaded a FlxSound in InitState.hx and it plays, but the button sounds in MenuState.hx still weren't playing. Then I tried loading a FlxSound in MenuState.hx and playing it in the functions that are called when the buttons are pressed and that didn't work either.
Then I wanted to see if the problem was just with the Windows build target, so I tried building for html5, and no sounds play at all except the music. Has anyone seen something like this before?
Edit: Disabling the music didn't change anything for either build target.