ActionScript 3.0 :: Project Consists In One XML File With Attributes

Jul 15, 2009

I have a project that needs to get a XMLList. The project consists in one XML file with attributes. The attributes are: Image, description (of the image) the product title for the image and the same product title for another menu that choose the products.

I'll show you all how its organized:
Right side: a List of Products.. Each click it loads his respective title, image and description on the left side of stage.
My doubt is: How to control these items. How do I control the array?

When I click Item 1 it goes to item 1 image, title and description on the left side. When I click in Item 2 it removes the last item, put the new Item 2 image, title, description, etc.

Code:
var xmlLoader:URLLoader = new URLLoader();
var meuXML:XML; // vai guardar todo o contedo do XML;
var imageLoader:Loader; // ImageLoader;
xmlLoader.load(new URLRequest("tv.xml"));
xmlLoader.addEventListener(Event.COMPLETE, carregouXML);
[Code] .....

View 3 Replies


Similar Posts:


ActionScript 3.0 :: Select All Attributes Of The Same Name In An XML File?

Nov 17, 2011

Is it possible to select all attributes of the same name in an XML file ?I have managed to select all elements of the same name but I cannot find a solution to select all attributes of the same name.

Code:
for each(item in xmlObject..elementName)
{

[code]....

View 4 Replies

AS3 :: Xml - Saving A Change To Attributes In A Pre-existing File?

Aug 17, 2010

So here's the situation: I have an XML file that is holding a short list of nodes, all of which have two attributes associated with name and a score. This file is already loaded into flash and creates a high-score table, of sorts. Now, what I want to do is to be able to grab data collected in the application, use that to change some attributes in the XML file and have it save that change. As it is I can change the attributes using:myXML.children()[t].@attr = attributeVariable;Which seems to work while the application is still in session, but does not actually save those changes to the file itself as I am hoping fo

View 1 Replies

ActionScript 3.0 :: Parsing Multiple Attributes From External XML File?

Oct 11, 2008

I'm using an external XML file to populate a video playlist. So I'm parsing the attributes like this:

tileList.addItem({label:item.attribute("description"),
label:item.attribute("details").toXMLString(),
data:item.attribute("src").toXMLString(),
source:thumbnail});;

But the "details" attribute is not showing up. Is there something I'm doing wrong? The XML element that holds the attributes looks like this:

<vid description="My description"
details="More detailed description."
src="movies/myMovie.flv"
thumbnail="thumbnails/myImage.jpg" />

View 2 Replies

ActionScript 3.0 :: Loading A Xml File And Some Of The Node Attributes Do Not Have Values?

May 15, 2011

I am loading an xml file and some of the node attributes do not have values:

<books>
<book id="qq" description="test1"></book>
<book id="nn" description""></book>
</books>

I get a null object reference when I try to run the second book line because of the missing description. Can I check for this in code and skip accessing the description for this line?

Something like if (xml_book.@description is null) {do nothing}else{do something)?

View 4 Replies

ActionScript 3.0 :: Object Attributes From XML / Sub-attributes

Jun 29, 2009

I am dynamically creating a number of objects (movieclips) which all have a number of attributes.[code]and so on. i.e sub attributes. I don't think this is possible? Only sprite and movieclips can have dynamic attributes so unless atrbY is a movieclip (which it isn't, it's a string) it isn't allowed?Each object can have suboptions with further attributes associated with the chosen suboption.Later in the program I will manipulate, read and interact with the objects and they have text display behaviours dependent on the suboption chosen. That part (should) be straightforward! heh. One the object has the attributes attached in a usable format, accessing them should be simple.This will be for a store. i.e t-shirt1 has size small, price 10, size medium, price 12, size large, price 14. t-shirt2 has size medium, price 35, size large, price 40 and so on.[code]

This format of the XML can be adjusted if it would make the parsing easier.I am currently reading the XML in, stepping through, grabbing the individual parameter such as category and then adding it as an attribute of the object and it works fine. i.e. I end up with obj.category = 'catname'. However, on suboptions I am having a problem.Should I put all the suboptions in a multidimensional array and use nested loops to apply them to the object?I would still have the problem of objX.suboptionarray[Y].suboptionprice which isn't allowed? In the above XML case Y would be 0,1 and 2 giving 3 suboptions to objX and each suboptions would hold attributes such as pvid associated with that suboption.I could go down the horrible route, obj1.suboption1subptionprice ; obj1.suboption1suboptionpname; obj1.suboption1suboptionvalue; obj1.suboption2suboptionprice; obj1.suboption2suboptionpname and so on and so on for each suboption which could be five options (small,medium,large,x-large, xx-large) and which would "work" but would be bad programming and involve splicing names to get say, the "third" suboptions' price and pvid e.t.c

Going down the route of mutidimensional arrays sounds good except that on say 50 objects I would have stacks of arrays which I'm guessing isn't great in terms of resources?.Just to add, the number of suboptions varies between object, every object has a minimum of one suboption (default option) but can have as many as needed (unlikely to be more than 5 but should be scalable). i.e some t-shirts only come in medium whereas some have many sizes.I have a fair amount of leeway on the format of the XML which I generate from the database so the formatting of that could change to make the parsing easier.

View 0 Replies

Flex :: Changing File Creation And Modification Date Attributes?

Jun 7, 2010

I have written an Air program that mirrors a directory tree. The problem is that the destination folder structure and content need to be identical - right down to the creationDate and modificaitonDate file attributes. How can I change these file attributes using Adobe Air? I'm able to READ them both just fine, but the properties are read-only. How do I change them?

View 1 Replies

ActionScript 2.0 :: Flash Loop Inside Xml File To Find A Attributes

Feb 12, 2007

Have flash loop inside my xml file to find a attributes that will till flash to do THIS or DO THAT.

[Code]...

View 3 Replies

ActionScript 2.0 :: Pull Attributes From Xml File For Use In A Dynamic Text Field

May 31, 2007

im trying to pull attributes from my xml file for use in a dynamic text field but cant seem to get the actionscript dialed in properly. i have a php script which parses the data as attributes rather than nodes...so my actionscript must use these attributes!

[CODE]...

View 14 Replies

ActionScript 2.0 :: Make A Menu Which Consists Of Items?

Apr 25, 2007

i need to make a menu which consists of items, that are supposed to fold out in a spiral motion around a specific point.I found some very useful code here on the site:

[Code]...

View 1 Replies

ActionScript 2.0 :: Passing Flashvars, Params And Attributes To Swf File Loaded In Movieclip?

Mar 14, 2011

I just saw a flv player that was done in AS2.I wanted to know whether it's possible or not and how I could pass the needed flashvars, params and attributes to the flv player (swf file) once I load this flv player in a movie clip with the method loadclip.

View 0 Replies

Flex :: Create A Custom Component That Consists Of A Button

Jul 18, 2009

I am trying to create a custom component in flex that consists of a Button, and a TileList directly below that button. On button click event the TileList should open/close. The component works fine, but when I add it to my main flex app, inside a VBox, it simply opens and closes within the VBox. Because the height of the VBox is much smaller than the custom component's TileList, it causes scrollbars. My issue with it is that it should behave like a ComboBox/Pull-down menu and go over the VBox, instead of going inside it. how to overlay the custom component, so it behaves like a ComboBox/Pull-down?

View 1 Replies

ActionScript 2.0 :: MXML Project In Flex 2 - Make SWF File As Main Executable File?

Nov 26, 2006

I have to make a project for school. It will be like a tutorial, but into an application. I already made a part of it in MXML and a bit of action script but I encountered a few problems that are over my newbie limits. So the Flex Builder 2 makes a SFW file, in the main folder of the "project". I want to make that SWF file my main executable file. I have a folder with some pics, and another folder with Action Script Files. The code lvl that I know atm is ABSOLUTE BEGINER... I don know how to make my SWF file have a specific name when I run it.Here is a picture of a training exercices that should make thing more clear:Some people told me that I should use a HexEditor and stuff. Is it ture(what u think?).

Next problem. I dont know how to make the Stage to be fix. I mean.. I dont want the stage to be resizeble. I tryed to change the stagescalemode but that wasn't it. I toke a look at the help files of Flex from the net, about the Resize action and SystemManegment, but I didn't find out what I wantend.

View 4 Replies

ActionScript 3.0 :: Class To Create Either A Sprite Or Clip That Consists Of An Image And Some Text Based On The XML Data?

Jul 3, 2009

I want a class that I'm going to pass a short bit of XML data And then I want that class to create either a Sprite or Clip that consists of an image and some text based on the XML data Example my XML might look like

<root>
<image url="whatever.com/image.jpg">
<name data="Blanius">
</root>

I know how to get to the data what I'm looking for is the best way to create this Sprite on my stage.should the class create a sprite or clip?should the class called to create an instance and then I addChild in my core script?

View 5 Replies

ActionScript 3.0 :: Create A Simple Interactive Animation For A Website That Consists Of Three Rollover Areas On A Page?

Feb 19, 2011

I'm trying to create a simple interactive animation for a website that consists of three rollover areas on a page. When you mouse over an area, a bit of explanatory text is revealed by animating a mask over some text. The text is left displayed until a mouseover of a different area occurs.Let's call the three mouseover targets A, B, and C.A MOUSE_OVER event listener is registered for all three targets. In the event handler for each, I'm following a pattern like this:

Code:
A.transform.colorTransform = highlighted;
B.transform.colorTransform = notHighlighted;

[code].....

View 2 Replies

Android :: Make Sure The SWF File From AIR Project Can't Be Opened Like A Regular SWF File?

Jul 7, 2011

I'm making a game with Flash CS5.5 and exporting it to a APK file (AIR for Android).The trouble is that the APK file is really just a ZIP file, so you can extract the content and inside there is my game as a regular SWF file. Anyone can upload this to any website and play the game there.

I don't want the SWF file to work unless opened like it should, inside the APK file through Android.Is there any way to know through ActionScript 3 code if the SWF file has been extracted from the APK file and has been opened as a normal SWF file?

View 3 Replies

Professional :: Use A .ICO File Instead Of A .PNG Or .JPEG File In Flash Project?

Apr 18, 2011

I'm trying to find out if it's possible to use a .ICO file instead of a .PNG or .JPEG file in my Flash project. Is this even possible? The reason I'm asking is that the project I'm putting together uses ActionScript 2.0 code (not sure if that makes a difference or not) and displays a bunch of images for a bunch of different applications. So instead of creating a .PNG file for each application, since I've already got .ICO files on hand, I'd rather use those (saving me a ton of time).

View 4 Replies

Professional :: Move Project To See The Not-project Area Around The Project?

Jun 21, 2010

I cant "center" my project, like you can see its "fixed" (yellow lines) in the left side and I cant see "invisible" part of project... (area around the project). how can I move my project so I can see the not-project area around the project. (picture 2).

At the moment situation... (cant see that area around the project)
http://img19.imageshack.us/img19/1186/68553623.png

View 2 Replies

ActionScript 2.0 :: Building A Dynamic Content Page In Flash That Consists Of Using AttachMovieClip And CreateEmptyMovieClip With Coordinates To Place Photos And Objects

Oct 15, 2006

I'm building a dynamic content page in flash that consists of using attachMovieClip and createEmptyMovieClip with coordinates to place photos and objects, which are loaded from an external source and scrolling their thumbnails I've run into a problem setting the variables correctly because the scrolling thumbnails required that the thumbnails be nested inside a scrolling controller clip and that has somehow messed up my preloading and sequential text caption loading for the tumbnails.

View 4 Replies

ActionScript 2.0 :: Creating A Menu Bar That Is A Movieclip And Inside The Movieclip Consists Of The Buttons?

Oct 21, 2005

I'm creating a menu bar that is a movieclip and inside the movieclip consists of the buttons.Now the menu bar is twice as WIDE as what is visible on the stage.The only part you can see is the text 'menu' on a bar.Then when the mouse hits the bar, it flies across the screen to the otherside of the bar where the menu buttons are.Now the menu bar does its animation over 20 frames - the last frame being the frame where the menu buttons are now visible.

On the last frame i have the 'stop;' code

On the first frame I have this code:

Code:
stop();
this.onEnterFrame = function(){
if(rewind == true){

[code]....

View 2 Replies

Javascript :: Is It The Index.template.html File Per Project Or The HTML File Created Per MXML Application

Sep 26, 2011

I was reading about Flex- JavaScript communication via ExternalInterface.But I had a doubt, it said that the javascript code should be written in the HTML file of the application ? Now which is this HTML file ? Is it the index.template.html file per project or the HTML file created per MXML application ?

View 3 Replies

Flex :: Run .swc File In Project?

Mar 18, 2010

I have a .swc file and I learned how to add that swc file into the library. I will be happy if any one explain how to use this .swc file into my flex project and run that with an example .

View 1 Replies

ActionScript 3.0 :: Calling A Swf File From Within A Different Project?

Jul 29, 2009

I am brand new to flash and action script so am just learning the basics.My question is how do I call a swf file from one screen by clicking on a menu in a different project?

View 3 Replies

ActionScript 2.0 :: Embedding SWF File Into FLA Project

Feb 23, 2009

I'm all very new to Flash! I'm a Designer. I recently out sourced a flash project and now my client needs it updating. My project consists of a music mixing desk. You press a button and video pops up. The buttons are in the stage. When pressed, this triggers a movie clip which loads a FLV player. SIMPLE! ([URL] - to see the site in action!) I have a simple flash gallery [URL]. I have put the SWF, image folder and XML in the root. I have tried embedding the SWF gallery into my Flash Project by importing it into the library and dragging it to where video content usually lives (FLV player). It doesn't work. I've tried other techniques (loadMovie etc). But I'm a bit fuzzy on these methods.

View 0 Replies

ActionScript 3.0 :: Import SWC File Into Flash Cs3 Project?

Jul 19, 2011

Iam using flash cs3 professinal. How can I import to library swc files.

View 5 Replies

Flex :: Use A Style.css File From A .swc And Build The Project With ANT

Jul 9, 2010

I have an .SWC library with a style.css file inside. The .SWC file is added to my project and the style.css is used this way: <fx:Style source="assets/style/style.css" /> If I want to build my project with an ANT-script it says that "the external stylesheet couldn't be found". In ANT you need to write the path for assets with an leading "/". So this would work: <fx:Style source="/assets/style/style.css" /> But in this case it isn't possible to retrieve the style.css from the .swc as the compiler says that "the external stylesheet couldn't be found". Is there any way to use the style.css inside the .swc AND use ANT to build the project?

View 1 Replies

Javascript :: Place File In A Flex 3 Project?

Sep 16, 2010

I've got a javascript file that I need to load into my Flex 3 project. I access it in the HTML wrapper like so:

<script src="myJSFile.js" type="text/javascript"></script>

I use Google Code's library to access JQuery.

Is it okay to put the javascript file in the html-template folder? The idea being that it would be included in the release build. Any reason not to do so? Will this cause an error?

View 1 Replies

Actionscript 3.0 :: Loading Swf File Into Flash Project?

Nov 18, 2010

I don't know why the swf file won't work in the flash I used loader to put the swf file into the stage but it doesn't do it.I plays fine when I just open the swf file in Flash Pro CS-4 but when I put it into a flash, it doesn't work.

View 2 Replies

Java :: Use Swc File In Flash Builder Project?

Feb 9, 2011

i have a swc file i have added file to my project using [URL] how can i use this component in my flash builder project.

View 2 Replies

Php :: Running File With The Release Of Flex Project?

Feb 23, 2011

Problem:I call a PHP file using an HTTPService. I set the result of this HTTPService to a function which populates a testTextArea with whatever the PHP file has returned (echoed). This work fine when I run the application from flash builder i.e. I get strings in the testTextArea, echoed by my PHP file. But this does not work fine when I make the Release of the project and the testTextArea gets populated by the whole code of PHP file.

[Code]...

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved