Bonjour a tous
je viens de telercharger eclipse et flex builder ...
et lorsque je lance un exemple telecharger ca plante avec cette la
et voici le codeTypeError: Error #1009: Il est impossible d'accéder à la propriété ou à la méthode d'une référence d'objet nul.
at test_rss/onLoad()[U:\projet\hello_wolrd\src\test_rss.mxml:16]
at test_rss/___test_rss_Application1_initialize()[U:\projet\hello_wolrd\src\test_rss.mxml:4]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9298]
at mx.core::UIComponent/set processedDescriptors()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:1217]
at mx.core::Container/createComponentsFromDescriptors()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\Container.as:3506]
at mx.core::Container/createChildren()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\Container.as:2589]
at mx.core::UIComponent/initialize()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:5370]
at mx.core::Container/initialize()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\Container.as:2526]
at mx.core::Application/initialize()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\Application.as:846]
at test_rss/initialize()[U:\projet\hello_wolrd\src\test_rss.mxml:0]
at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::childAdded()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:2009]
at mx.managers::SystemManager/initializeTopLevelWindow()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:3234]
at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::docFrameHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:3064]
at mx.managers::SystemManager/docFrameListener()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:2916]
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66 <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="300" height="300" initialize="onLoad()" backgroundAlpha="0"> <mx:Script> <![CDATA[ public var widget:Object; [Bindable] private var rssdata:XML; public function onLoad():void { widget.addEventListener("widget-loaded",onWidgetLoaded); } public function onWidgetLoaded(evt:Event):void { widget.initWidget(800,800,0xccffff); loadFeed("http://www.lequipe.fr/Xml/Football/Titres/actu_rss.xml"); } private function loadFeed(feed:String):void { var rss:Object=widget.newRss(); rss.addEventListener(Event.COMPLETE,onRSSLoaded); rss.load(new URLRequest(feed)); } private function onRSSLoaded(event:Event):void { var loader:URLLoader=URLLoader(event.target); rssdata= XML(loader.data); } ]]> </mx:Script> <mx:Panel layout="vertical" title="Flus Rss Widget" width="{this.width-10}" height="{this.height-10}"> <mx:Repeater width="100%" height="100%" id="items" dataProvider="{rssdata.channel.item}"> <mx:VBox width="100%" horizontalAlign="left" creationCompleteEffect="Fade"> <mx:LinkButton textAlign="left" label="{items.currentItem.title}"> </mx:LinkButton> <mx:TextArea paddingLeft="10" paddingRight="10" editable="false" width="98%" cornerRadius="6" height="60" backgroundColor="0xf9f9f9" htmlText="{items.currentItem.description}"> </mx:TextArea> <mx:Text paddingRight="10" width="98%" textAlign="right" text="{(items.currentItem.creator==null?'':items.currentItem.creator)+ ' ' +(items.currentItem.date==null?'':items.currentItem.date)}"> </mx:Text> </mx:VBox> </mx:Repeater> </mx:Panel> </mx:Application>
merci pour votre aide
Partager