Playing main timeline in Flash CC Html5 Canvas - animation

Does anyone know the Flash CC/Html5 Canvas conversion for:
MovieClip(root).play();
Many thanks for your help in advance.

Animations exported from Flash CC have an exportRoot global variable, which is essentially the root movie clip, which is added to the stage. You should be able to target it from anywhere:
exportRoot.play();

I managed to figure it out myself. If your movieClip is on the main time line, within that movieClip you would use the following code:
this.parent.play();
'parent' can be used multiple times for lower tiers, such as:
this.parent.parent.play();

Related

Godot. Animations tracks call scripts functions don't work

This is an animationPlayer created from a Blender import. Then I created a function call track and added a key to call a script function. This worked for idle and walk animation but not for attack animation.
My scene
My animatorPlayer, walk animtion. this work fine:
But this calls dont work:
my AnimationTree, only relevant nodes:
Thanks in advance.
I need it to function calls to functions anywhere. it is a critical functionality.
I found a solution thanks to:
https://godotengine.org/qa/52186/call-method-tracks-animation-work-another-animation-player
"In the animation tree on that blend node's bone filter there was a no name track/bone at the top that was filtered out, it is the call method track."
It's hard to see this.

Saving a frame/picture using Tango Camera

I have a question. Is there a way to take a picture, or save current frame while a tango app is running and how can i achieve this kind of behaviour
I just used ReadPixels and gave as parameters the dimensions of the screen; it worked in Unity

Changing ti.barcode view size

I'm fiddling around with ti.barcode scanner module, but it seems it's always fullscreen.
Is there a way to make it use a part of the screen?
For iOS you can use SquareCamera: https://github.com/mikefogg/SquareCamera which allows you to have the camera inside a view and scan qr codes too.
But if you want to have it cross platform I would go with the overlay variant
Not sure if you can embed the ti.barcode to a smaller view, since you don't add it to a controller.
Have you tried to set the size of the module in the capture method?
The possible workaround is to create a view with your stuff and place it in the overlay property of the capture method

sf::View visibility Check

Ok, so I've been working on a game with some friends for a school project. We have used SFML.
I've been working lately on the camera and a tile implementations system and now I need them to work together.
The camera works like this:
I have two different sf::View, one for the game world and one for the hud. The one for the game world follows the player in the x-axis.
The tile system works in a way where it reads in a txt file and draw sprites based on the information from the txt file.
As it is now I always draw all the tiles, even if it's outside of the cameras view. Not good. I need a way to check if the tiles are outside of the cameras view before I draw them. How do I do this?
I did find this:
Get X and Y offset of sf::View
but I can't really wrap my head around how to make this info work in my game.
Any help would be really appreciated! :)
Mvh Elis
Managed to figure it out after finding this:
http://fr.sfml-dev.org/forums/index.php?topic=10590.0

Drawing large images for ipad

I am developing an application for viewing images.
I used the example of PhotoScroller Apple to implement this application.
In my application I want to be able to draw on the image.
I had the idea to put a UIView on top with transparent background and draw the lines via touch events. This solution has become very slow because the generated images are very large, around 3700x2000 pixels.
I also tried a solution with the example of Apple GLPaint that uses OpenGL, but it has a size limitation of 2048x2048 pixels.
Anyone have any idea or example of how I implement this?
I think you should try and tile your image.
One option is using CATiledLayer. Have a look at this short tutorial.
Or you could try and use CGContextDrawTiledImage to get your stuff done. Possibly this post from S.O. could help you getting started.

Resources