IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

MXML Discussion :

problème compilation Error #1009


Sujet :

MXML

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre averti
    Profil pro
    Inscrit en
    Janvier 2008
    Messages
    22
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2008
    Messages : 22
    Par défaut problème compilation Error #1009
    Bonjour,

    voici mon problème. j'utilise le flex book de ruben swieringa que j'ai modifié.
    http://www.rubenswieringa.com/blog/f...component-beta

    Voici mon code, j'ai simplement ajouter une fonction pour pouvoir mettre l'animation en plein écran :

    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
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
     
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init(event)" backgroundColor="#333333"  
    	xmlns:book="com.pricope.miti.book.*" xmlns:rs="com.rubenswieringa.book.*" xmlns:local="*" viewSourceURL="srcview/index.html">
    	<mx:Script>
    		<![CDATA[
    			import com.rubenswieringa.book.Page;
     
    			import flash.display.StageDisplayState;
       import flash.events.FullScreenEvent;
    			 // Status FULLSCREEN:
       private var FullScreenStatus:Boolean = false; 
       private function init(event):void
       {
         stage.scaleMode = StageScaleMode.NO_SCALE;
         stage.align = StageAlign.TOP_LEFT;
         stage.addEventListener(FullScreenEvent.FULL_SCREEN, fullScreenRedraw);
       }
       private function fullScreenRedraw(event:FullScreenEvent):void
       {
         output.text = ""
     
         if (event.fullScreen == false)
          disableFullScreen()
       }
       private function changeFullScreenStatus(e:MouseEvent):void
       {
        if(FullScreenStatus)
         disableFullScreen()
        else
         enableFullScreen()
       }
       private function disableFullScreen():void
       {
        FullScreenStatus = false;
        fullScreen_btn.label = "Mode Plein Ecran";
        fullScreen_btn.stage.displayState = StageDisplayState.NORMAL;
       }
       private function enableFullScreen():void
       {
        FullScreenStatus = true;
        fullScreen_btn.label = "Sortir Plein Ecran";
        fullScreen_btn.stage.displayState = StageDisplayState.FULL_SCREEN;
       }
     
     
    		]]>
    	</mx:Script>
     
    	<book:LargeBook id="myBook" openAt="0" autoFlipDuration="600" easing="0.7" regionSize="150" 
    		sideFlip="true" hardCover="false" hover="true" snap="false" 
    		flipOnClick="true" height="600" y="{Math.round(Application.application.height/2-300)}" width="1200" x="{Math.round(Application.application.width/2-600)}"
    		initialize="init(event)">
    		<rs:Page hard="true" name="0">
    			<mx:Image source="@Embed('imagebook_bord/1.jpg')" />
    		</rs:Page>
    		<rs:Page  name="1">
    			<mx:Image source="@Embed('imagebook_bord/2.jpg')" />
    		</rs:Page>
    		<rs:Page  name="2">
    			<mx:Image source="@Embed('imagebook_bord/3.jpg')" />
    		</rs:Page>
    		<rs:Page  name="3">
    			<mx:Image source="@Embed('imagebook_bord/4.jpg')" />
    		</rs:Page>
    		<rs:Page  name="4">
    			<mx:Image source="@Embed('imagebook_bord/5.jpg')" />
    		</rs:Page>
    		<rs:Page  name="5">
    			<mx:Image source="@Embed('imagebook_bord/6.jpg')" />
    		</rs:Page>
    		<rs:Page  name="6">
    			<mx:Image source="@Embed('imagebook_bord/7.jpg')" />
    		</rs:Page>
    		<rs:Page  name="7">
    			<mx:Image source="@Embed('imagebook_bord/8.jpg')" />
    		</rs:Page>
    		<rs:Page  name="8">
    			<mx:Image source="@Embed('imagebook_bord/9.jpg')" />
    		</rs:Page>
    		<rs:Page  name="9">
    			<mx:Image source="@Embed('imagebook_bord/10.jpg')" />
    		</rs:Page>
     
    	</book:LargeBook>
     
    	<mx:Button x="782" y="{Math.round(Application.application.height/2+320)}" label="Aller a la page" click="myBook.jumpToPage(Number(pageNumber.text))"/>
    	<mx:TextInput x="700" y="{Math.round(Application.application.height/2+320)}" width="83" text="1" id="pageNumber"/>
     
    	<mx:Button x="380" y="{Math.round(Application.application.height/2+320)}" label="&lt;&lt;" id="fCover" click="myBook.jumpToPage(0)" width="45"/>
    	<mx:Button x="500" y="{Math.round(Application.application.height/2+320)}" label="&lt;" id="pPage0" click="myBook.prevPage()" width="45"/>
    	<mx:Button x="433" y="{Math.round(Application.application.height/2+320)}" label="&gt;&gt;" id="bCover" click="myBook.jumpToPage(myBook.pageArray.length)" width="45"/>
    	<mx:Button x="553" y="{Math.round(Application.application.height/2+320)}" label="&gt;" id="nPage" click="myBook.nextPage()" width="45"/>
     
    	 <mx:Button label="Mode Plein Ecran" id="fullScreen_btn" x="5" y="5" click="changeFullScreenStatus(event)"/>
    	 <mx:Text x="56" y="65" text="" id="output"/>
     
    	<mx:Style source="styles.css"/>
    </mx:Application>

    Et voici l'erreur que j'obtiens lorsque je lance le swf :

    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
    TypeError: Error #1009: Il est impossible d'accéder à la propriété ou à la méthode d'une référence d'objet nul.
    	at largeBook/init()
    	at largeBook/__myBook_initialize()
    	at flash.events::EventDispatcher/dispatchEventFunction()
    	at flash.events::EventDispatcher/dispatchEvent()
    	at mx.core::UIComponent/dispatchEvent()
    	at mx.core::UIComponent/set processedDescriptors()
    	at mx.core::Container/createComponentsFromDescriptors()
    	at mx.core::Container/createChildren()
    	at com.rubenswieringa.book::PageManager/createChildren()
    	at mx.core::UIComponent/initialize()
    	at mx.core::Container/initialize()
    	at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()
    	at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()
    	at mx.core::Container/addChildAt()
    	at mx.core::Container/addChild()
    	at mx.core::Container/createComponentFromDescriptor()
    	at mx.core::Container/createComponentsFromDescriptors()
    	at mx.core::Container/createChildren()
    	at mx.core::UIComponent/initialize()
    	at mx.core::Container/initialize()
    	at mx.core::Application/initialize()
    	at largeBook/initialize()
    	at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::childAdded()
    	at mx.managers::SystemManager/initializeTopLevelWindow()
    	at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::docFrameHandler()
    	at mx.managers::SystemManager/docFrameListener()

    Quelqu'un pourrait-il m'aider à débuger cela, car je ne vois pas du tout comment faire?

    Je précise que lorsque je lance l'anim dans une page html, elle fonctionne parfaitement, mais je ne suis pas sur que ce soit très bon de laisser cela en état.

    Merci,

    Mathieu

  2. #2
    Membre Expert
    Avatar de Jim_Nastiq
    Homme Profil pro
    Architecte, Expert Flex
    Inscrit en
    Avril 2006
    Messages
    2 335
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Architecte, Expert Flex
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2006
    Messages : 2 335
    Par défaut
    Salut,

    pour commencer y'aurait pas comme un souci dans ta déclaration de ton handler init ?

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    private function init(event:FlexEvent):void

    Pensez vraiment à effectuer une recherche avant de poster, ici et sur un moteur de recherche! c'est la moindre des choses
    Pensez au tag

    Mon Blog sur la techno Flex
    Ma page sur Developpez.com

    Jim_Nastiq

Discussions similaires

  1. [Flex4] Problème Focus ? - Erreur Error #1009 sur Formulaires
    Par tlafont2607 dans le forum Flex
    Réponses: 1
    Dernier message: 18/03/2013, 15h04
  2. Problème : Compile error : Method or data member not found
    Par Nitromard dans le forum VBA Access
    Réponses: 8
    Dernier message: 21/04/2011, 10h15
  3. Réponses: 3
    Dernier message: 08/03/2011, 23h04
  4. Problème compilation programme error LNK2019
    Par xEndLe dans le forum Débuter
    Réponses: 3
    Dernier message: 18/09/2010, 18h31
  5. Problème de .NET : Compilation Error
    Par infostars dans le forum ASP.NET
    Réponses: 3
    Dernier message: 04/05/2009, 14h16

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo