noobie with a problem in his 1st project

Hi, just a noob in actionscript, to leave, I looked at some video tutorials basic and searched for websites on topics I'm interest in as3.

So I chose something that I thought was easy for my first project

basically I I read www.justin.tv/meta/username.xml for each user xml file, I want to know the date of account creation

on this XML part is something like < created_on > 1228199388 < / created_on > with the timestamp

then I look at http://www.gotoandlearn.com/play.php?id=64 I have had success read this value for a SINGLE user and the conversion to the format mm/dd/yy when I define the user as a variable

so I tried to add an input text where I can type any username, read this xml file, make the same conversion and show once again the date in a dynamic text box

Screenshot_4.jpg

so everything I have is really 1 button to clear the user name, the date, and others to display the date for the new user is entered in the first text box

Adds the event listener for the buttons, don't think that's what I did wrong

When I test it works very well for the user by default, but I have the problem as soon I click one of the buttons (clear data or to update to the new user)

ArgumentError: Error #1063: incompatibility of County of Argument on joined_fla::MainTimeline / borrarTodo (). expected 0, got 1.

for the clear button

and

ReferenceError: Error #1069: property not found on fl.controls.Button data and there is no default value.

at joined_fla::MainTimeline/xmlCargar()

for the show one

messages in the output tab

It's the project file

I know not for people with more than a few days of experience is something really stupid, but I thought that and I can't find the solution

Hope someone here coan to give me a solution or a clue about what I'm doing wrong

var leeXml:URLLoader = new URLLoader();

leeXml.addEventListener (Event.COMPLETE, xmlCargar);

var datosXml:XML;

nombreUsuario_txt.text = "justin".

function xmlCargar(e:Event):void

{

datosXml = new XML (e.target.data)

var creacionTimestamp:Date = new Date(datosXml.created_on * 1000);

DIA var = creacionTimestamp.getDate ();

If (dia < 10)

{

DIA = '0' + String (dia)

}

my var = creacionTimestamp.getMonth () + 1;

If (my < 10)

{

My = '0' + (my) String

}

anio var = creacionTimestamp.getFullYear ();

var fechaCreacion:String = (my + ' / ' + day + ' / ' + anio);

resultado_txt. Text = fechaCreacion;

}

leeXml.load (new URLRequest ("http://www.justin.tv/meta/" + nombreUsuario_txt.text + ".xml"));

borrar_btn.addEventListener (MouseEvent.CLICK, borrarTodo);

function borrarTodo (): void

{

nombreUsuario_txt.text = "";

resultado_txt. Text = "";

}

buscar_btn.addEventListener (MouseEvent.CLICK, xmlCargar);

Carlos.


your button should be called a function that loads your xml file, not the complete listener function of the load:

buscar_btn.addEventListener (MouseEvent.Click, startBuscarF);

function startBuscarF(e:Event):void {}

leeXml.load (new URLRequest ("http://www.justin.tv/meta/" + nombreUsuario_txt.text + ".xml"));

}

Tags: Adobe Animate

