I'm currently developing a Flash website that incorporates an flv player. The controls on the player's skin are all vectors.
I've set it up so that when you hit fullscreen on the player controls a fullScreenSourceRect is created which is working great.
However when the the player is full screen, the once crisp vectors are now pixelated as if they were a bitmap.
I'm hoping I'm just missing a property somewhere that scales the vectors properly.
Thank you!
set video.smoothing = true;
Flash often creates bitmap of display objects for faster rendering. You may have to check the cacheAsBitmap property on some of the components and make sure it's set to false when the stage is full screen.
Fixed by rebuilding the fullscreen code so the video player get's set to stage height and width rather than zooming a rectangle.
Related
I've a brief question that I'm sure some AS3 genius knows.
I'm surprised I haven't seen any other topics on this after 30 minutes of Google-fu, StageVideo seems to be largely silent.
So I've been trying out the StageVideo API in place of traditional Videos for better video playback. This is for a Flash video streamer I am creating. While I'm quite certain the only videos I'll be using it for are 16:9, I'd like for it to be versatile enough to handle other aspect ratios. So for those other ratios, how do I center the video that's shown in the StageVideo object? I just want it to be letterboxed - no scaling, zooming, or cropping.
Changing the viewPort stretches the video to fit it, which is not what I want. And the videoHeight & videoWidth properties are read-only, so it's not like I can just change those to force the video to sit back. I read on the documentation that the video aligns to the stage's top-left, maybe I can change this?
Can I center videos in StageVideo? Is this not possible, and if so, must I use a regular Video object?
Thanks for any help you can give me
Can't believe I didn't see this - I just needed to change the start x & y of the Rectangle for the viewPort. Guess I forget how Rectangles worked briefly.
So we're using Adobe Air to develop iPad games from Flash for an educational kiosk that we're building. The issue is that some of the games are in portrait mode, and some of them look best in landscape mode. To account for this, we've ordered a swiveling kiosk that users can turn to either orientation depending on the game. All of the games are opened from a central app that we've developed as a "launcher" for them, so they're opened from within that other app instead of from the iOS home screen.
I'm using the "Aspect Ratio" command when publishing the game and setting to portrait or landscape depending on which game it is. I'm also setting the "Auto-Orientation" to false (though I've tried it on true as well and had similar issues). However, the two landscape games are showing up incorrectly as you can see in the image below. How can I force those games to show up properly on the iPad?
Keep auto orientation = false. Create your 'portrait' games on a portrait-oriented stage. Now create your 'landscape' games on that same portrait-oriented stage. Make them at their proper scale, so that they run off the stage. You can use a temporary landscape-stage-sized rectangle, on the lowest layer, to represent a proper landscape-oriented stage that you can compose on top of. When your game is all laid out select all layers and rotate the whole magilla 90-degrees. Presto! You just rotate the Pad to play the landscape games.
You may have to switch 'width' and 'height' references in your code for those games, and also 'x' and 'y' references. If you have many of those some simple matrix math will help with the transposition.
I am making a game in flash IDE using adobe air, want to make it landscape full screen, my stage size is 560x320 but it has unused screen on the sides. Can anyone guide me what is the small thing I am missing, rest full game is completed.
Thanks
Don't forget to add in the default image in particular for the iPhone5 you need:
Default-568h#2x.png
This makes sure your stage is the full area of the screen and not windowed. You can see all the sizes here:
http://help.adobe.com/en_US/air/build/WS901d38e593cd1bac1e63e3d129907d2886-8000.html#WS901d38e593cd1bac58d08f9112e26606ea8-8000
Your aspect ratio is not like iPhone (16:10) so if you match your width then graphics will go out of screen vertically. You will have to continue your graphics design on blank area to keep the design continuity.
Still try using,
stage.displayState = StageDisplayState.FULL_SCREEN;
For more info see
stage.displayState
I'm trying to use CreateJS to export a Flash game to HTML5 and then package the result with PhoneGap for mobile devices. This works fine.
But now I'm trying to handle orientation changes, and I'm not sure how to do this. The Flash scene has a fixed landscape orientation, and CreateJS preserves this. But if I rotate the device, I would either need to re-layout the screen objects or switch to a different screen layout.
Redoing the layout would be hard, because the original scene doesn't do this, and so the emitted CreateJS code doesn't either, and I can't see how to override the massive machine generated code base.
But switching to a different layout seems like it would lose the state of the original screen, and that's no good.
Or is this issue why a lot of games seem to pick a single orientation and don't allow rotation at all?
i know this can be done by changing wmode to "transparent or opaque". But is there any way to show the div over the flash file using wmode "gpu" ..
No you can only do this with opaque or transparent modes. In these modes, the browser is responsible for rendering and can control z-ordering with respect to other objects under its control.
With all the other wmodes, it's up to the flash player to draw directly to the screen, which will be on top of all other content.