-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Canvas still empty #39
Comments
fillColor is deprecated in 0.5 We are currently updating examples on flashjs.com. Please, check Yazz and other examples from repository. There are a lot new about most recent FlashJS features which move game development with FlashJS to new level of responsivity. Put more attention to ScalingAssets example and it`s description (at the bottom of index.html). |
Ok, good to know, however I can't find the Yazz-example in this repo (and even this). At the bottom of ScalingAssets -index.html is no description. Update: Can you make my test work? Or even better, can you prepare a simple example, how we've to use FlashJS without sprites (Something like this or this)? |
Try it now - Yazz for 0.5v was commited today as answer to your issue. As for description - in fact it`s in the bottom of HTML code inside P tag. For better understantion it`s better to try this example alive in browser. To avoid Chrome security restrictions for local AJAX requests close all Chrome instances and run "open -a Google\ Chrome --args --disable-web-security --allow-file-access-from-files" command from Mac terminal or "C:\Users\YOUR_USER\AppData\Local\Google\Chrome\Application\chrome.exe --allow-file-access-from-files --disable-web-security" for Windows command promt. This is needed during local sendboxing because FlashJS loads AssetsList declarations as JSON files for ex.: https://github.com/PixelsCommander/FlashJS/blob/master/examples/scaling-assets/assets/main-assets.json . This is simple and effective way to emulate Flash Symbols library and divide JS code from sounds, animations, images declarations. |
Ok nice, thanks for that so far! However, my question is still unanswered. So, how can I use FlashJS without assets (just with the raw canvas context)? Do we use |
Yazz does not use AssetsList and code is quite simple: var stage = new Stage('#yazzStage', 800, 600, {multiResolution: false}); testObject.x = 100; stage.addChild(testObject); stage.onEnterFrame = function(){ |
Yeah, thats clear, however I don't understand the way we can use the canvas- context.fillStyle = "#f00";
context.fillRect(0, 0, 100, 100); How can we accomplish this? |
You can try to draw on testObject.cacheCanvas |
I know, I'm troublesome! Anyway, can you prepare a simple example how to work with the canvas context? Maybe a simple |
Sorry for making you wait for better feedback. At the moment there is no drawing API in FlashJS. So for now Its a question about canvas API, not FlashJS. I`ll try to find good sample and present it here. Multiresolution drawing API similar to Flash one will be amazing contribution to FlashJS. Sad but I have not time to add this API in nearest future, but would be glad to help in any work on this, please contact me if you`ll have any questions. |
I try to accomplish the YAZ-demo, without the fish-sprite (is that even possible?). However the canvas element is still empty. What I'm doing wrong? http://fiddle.jshell.net/pdcBR/
The text was updated successfully, but these errors were encountered: