ActionScript 3.0 :: Loading RSS Versus ATOM As XML?
Mar 8, 2011
I'm trying to load YouTube playlist feed data and I'm having some trouble with the ATOM version, which is the YT default. I'm having no problems with the RSS version, but the RSS takes a few minutes longer to update when making changes to a playlist. I can load both and toXMLString(); both feeds but I'm getting an error when I try and parse the ATOM feed.So if the ATOM feed looks like this:
HTML Code:
<feed ... >
<entry>...</entry>
</feed>
Shouldn't I be able to get the following trace to work after the completed load where playlistXML is my new XML for the feed:
Code:
trace(playlistXML.entry[0].title);
I'm getting a "TypeError: Error #1010: A term is undefined and has no properties." when I try and output that title data.And the RSS is like this:
HTML Code:
<rss ... >
<channel>
<item>...</item>
[code]....
View 2 Replies
Similar Posts:
Jun 4, 2011
It's got 5 tabs, and will give the user the options to play about 10 sounds per tab.I have initially been loading the sounds on runtime, so whenever the user clicked a button to play that sound, I would do something like:
var sound:Sound = new Sound(new URLRequest("assets/hello.mp3"));
sound.play();
I'm not sure, but I don't think this is very good, since I would be loading that sound over and over again if the user pressed the button too many times.
I then thought about embedding the sound in each of the views (I have one view per tab), so would embed the sounds whenever the view was loaded. I think this is a better options, but still am a bit unsure about how the embed works exactly.
[Embed('assets/hello.mp3')] private var hello_mp3:Class;
I suppose it simply embeds the mp3 files when the swf is compiled (making it bigger), but they would not be loaded anymore once the app starts, or once that view is initialized again.
View 4 Replies
Sep 16, 2011
I have a series of PNG files I need to use in a Flash project.Usually I bulk load my PNGs via an xml or json page.I'm just wondering, what is the difference between loading PNG files this way and adding a PNG to the stage via the Library (say, if you imported a PNG file to the library and then added it to the stage via Actionscript OR if you just dragged it on the stage)
View 2 Replies
Dec 11, 2010
I'm using a OOP model I read about called 'model-view-controller' - so I've got three main classes at work and then a few more additional classes I felt were necessary. I'm building a kind of game.I'm at the stage now where most of the programming is done. The game essentially works. Now all I gotta do is add the visual stuff - the animation and graphics. I asked myself if to draw up all the graphics as separate external swf files which would be loaded into the game via my View class; or would a better method be just doing all the graphics and animation directly inside the fla file, storing all MovieClips and Buttons, etc. as symbols in the library (exported for ActionScript 3.0).
I'm curious to know if this is an issue of mere personal preference, or if there are pros and cons for each method of work - external swf files loading into Flash vs. storing the graphics as symbols in the fla. file library.
View 3 Replies
May 10, 2010
I want to read an Atom in Flex.I can see in the debugger that he can read the Atom and that there are entries, I can see each value. So far, so good.But when I want to assign a value from the atom to a variable, he never gives any text. It's always this: "".
My code:
ch.Name = xml.title;
ch.Desc = xml.subtitle;
ch.Updated = xml.updated;
[code]....
But that's strange, because I can see in the debugger that it schould be "Tweakers.net".It becomes even more strange, because it works just fine with RSS.
View 2 Replies
Sep 11, 2010
im loading an atom feed from a shopify store and need to access the image, the feed looks like this:
[Code]....
View 1 Replies
Dec 1, 2008
We changed atoms in our newspaper this Monday, but the new .atom feeds no longer parsing using me old .rss code.
View 2 Replies
Nov 8, 2011
I am trying to play on a flash player a video file which has an DREF atom that points to an external movie.
The DREF box has value URL and points to an external video file which has the mdat. However the flash video player (netstream object?) is unable to load the external file. I have been trying to work this out for the last couple of weeks and any tips would be
View 2 Replies
May 4, 2006
I have a reader on my site, but it doesn't reader ATOM feeds?
View 1 Replies
Nov 25, 2009
I have converted the F4V to a single moof atom file and it now plays in Media Player and I can create a SWF player to play the video file but my question is, how do I convert the F4V single moof atom file into a FLV? Media Encoder will not except it
View 1 Replies
Jan 21, 2010
Wanna see something interesting?
var xml:XML = XML(<feed><entry /><entry /><entry /></feed>);
trace(xml.entry.length()) // returns 3
Makes sense, right? Now let's add this attribute. var xml:XML = XML(<feed xmlns="http://www.w3.org/2005/Atom"><entry /><entry /><entry /></feed>); trace(xml.entry.length()) // returns 0
Well that can't be right. Let's try it with a different attribute.
var xml:XML = XML(<feed test="okay"><entry /><entry /><entry /></feed>);trace(xml.entry.length()) // returns 3
Anyone know what would cause this? I used atom as an example, but any 'xmlns' attribute on the root node seems to have this effect. The value returned is straight up false - there are obviously still 3 'entry' child nodes regardless of the attributes their parents possess.
View 1 Replies
May 3, 2010
I want to pull in data from a rss / atom feed into flash and show a movieclip everytime the feed is updated. Most tutorials I find are about displaying the information. I want real time movieclips to display if and when the rss / atom feed is updated without any of the information from the actual feed displayed.
View 0 Replies
Jul 14, 2011
-FPS between FLV and Flash file.If I load an external FLV file (24fps) into Flash file(30fps), then the FLV file will be played by 24fps or 30fps?
View 6 Replies
Feb 5, 2006
I'm working on a Mac. Now I made a site and when I compare colors on pc I get a huge difference:s. My green grey looks like it's black. How do you manage to get the colors wright on both platforms? The calibration of my screen is perfect for print.
View 1 Replies
Feb 4, 2010
A Video-loop at 25fps imported to flash, embedded, plays fine if the project fps also is 25fps.But i also want to add a 3D Carousel menu, but at the projects 25 fps it goes a little bit choppy when rotating quick.So I try to change the projects fps to 50, and voila, the menu looks good but the video plays to fast.The video should alternate between clips randomly, and the clips has to be preloaded, thus its embedded in the swf (...or could this be done with flvs?)5-10 clips.
View 2 Replies
Oct 27, 2011
I'm working on a new portfolio, full flash website for myself and so far I've been working on my Macbook Pro almost entirely. The website is somewhat heavy in graphics/animation however nothing too big, all pages are around 500kb or less. Running the website on my MAC in any browser it looks perfect, the animation runs smooth, everything goes great. However, when I try to run the same website on my PC which is pretty good, the whole website feels a little bit choppy and laggy and I'm not sure why. It feels like it chokes for 1/4th of a second every like 2-3 seconds, lower FPS basically.
View 11 Replies
Jun 22, 2009
I have an application that I support but did not create. I need to test it on FMSS 3.0 but the developer version has both Streaming and Interactive Server enabled. Is there any way to disable the Interactive Server in the Developer Edition so I can confirm the application works on Streaming Server without influence from Interactive Server? The application works on the development server but when I move it to the production Streaming Server, it does not respond the same.
View 10 Replies
Jun 9, 2010
I am planning to start a new project in as3 and I want Dependency Injection in the project. I found that parsley and Robotlegs are two popular frameworks for implementing DI in AS3. Which is the best one among these two?
My main requirements are
lightweight
minimal learning
extensive documentation and active helping community
View 4 Replies
May 5, 2011
In Flex world, is DTO / VO same as Presentation Model?
View 2 Replies
Aug 14, 2007
when i'm coding directly on the timeline, i usually create a var like this:
Code:
var home:MovieClip = this;
so i always have something to reference the main timeline's scope. how could i do this in a class? delegate.create gets a little confusing.
i tried a few things like the following:
Code:
class com.myClass
{
public var className:String = "myClass";
public static var version:String = "0.0.1";
[code]...
of course this is redundant because it'll scope just fine as parseNews();, but i'm just wondering why it's letting me scope it like this here and not in the onLoad declaration?
View 6 Replies
Mar 15, 2009
I'm animating various squares that needs to move "smoothly" on the screen.I've tried with the basic Tween and with TweenLite at 30 and 60 fps and the animation still choppy while at 90 fps looks better.
View 4 Replies
Jun 29, 2009
Sometimes one works while the other doesn't, and vice versa.
View 2 Replies
Jun 15, 2010
I have an AS2 .swf file called �sample.swf� This �sample.swf� contains a proportionally resizable background image. An external .swf file �content.swf� loads on top of it. The size of �content.swf� is 900x600 px and it is positioned to the absolute center (x and y) of the stage at all times.
So basically you open the page in a browser and resize it, the background image resizes as well and keeps its proportions and the content always stays in the absolute center regardless of the size of the browser. Here�s my problem, when I resize my browser to smaller than the content size (900x600), the content gets cut off. So what I want is to activate the scrollbars whenever the browser size goes under 900x600 in either directions (x,y) You tell me if it�s possible. I am open to other solutions as well.
Here�s my html code.
HTML Code:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-7" />
[code]....
View 1 Replies
Dec 15, 2010
So I'm working on a as3 site that allows for users to signup/login, and I'm torn between using cookies vs SharedObjects to remember login info, I've been googling about it and I find a lot of people are super paranoid about LSOs, so maybe I should just go the regular cookie route?
View 10 Replies
Sep 20, 2010
I have been using the flashvars from swfobject for a long time to pass info into my swf for specific outcomes. I am just starting to publish everything using flash player 10 and wasnt able to get my variable to be seen by the swf. maybe i was doing something incorrectly with this new file? but i then took code from my older files and they didnt work either... then i published down to flashplayer 9 and it worked perfectly... ???
i am using swfobject 2.2 and my code for passing the flashvar is
// Flash Code:
Code:
var r:int = root.loaderInfo.parameters.varName == null ? 0 : root.loaderInfo.parameters.varName;
[code]....
View 1 Replies
Aug 19, 2010
So I wrote a CS4 Illustrator plugin that loads a SWF as its user interface. Works great on the mac, but I am having a problem on Windows:The .swf needs to be compiled with the "-use-network=false" option set in order to access some files on the local machine. HOWEVER when that option is set, all of my "Externalinterface" calls break down. When "-use-network=false" is not set, then I can't access the local files, BUT my "externalinterface" calls (which communicate with the plug-in) work just fine.
The SUPER frustrating part is that
A) it works fine on the mac, and
B) on window, I don't even need to set the "-use-network=false" option for the swf to access the files IF the .swf is loaded in explorer.I'm not sure if using AIR is possible, but I'm trying that next since AIR can access both local and network files without all the sand box hokey-pokey.Also CS5 is not an option for me for this project.
View 3 Replies
Sep 27, 2011
i am at the last part of my project. it worked all well and reads all text fields from a text file as seen on :[URL]now i am trying to get the same thing working from MYSQL.Notice that the text file i used for index2.html is called [URL]and it was a direct copy/paste from the php page that gave the results from the MYSQL query. [URL] The problem is i am getting an error in [URL] which uses the php to get the text for the dynamic fields.
I get the following error:
TypeError: Error #2007: Parameter text must be non-null.
at flash.text::TextField/set text()
at final_fla::MainTimeline/onDataLoad()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
my flash movie has 113 buttons called button_1 --> button_113 and 113 dynamic text fields tcname_1-->tcname_113
my AC3 code is the following:
// button links: to all buttons to open in iframe 'tdes'
// link corrosponds to button number
// i have 113 buttons.
[code]....
View 5 Replies
Oct 10, 2009
For developing simple games with the Flex SDK, what are the consequences of using a Canvas object, versus a UIComponent object, as a drawing surface? Are there performance issues with either one? Are the methods generally the same? Searching around, it seems that most sample code I've found uses UIComponent. Is this just customary, or are there reasons?
I already know one odd difference - I had developed a simple Pong game using:
public class MyGameCanvas extends UIComponent
and then decided to replace UIComponent with Canvas. This caused the line to fail:
[Code]...
However, I have to confirm something, being new to Flex and the various terminology. I'm presuming that people mean I should not be using MXML for games, when they said Flex SDK. Since I thought the Flex SDK was what provided the compiler that generates .swf files. Otherwise, where/how would I even compile AS3?
Assuming that's the case, then my question would be about the suitability of using both MXML and AS3 for (simple) games. Based on what I've read about both, it seemed like the intended use of them was MXML for the interface elements, and AS3 for everything else. Is the overhead that bad for MXML?
View 3 Replies
Dec 23, 2009
I'm working on a video player and I initially developed the player with everything in the .FLA file with no classes. Then I started modularizing my player into classes and realised that my classes are static methods rather than instance methods which doesn't seem to be needed in my player. My question is - is this a bad design to have all of your classes methods to be static rather than instance methods ? As I dont see the need (yet) so that's why i geared more towards static methods, is this a bad design?
View 1 Replies
Apr 11, 2010
is it not possible to have both CLICK and DOUBLE_CLICK on the same display object? i'm trying to have both for the stage where double clicking the stage adds a new object and clicking once on the stage deselects a selected object.
it appears that DOUBLE_CLICK will execute both itself as well as the first CLICK functions in the path toward DOUBLE CLICK (mouse down, mouse up, click, mouse down, mouse up, double click).in other languages i've programmed with there was a built-in timers that set the two apart. is this not available in AS3?
UPDATE:here's some code. essentially what i would like is have one or the other, not both with double click
stage.doubleClickEnabled = true;
stage.addEventListener(MouseEvent.DOUBLE_CLICK, twoClicks, false, 0, true);
stage.addEventListener(MouseEvent.CLICK, oneClick, false, 0, true);
[code]....
View 2 Replies