i want to play a sound when user click on the button in flex 3. My flex application will generate the images one by one. For each image, one sound should come in background. Any ideas? thanks in advance
You should be able to write something like this:
[Embed(source="myfile.mp3")]
[Bindable] //Not required. Just an example of using multiple meta tags.
public var soundCls:Class;
This will give you the ability to reference the file via the class name
The official documentation created by Adobe is quite ok.. you can find the link here. You will also find code samples.
Related
Hi I am using the Three20 SDK to create a gallery and it's all working great. I basically want to extend this so that when you see a large image there is an additional button on the bottom bar (by the > keys) so you can view some text about the image - I guess this is in principal the same as on the Facebook app where you can click the comments button and the photo flips over to reveal the comments.
Ideally a tutorial on this would be amazing but I guess that probably doesn't exist so I wanted to know the best way to do this was? Should I be adding new files into the Three20 directory to add this additional functionality? Or can I do it just in the one project where I need it?
Sorry to be vague, I'm a bit new to all this!
Generally, you shouldn't modify the three20 source code, unless it's a patch you're planning on submitting back to the three20 project.
If you need different behavior from TTPhotoViewController, you can subclass it and override any functions which doesn't fit your needs.
In your case, if you want to add a button to the toolbar, you should probably override (void)loadView, and replace the _toolbar with your own UIToolbar
Also, if you're only using the photo viewer from the entire three20 library, you will probably better off with a light weight solution, such as https://github.com/kirbyt/KTPhotoBrowser
I have XML pages with some defined structure , now using flex I want to display the content of these pages. The purpose of using Flex is to give better look.
If I can use something else which will provide a good UI to display then also its fine.
Please suggest.
you want to display the XML code??
read the xml file into a simple textarea and ready.
Damian
You could use an mx.controls.Tree and fill its dataProvider with your XML. It's an old component, sometimes buggy when you want to tweak it, but it provides a neat display of a tree. In addition you could use a textarea to display the node currently selected.
This is probably a very basic question, but how does one enable the actionscript documentation to appear properly in Eclipse? For example, if you hover over addChild, the ASDoc view brings up the class hierarchy with flash.display.DisplayObjectContainer.addChild(child:DisplayObject):DisplayObject, but does not give any of the details, descriptive text, parameters, etc. If I write my own documentation using the /** */ format, it does appear in there. What have I done wrong? :P
I'm using the Helios version of Eclipse with Flash Builder 4. Thanks!
If you are talking about something like following:
then, it is available in Flash Builder. You might want to try it.
How do I change the icons to Alert buttons like OK, CANCEL etc?
If you look at the source code for Alert there really isn't a lot there once you get past the comments and properties. What I've done in the past is to just copy the Alert class and modify my custom version however I see fit. That way you don't have to deal with the mx_internal stuff. If you are using Flex 4, there is no spark version of Alert, so another thing you can do is create your own spark version, which will give you even more control over skinning your alerts using skins etc. Sounds like a big deal, but it's actually much easier than you'd think (speaking from experience here.)
Just specify the iconClass paremeter of the Alert class. A detailed example can be found here.
You can find a complete source code and application example here
Whenever a swf is loaded a custom movie is shown (by default a rotating circle), is there some way where I can have my custom movie to play there. If you have any idea in this regard, then please help.
Thanks in advance.
Ashine.
You can accomplish this with a custom preloader. Here is a very good example to get you started.