attempting to add a flash component slider to my as 3 class and I cant find any examples on the web. I am surprised at the number of funky home made sliders i am seeing. Maybe there is a problem with flash components and as 3? Could you leave a note if this is doable, and any rough direction you could provide. thnks!!
The examples in the AS3 docs should give you the information you need.
Reasons not to use the slider component:
It adds 32KB to the size of your SWF. Not a great option where file size is critical.
It's not that difficult to code a slider which may be more suitable to your needs.
I wouldn't be (haven't been) afraid to use the built-in slider component, though.
You do need to make sure the component is in your FLA library before compiling. Including the code in your AS will not do since I beleive Flash needs all of the visual elements present.
Related
I've got a question regarding animations with polymer. I want to make a custom element in polymer and have some default animations on it. In the past I would have used jQuery, but I would like to test the possibilities of the Material Design Library.
I have an element containing a date, whenever I click on it, it should transform and show details.
Here is a link to the animation I would like to get.
https://vid.me/yyFN
I'm sorry for the watermark, it was the first thing I fount to capture the screen.
What would be the best way to get this animation in a custom element on the Polymer Library?
Bart
Ps: This is my first question, please help me if this question is incorrect or not the way it should.
There is an element for that! it is called neon-animation, you can find it in the Polymer's Catalog :
neon-animations
neon animations provide pre-defined animations you can use in your web app, but first you need to understand the concept of web animation in the Polymer world.
There is no better tutorial than these three videos on animations done by Rob Dodson:
Behaviours
Slick Web Animations
neon-Animated Pages
Its recommended, no its vital you watch them in order
I want to create a help screen for my game. This screen contains text and pictures that describe the game.
One option is to create a stage and add a table to it that will define the position of the different labels and images. However, this option seems to be "unnatural", limited when it comes to format options, and a potential headache when it comes to code maintenance.
The content of the screen is static which makes it a good candidate for an HTML document. My idea is to create the help screen document in HTML and then have it rendered inside my help screen. My question is, is this possible in libgdx? If not, what other way would I have to implement this?
As it is not possible to embed a browser in your LibGDX app (as nicely explained here), you could either link to an external website in the device's browser or use the libgdx-stagebuilder to build up the Scene2D stage using XML. Or you just stick to the normal LibGDX way. Unfortunately, I don't see any other option than those.
I don't think this is supported in libGDX as of yet, but it should be possible using platform specific code. How you do it will vary from platform to platform, so I can't tell you exactly what to look up, but android has something called webview you might want to look at.
Let me give you a little explanation of what I'm trying to do first. I'm working on a new AS3 based architecture and I'm trying to fix some issues I had in the past with AS2. Each screen has its own FLA, and multiple screens reference certain components; a Button for example. The problem occurs when something in Button changes. Every single screen that uses Button has to be republished or else it has a chance that it won't pick up the change due to how Flash class definitions work: The first Button definition that loads at runtime is the one that everything uses. So if a screen using the old Button loads first then everything will be using the old definition and things will break. It can take an hour or more to figure out which FLA needs to be exported to fix it since there are so many and the connection between them isn't always obvious. So as you can see, this is a major time sink that needs to be fixed.
I've learned that in AS2 you can use an exclude.xml file to exclude class definitions from the SWF when the FLA is published. In this way, I figured out an architecture I can set up where there is a Shell SWF that is the only place where the Button class is defined. Shell then loads in all of the other screens that all have Button excluded so that they only pick up the Shell version. This makes sure that if anything in Button changes, the only thing that needs to be republished is the Shell and then everything else picks up the change at runtime.
This is all well and good, except that when using AS3 the exclude.xml file no longer works. Because of this I've turned to MXMLC, which can mimic the exclude.xml functionality by using the -link-report compiler option to build the exclude.xml when compiling the Shell SWF, and then pass that XML to -load-externs on every other screen to exclude everything that is built by the Shell. The only way I've found to do this is by publishing everything as a SWC from Flash and then using -include-libraries to build the SWF from the SWC along with the -load-externs to exclude everything I don't want to be there. This does the trick just fine, except that publishing as a SWC does not include anything defined on the timeline or, more specifically, the stage. A lot of design work is done on the timeline in Flash by layering on the different parts and dropping in named MovieClips all over the place that are then referenced in ActionScript, but the SWC doesn't pick up any of this information as far as I can tell.
So now we come to my question. Is there some way to compile all of the information in a FLA using MXMLC so that I can exclude everything while still being able to design out everything on the timeline/stage?
I sent an email to Grant Skinner and he basically said the only way he knew of to do excludes with AS3 was with RSL or SWC. He wasn't entirely sure which method worked since it had been a long time, so I don't have a definitive answer. I spent a while trying to figure it out using SWCs, but I didn't really get any decent results from it so I'm giving up for now.
The important part to note is that it is indeed impossible to run MXMLC to build a FLA. Or at least if it is possible, it requires very complex knowledge that not many people know.
There's probably a million posts about scrolling in AS3, but the problem I'm having is quite different. I have no problem making scrollbars work (have done loads of times), but I'm having a problem with custom skins. I'm basically trying to make the bar in this concept:
concept http://img842.imageshack.us/img842/5081/screenshot20130507at140.png
The key part is the thumb. When customising the skins in Flash, it scales the thumb bar (which hasn't been a problem in my previous projects, but in this one I want to have a non-scaled graphic like the one in the concept.
I've done a few searches and apparently this isn't easily achieved (something about extending the component class that I didn't really understand), but I find the UIScrollBar very easy to use. So my questions are:
Is there anyway to get UIScrollBar to do what I want?
Failing that, is there a third party equivlent of UIScrollBar that'll do what I want?
Failing those, what is the most pain-free way of making a custom scrollbar in AS3? (I realise there's a lot of tutorials for this out there, but there's too many, so if someone could point me towards a tutorial that doesn't require cause pain I'd appreciate it)
Thanks! (:
I'm making an app in which I need to make some photo effects similar to Instagram's effects. I was wondering if it's possible to somehow emulate the work of Photoshop's color levels in AS3.
I've tried using AdjustColor, ColorMatrixFilter and ColorTransform classes but desired image is very hard to achieve using those.
So does anyone have a solution easier than that? or maybe someone knows a library that I couldn't find on Google?
You should have a look at Joa's image processing library.
Have a look on this library:
http://peternitsch.net/bitmapdata.js/
This is actually implemented in Javascript, but it's based on the Flash API. All You need is there. Or i can recommend Foundation ActionScript 3.0 Image Effects by Todd Yard.
Flash API reference is another good resource for inspiration.
There is another good resource for pixel manipulation found here: http://evanw.github.com/webgl-filter/. This is done in WebGL but if your target API is still Flash, then you can easily transposed the GLSL language into Pixelbender and inject the shader
into the Flash by making reference to the pbj file.
Check Grant Skinner's TweenMax plugins, especially ColorMatrixFilter.