I was wondering if anyone had any advice on what the best way to embed a youtube player inside a flex app is. I've looked around and it seems that one can
Try to use SWFLoader (as with what's described here) but this ends up throwing crossdomain violations
Use the YouTuve API
Ideally use the Spark VideoPlayer component, although I have not been able to figure out how to play a YouTube video through it and am starting to think that it is, in fact, not possible.
Would love to hear any thoughts from those of you out there that have done this in the past.
thank you!
I think, the most convenient way is using youtube api. Check this turotial.
SWF-Loader cross-domain exceptions, add the following line to your code, BEFORE the player gets initialized.
Security.allowDomain("www.youtube.com");
Ok, after trying a variety of things, I've come to the conclusion that the Youtube API is probably the best way to go, but it doesn't work very well, at least it seems to have all sorts of issues in Flex 4 (see for instance http://groups.google.com/group/youtube-api-gdata/browse_thread/thread/f8e61440e5f1a21c/9ed01ed5fd6eb71b). The interesting thing is that the serious security errors seem to happen only if you move the mouse pointer over the Application stage. So if you can stomach to cover your whole application with something (at least a rect wrapped in a group) you should be ok. Ugly as hell, but that seems to be the only way I can find to make this work.
Related
Call me silly, but I'm looking for a way to use a website automatically, same time every day, but with the capability of responding to many different situations (all of them can be predicted so I can do it myself, I just need it to recognise it) The problem is im very new to programming as a whole and I'm totally lost on where to start with this project... can anyone help? Is it even possible for someone at my level?
To be simple. no. AI programming is very advanced and requires a lot of in-depth knowledge of programming. You might be able to hack together a solution using selenium, which is a tool for testing the UI.
There is also the possibility to make a bot that clicks on specific locations on the screen. they cannot respond to what is actually on the screen however. If the website is a bit slower than normal things can go wrong as well. That would not be the best solution.
I have been searching for and have not located (I fear it doesn't exist) a wire frame application that will use our current css for objects.
We have spent a lot of time perfecting our css to get the look we want, now I want to be able to use that css for new mockups without creating new objects each time we add something (as we would have to in photoshop).
In a perfect world, it would even handle the page layout so all that remains is the logic.
Has anyone heard of a tool that can do this?
I haven't used it, and I can't vouch for it, but https://alpha.easel.io/ might fit the bill. It's still in beta, but looks very interesting.
From their homepage: "Implement designs quickly using exact CSS properties rather than guessing from a mockup."
http://axure.com is a popular wireframing tool. There ways to make it use custom CSS: http://enterpriseux.tumblr.com/post/8972215862/an-axure-html-prototype-hack
I know there have been similar threads in the past but I can't seem to find a decent definitive answer / workaround for the problem I'm facing.
What I'm trying to do:
capture ALT+SHIFT+something keyboard events. Pretty straightforward, right?
Issue:
When pressing ALT+SHIFT doesn't seem to ever shoot an event. The only combination that seems to work with ALT is CTRL+ALT+something, as pointed out here.
Question:
really? I've read that the browser catches some of the keyboard events, but this happens with the basic flash player too - maybe that catches events too? Would love to know if there is a solution that doesn't involve messing with JS.
thank you!
The problem as you've said is that the browser captures some of the key combinations, and the underlying OS may catch others. From the research I've done, and read about on the bug on Adobe's bug base I filed on this, it can be made better if you do an Air app, but even then there are some of these combinations that are just eaten by the OS, so it never even comes NEAR your application.
How to set priority(like send to back) for iframe?
I'm suffring this problem recently, it costs me a lot of time and I find no solution about this.
this article lists some disadvantages about iframe in flex
http://www.deitte.com/archives/2008/07/dont_use_iframe.htm
another way to embed rich text, i think, is to use TextFLow, in RichText, you could easily find good examples in API
however, iframe is still useful, when developer actually want it on top. Using it with TitleWindow is a good idea. (correct me if i'm wrong)
If anyone have a better idea, please hit me, I will greatly appreciate
Believe it or not I need a way of displaying animated gifs in Flex 3. This guy has a component for sale but it's Flex 2 only: http://dougmccune.com/blog/2007/01/19/how-to-load-animated-gifs-using-adobe-flex-20/.
And I’ve implemented this example: http://www.bytearray.org/?p=95, but for larger gifs it’s very CPU intensive and causes the UI to hang.
Does anyone know of any alternative solutions? Failing that, I may have to look at re-factoring the second example to use pseudo-threading. Eugh.
i bought and used the mccune product but have now changed to flex 3. i found your question by searching for the same answer as you and have just come across this
http://flexology.wordpress.com/2008/09/30/loadinganimated_gif_in_flex/
Thanks for the response. The google code project in that link (http://code.google.com/p/as3gif/) is the same as the one on bytearray (http://www.bytearray.org/?p=95) which I implemented.
I knocked up a quick pseudo-threading example using this code and it's far too slow.
Looks like I will need to SWF the GIFs on the fly...
Does this help?
Edit: I've no idea how well that suggestion works on a larger GIF, but if you're still having issues, it might be worth importing the GIF into Flash and turning it into its own SWF.
Flex should be more than able to play that without any issues.
Check out swfmill for going for creating swf's. I believe they support animated gif's
http://swfmill.org/