5 Replies Latest reply on Nov 19, 2011 8:00 AM by SteveRicketts

    Flex 4.5 upgrade problem - can not resolve a multiname reference

    Dennis_gull

      When I upgraded from flex 4.0 to flex 4.5 i got the following error:

       

      1046: Type was not found or was not a compile-time constant: VideoEvent

      Can not resolve a multiname reference unambiguously. flash.events:VideoEvent (from /Applications/Adobe Flash Builder 4.5/sdks/4.5.0/frameworks/libs/player/10.2/playerglobal.swc(flash.events:VideoEvent)) and mx.events:VideoEvent (from /Applications/Adobe Flash Builder 4.5/sdks/4.5.0/frameworks/libs/mx/mx.swc(mx.events:VideoEvent)) are available. VideoViewer.mxml /quintime/src/views/viewers Unknown Flex Problem

      What should to do to resolve this issue?

        • 1. Re: Flex 4.5 upgrade problem - can not resolve a multiname reference
          mjewl Level 1

          I also got that. One can sidestep it by always using the full name of it (mx.events.VideoError instead of just VideoError).

           

          Since it's imported it should work without it. Perhaps mxml gets compiled down to something that also imports flash.events.VideoError.

          1 person found this helpful
          • 2. Re: Flex 4.5 upgrade problem - can not resolve a multiname reference
            Dennis_gull Level 1

            It works everywhere except in methods properties, the below example would still generate an error:

             

            myVid.addEventListener(mx.events.VideoEvent.PLAYHEAD_UPDATE, updateTimeDisplay);

             

            private function updateTimeDisplay(event:mx.events.VideoEvent):void

            {

                 // do something

            }

             

            1046: Type was not found or was not a compile-time constant: VideoEvent

            • 3. Re: Flex 4.5 upgrade problem - can not resolve a multiname reference
              Flex harUI Adobe Employee

              Do you have an import mx.events.VideoEvent?

              • 4. Re: Flex 4.5 upgrade problem - can not resolve a multiname reference
                RaRaton Level 1

                Hi!

                 

                I have same problem. I think this class was deleted of flex_sdk_4.5.0.20967. When i use this class in my source,

                 

                with its import mx.event.VideoEvent, the debug show me:

                 

                1046: Type was not found or was not a compile-time constant: VideoEvent.    book.as    /epaper60/pr    line 555    Flex Problem

                 

                I have a workaround. I use mx.events.VideoEvent at function headers and   i use literal string as type event. But, you must avoid use VideoEvent  class directly.

                 

                           public function loadVideo():void

                            {

                 

                                video.videoDisplay.addEventListener("stateChange", videoDisplay_stateChange);

                                video.videoDisplay.load(); // cuando el vídeo está cargado lanzará el evento READY

                 

                            }

                 

                            private function videoDisplay_stateChange(event:mx.events.VideoEvent):void {

                 

                                switch (event.state) {

                 

                                    case "connectionError":

                 

                                        parentApplication.showErrorWindow(_connection_error + "\n\n" + _source);

                 

                                        parentApplication.updateLoadingState(false);

                 

                                        cerrar();

                 

                                        break;

                 

                                }

                 

                            }

                 

                I work with Adobe Flash Builder 4 v4.0.1.277662 and sdk 4.5.0.20967, perhaps this is my problem.

                I need use VideoEvent class directly. Exist this problem with Adobe Flash Builder 4.5?

                Thanks!

                • 5. Re: Flex 4.5 upgrade problem - can not resolve a multiname reference
                  SteveRicketts Level 1

                  This is an old post but I'll provide a fix that worked for me.  I had to fully qualify the VideoEvent in the listener and the function.

                   

                   

                  participantVideo.addEventListener(mx.events.VideoEvent.STATE_CHANGE,participantPlayStateCh ange);

                   

                   

                   

                  private function participantPlayStateChange(event:mx.events.VideoEvent):void