Similar Questions

  • Noob with code problem. : P

    Hello, I am a beginner in Flash and I started to look further at some tutorials, recently I came up with this error in my code and I can´t seem to figure it out.

    Error

    C:\Users\anton\Downloads\Flash games\interactivestorybook\Main.as, line 101046: type was not found or is not a compilation constant: HillPage.
    C:\Users\anton\Downloads\Flash games\interactivestorybook\Main.as, line 111046: type was not found or is not a compilation constant: PondPage.

    package

    {

    import flash.display.MovieClip;

    import flash.events.MouseEvent

    SerializableAttribute public class Main extends MovieClip

    {

    var startPage:StartPage

    var hillPage:HillPage

    var pondPage:PondPage

    public void Main()

    {

    startPage = new StartPage()

    hillPage = new HillPage()

    pondPage = new PondPage()

    addChild (startPage)

    Event listeners

    startPage.hillButton.addEventListener (MouseEvent.CLICK, onHillButtonClick)

    startPage.pondButton.addEventListener (MouseEvent.CLICK, onPondButtonClick)

    }

    Event handlers

    function onHillButtonClick(event:MouseEvent):void

    {

    addChild (hillPage)

    removeChild (startPage)

    }

    function onPondButtonClick(event:MouseEvent):void

    {

    addChild (pondPage)

    removeChild (startPage)

    }

    }

    Would appreciate if someone could give me a helping hand, it's probly just something obvious, but at the same time, not obvious to me.

    }

    If it is a document class, so be sure that you assign the names of HillPage and PondPage classes for the objects in the library.

  • noob with clickzone problem

    I created a clickzone with a plus and the State. Above this area, I put buttons, but these buttons create a hole in my clickable area. Y at - it a script that would allow me to add buttons to the clickzone?

    If that's all you got, is not the code, that I introduced myself... it is not all traces that.  If trace you the undefined looming as the other stuff, so you still have something you want to locate.

    Aside from that, have you advanced to the section of the timeline you lebeled when you click on a button?

  • Problem of his Palm t5 (research)

    Hello!

    Two days ago my t5 palm stopped play sounds via the internal speaker (his helmet seems to be ok). Posts on this forum say that it is a hardware problem (micro-switch is stuck in a headphone jack). At least in my case, I need a more complex explanation:

    -The internal speaker stopped working without any interference in the headphones (I do not plug headphones into the Palm). Most people have this problem after disconnecting the headset.

    -J' was able to set my speakers to life by simply plugging in the AC adapter / CC. President Ping with a usual sound and worked for a few hours, that dies again.

    -At least twice, I could hear sounds after a hard reset. But only until I tried to launch any application. Then he was silent again.

    -As for now, I hear 'clicks' of the speaker when I connect my T5 to hotsync cable and press the hotsync button. Still more - if I have press the hotsync button while the cable is not plugged into the USB port - and wait 30 to 40 seconds, I see a box with the message "hotsync failure" alarm and can hear the sound of the mono speaker alarm Palm. So it is again being mute.

    With a background in electronics, I opened the unit and checked the sound elements visible:

    -L' speaker is OK, the measured resistance is recommended on the speaker (7.8 vs 8.0 ohm)

    -Points of motherboard are OK

    -There is a voltage V 1.68 on the two points vs. the ground, but no difference in voltage between the pads.

    -5-pin headset plug seems to be OK. Microswitch pads (two pads on a basis of a Jack) have no resistance measured when the socket is empty and are disconnected when headphones are plugged in.

    -J' have tried to short-circuit buffers with external cable - but no effect dip switch - sound is always redirected to the helmet.

    -J' tried to connect the internal speaker to the headphone channel. It works, but the rate of release of palm is unacceptable (headphones are devices to 30 ohms, and I believe that internal speaker is connected through some elements of energy saving).

    I'm completely perplexed with my problem of his palm. This may not be a pure hardware problem as he plays sometimes a few sounds via mono speaker. But if this is a problem in a software - how in hell, he survives device resets?

    Any ideas?

    Hello!

    Indeed, the problem was multiple connector. It seems that cable flat keyboard connection and connector multiple base with a main card had isolation deteriorated between some of his sons and a surface of steel on the base. Now, I remember that some time ago my Palm was irregularly to hot-sync mode even when the hot sync cable was not plugged.

    After that I put a piece of insulation between the metal base and a flat cable (which covers the hard edge of the base metal) mono speaker returned to life. Please put this in a FAQ or KB if possible.

    It would be nice for palm-engineers (if palm still has some) to build a utility program that allows the user to select the device audio default substitution of the system. See cool head for treo on sourceforge (does not work on palm t-series).

    Thank you!

    Message relates to: Tungsten T5

  • My sister has problems on his laptop, how can I connect to the laptop with my labtop to help him with his computer problems? Thank you.

    My sister has problems on his laptop, how can I connect to laptop with my labtop to help her with her computer problems when I live several States away? Please help me if you know how to do this thank you.

    Suggest you use Team Viewer, free version.
    It is used here every day for several hours.

    Please see the links below for more details...
    http://www.TeamViewer.com/en/index.aspx
    http://www.TeamViewer.com/en/products/remotecontrol.aspx
    http://www.TeamViewer.com/en/help/cat15-remote-control.aspx

  • have a problem with nsLoinManager.js:222 his script to say is do not work, reinstall will not solve this need for assistance.

    problem arises as soon as I start firefox firefox just freezes while I can do other things with my pc,.
    IE exhausted with any problem, but I prefer firefox you want to run again, only ihad clue is this erroe msg, please help me.

    I don't know, I could use it sometime last year, so I'll exclude.
    BTW, I'm 18, which is beta and Yes! problem disappeared

  • Problem while setting team project collection

    Hello

    I am facing a problem in trying to fix a Collection of Project Team (PTC) to a centralized server TFS. the error is error in tracking work items.

    Error description:

    Transaction (process ID 570) has been blocked on the resources of locking with another process and has been chosen as the deadlock victim. Rerun the transaction.

    We took the PTC TFS 2010 Server database backup and restored in centrallized TFS break and tried to reach it, but it is causing a problem above mentined.
    This error occurs very often (every time), but a few times it will work without causing any trouble.

    Helpme to reslve the issue.

    Thank you

    Prashantgouda.

    Hey Prashantgouda,

    Please join experts from developers in the MSDN (Microsoft Developers Network) for assistance with this problem. The link below will bring you to the MSDN forums that specialize in Visual Studio Team System:
    MSDN - Visual Studio Team System

  • Printing of the .pdf of the 2013 project file will stop when the name of the file must be written. Project 2013 crashes. Anyone know what the problem is between 2013 project and Adobe Acrobat 9?

    Printing of the .pdf of the 2013 project file will stop when the name of the file must be written. Project 2013 crashes. Anyone know what the problem is between 2013 project and Adobe Acrobat 9?

    The family of products Acrobat 9.x passed in mid-2013 "end of Support".
    Using Acrobat 9 of MS Project via PDFMaker stops with Office 2007.
    To 2013 Office support, you must use Acrobat XI (11.0.1) or newer.

    A good reference:
    https://helpx.Adobe.com/Acrobat/KB/compatible-Web-browsers-PDFMaker-applications.html

    Acrobat Pro and Standard DC are what are currently available for purchase.

    Be well...

  • Verizon said I can be faced with one problem with my browser and don't charge but ATT, gmail and other

    Tried loading Verizon homepage, but it says I can be faced with a problem with my browser. ATT, gmail between other fine load and Verizon was very well for some time now, what should I do? I'm not tech savvy so please keep it simple for me, thank you.

    Try to clear your browser's cache.

    Firefox button or tools > clear recent history... - details and of course Cache hit only is selected, and then select all and click the clear now button.

  • Presario SR1463CL with drivers problems

    Please be tolerant of beginners.

    I purchased a SR1463CL to add to a DELL Dimension - old but never fails. -the HARD drive was crushed. I replaced the HDD Samsung with Western Digital. I have replace the dial-up modem. All this without problems. I installed Windows XP Pro and SP2 update. My system detects "New hardware" drivers VGA Compatible and multimedia controller. I have had no success finding the right drivers and their installation. My monitor works find, but I have no sound.

    Poster 'sounds, video controllers' Device Manager with the problems. Initial device showed sound and audio by default to the Modem. I removed which and at this point no device is indicated.

    Device Manager shows no driver found for new hardware and online search has failed. Windows Update detects any is available. I checked on the resource one manufacturing line have failed in my downloadsfrom RealTek and Nvidia.Dial - up has had major periods and material has been identified as there's no way for the system. Previous owner had made the back-ups-DVD-but they went "purple haze" and could not be read. That's why I installed XP Pro.

    My modem does not work on and additional time. It will connect and funtion but after a few minutes I'll get "Page not found" displayed.

    So, I use my Dell Dimension for internet troubleshooting. Any help is greatly appreciated.

    Respectfully.

    "Submariners do it deeper."

    Thanks for the information. Due to serious conflicts resulting from auto-updates from microsoft, which I had to reformat the HARD drive and have located since the necessary drivers to the www.sis.com for VGA and www.realtek.com for audio AC 97 readers to be precise. Manually review and choose downloads in the future.

    "Greens, all councils prepare to dive."

    Thanks again for your help. It is greatly appreciated.

    Bamabubblehead went to the abyss.

  • My macbook air running hot and the battery drains quickly can help you with this problem?

    My macbook air running hot and the battery drains fast is a 13 ", at the beginning of 2014.  Processor 1.4 GHz intel core 15Can you help with this problem?

    Apps can affect the performance of Mac, battery, temperature and fan activity - Apple Support

  • just installed new update for itunes. When I go to the page stoe it flashes really hurt. anyone with this problem. is there a solution?

    just installed new update of itune. When I go to store the page, it's really bad flicker.  anyone with this problem. is there a solution?

    Widely not reported, no known resolution until Apple release a new version of iTunes that affects it.

  • two drivers of PXI chassis with Configuration problem

    Hello

    I have two PXI chassis. One is PXI 1033 and works perfectly with the NI PXI-5404, 5105, 6509, 1409, installed 8336. The other is 1036 PXI with the PXI-5404 NI, 8366 installed. When I was trying wreath connect, as master 1033, 1036 as slave, I found several problems.

    1. in the Measurement & Automation Explorer, does not have my good guys in 1033. Instead, there is a sign of the Red Cross in bottom right with 6509, 5105, 5404.

    2. I can't find an another 5404 of the 1036. In fact, I can't find 1036 in MAX.

    Update BIOS. My PXI system is already identified under the name 'NOR PXI - 1033 Embedded MXI Express' and Chassis1 is identified as 'NOR PXI 1033'.

    So I made several tests as below:

    1. unscrew the 5404 1036 slave. MAX can configure 2 1036 chassis. Ok. But when I reconnect 5404 in 1036, same result happened as stated above.

    2 uninstall the driver of 5404, so the 5404 in 1033 does not either now. And then reboot again, same result happens again. Cannot detect the 1033 chassis. Other vouchers in 1036 don't work either.

    Please, any suggestion is highly appreciated.

    Sincerely,

    Bin

    Hi Ben,

    This happens sometimes with MXI-Express:

    Error code 12 with MXI-Express

    http://forums.NI.com/T5/PXI/two-PXI-chassis-connection-with-configuration-problem/m-p/1475876#M9033

    In general, you can read this error 12 means on Device Manager:

    Explanation of error codes generated by Device Manager in Windows XP Professional

    http://support.Microsoft.com/kb/310123

    If it was a problem of bandwidth, PCI or PXI side, you could pull a few cards to see if that alleviates the problem, or that the link from Microsoft over the States, you can disable the driver for other cards.

  • When you install the 2007 Microsoft Office Suite Service Pack 2 (SP2), I still received the error code 646... I tried to download the RegCure as advised, but the problem still exists... Please help me with this problem... Thank you

    Ideas:

    • When you install the 2007 Microsoft Office Suite Service Pack 2 (SP2), I still received the error code 646... I tried to download the RegCure as advised, but the problem still exists... Please help me with this problem... Thank you

    I tried to download the RegCure as advised, but the problem still exists...

    Who advised you to 'download... '. RegCure? Doing so could only worse issues! If you ever think that your registry database must be cleaned, repaired, boosted or optimized (it isn't), read http://aumha.net/viewtopic.php?t=28099 and draw your own conclusions.

    See http://social.answers.microsoft.com/Forums/en-US/vistawu/thread/6e716883-7af4-4a9f-8665-2f4dd57eee8d ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • I have a frozen screen of Active recovery of white desk with a mouse. I think that the computer is frozen upward with a problem of recovery? Right?

    I have a frozen screen of Active recovery of white desk with a mouse.  I think that the computer is frozen upward with a problem of recovery? Right?

    How can I fix?

    Hello
    • What were the changes made before the problem occurred?

    You can try to restart the computer and check if it helps.

    If above does not help, you can read the following steps to disable the active desktop on the computer and check:

    a. to disable Active Desktop.
    b. right click on an area empty office, point to Active Desktop, and then click view as Web Page to clear the check box.

Maybe you are looking for