Live Streaming

Full Version: RVC 5.0 Flex problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I tried to open file .fxp and there were a problem in line 513: "Type was not found or not a compile-time constant : MapEvent.

Attached there are a screenshot of the situation.

Thanks
The Google map library is missing. Please read the "CUSTOMIZATION AND CUSTOM INSTALLATION" section of this post: http://www.videosoftware.pro/forum/THREAD-Installing-JabberCam-RVC-5
(12-16-2010, 03:41 AM)JabberCam Wrote: [ -> ]The Google map library is missing. Please read the "CUSTOMIZATION AND CUSTOM INSTALLATION" section of this post: http://www.videosoftware.pro/forum/THREAD-Installing-JabberCam-RVC-5

How can I remove google maps from the code? Do I have to delete every line of code related to google maps? Or is there a constant I can change?
(12-16-2010, 11:51 PM)pirosu@gmail.com Wrote: [ -> ]
(12-16-2010, 03:41 AM)JabberCam Wrote: [ -> ]The Google map library is missing. Please read the "CUSTOMIZATION AND CUSTOM INSTALLATION" section of this post: http://www.videosoftware.pro/forum/THREAD-Installing-JabberCam-RVC-5

How can I remove google maps from the code? Do I have to delete every line of code related to google maps? Or is there a constant I can change?

Just see the errors and comment those lines (you'll need to do that about 3 times) until all errors disappear. An easier way is to hide (visible="false") the "Map" tab in JabberCam.mxml, the Google library won't do any harm.

Could you please help me, how can I hide the "Map" tab in JabberCam.mxml? I found the JabberCam.mxml but i cant find the "Map" tab and dont know how to hide it Blush
In JabberCam.mxml, around line 557:
PHP Code:
        <!-- ****************** MAP PANEL ****************** -->    
        <
mx:Script>
            <![
CDATA[
                
import mx.events.PropertyChangeEvent;
                
import com.google.maps.controls.MapTypeControlOptions;
                
import com.google.maps.LatLng;
                
import com.google.maps.Map;
                
import com.google.maps.MapEvent;
                
import com.google.maps.MapType;
                
import com.google.maps.controls.MapTypeControl;
                
import com.google.maps.controls.ZoomControl;
                
import com.google.maps.MapOptions;
                
                
import mx.events.FlexEvent;
                
import mx.effects.easing.*;
                
                private var 
googleMap Map;
                
                private function 
toggleMapBtn(e:MouseEvent):void{
                    if(
e.currentTarget.label== 'Map')
                        
MapPanelOut.play();
                    else 
                        
MapPanelIn.play();
                }
                
                protected function 
mapContainer_creationCompleteHandler(event:FlexEvent):void
                
{
                    if(!
googleAppId)
                    {
                        
addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, function(PropertyChangeEvent) : void {
                            if(
e.property.toString() == "googleAppId") {
                                
removeEventListener(PropertyChangeEvent.PROPERTY_CHANGEarguments.callee);
                                
callLater(mapContainer_creationCompleteHandler, [null]);
                            }
                        });
                        
                        return;
                    }
                    
                    
googleMap = new Map();
                    
googleMap.sensor "false";
                    
googleMap.key googleAppId;
                    
googleMap.addEventListener(MapEvent.MAP_READYgoogleMap_mapReady);
                    
googleMap.setSize(new Point(mapContainer.widthmapContainer.height));
                    
googleMap.addControl(new ZoomControl());
                    
googleMap.addControl(new MapTypeControl());
                    
                    
                    
mapContainer.addChild(googleMap);
                }
                
                private function 
googleMap_mapReady(ev MapEvent) : void {
                    
googleMap.setCenter(null,NaN,MapType.SATELLITE_MAP_TYPE);
                }
            ]]>
        </
mx:Script>
        
        <
mx:Move id="MapPanelOut" target="{MapPanel}" yTo="{settingsTop}" effectEnd="MapButton.label='Close'" duration="1500" easingFunction="Bounce.easeOut"/>        
        <
mx:Move id="MapPanelIn" target="{MapPanel}" yTo="-335" effectEnd="MapButton.label='Map'" duration="1000" easingFunction="Bounce.easeIn"/>        
        
        <
mx:Canvas id="MapPanel" width="456" height="355" y="-335" horizontalCenter="0">    
                <!-- 
MAP PANEL CONTAINER-->
            <
mx:VBox width="456" height="330" top="4" verticalAlign="top" horizontalAlign="center" backgroundColor="#404040" backgroundAlpha="0.9" paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10" verticalGap="1" borderStyle="solid" borderThickness="1" borderColor="#B7BABC" cornerRadius="4">
                    <
mx:UIComponent id="mapContainer" width="100%" height="100%" creationComplete="mapContainer_creationCompleteHandler(event)" />
                </
mx:VBox>
                <!--
END MAP PANEL CONTAINER-->
                
                <!--
MAP BUTTON-->
                <
mx:Button left="178" skin="@Embed(source='../assets/SettingsButton.png')" icon="@Embed(source='../assets/MapIcon.png')" id="MapButton" width="101"  height="21" bottom="0" label="Map" click="toggleMapBtn(event)" enabled="true" fontWeight="normal" color="#707070"
                           
visible="{SettingsPanel.y!=-335}"/>
                <!--
END MAP BUTTON-->
        </
mx:Canvas>
        <!-- ****************** 
END MAP PANEL ****************** --> 

Note: If you simply remove it, it may give you .as errors. Try fixing those functions that give you the error:
find (around line 288):
PHP Code:
            private function toggleSettingsBtn(e:MouseEvent):void{
                if(
e.currentTarget.label== 'Settings') {
                    
SettingsPanelOut.play();
                } else { 
                    
SettingsPanelIn.play();
                    
AdvancedSettingsPanelIn.play();
                    
HelpPanelIn.play();
                    
MapPanelIn.play();
                }
            } 
replace with:
PHP Code:
            private function toggleSettingsBtn(e:MouseEvent):void{
                if(
e.currentTarget.label== 'Settings') {
                    
SettingsPanelOut.play();
                } else { 
                    
SettingsPanelIn.play();
                    
AdvancedSettingsPanelIn.play();
                    
HelpPanelIn.play();
                }
            } 

find (around line 311):
PHP Code:
private function onFullscreen(ev FullScreenEvent) : void {
                if(
ev.fullScreen) {
                    
SettingsButton.visible AdvancedSettingsButton.visible HelpButton.visible MapButton.visible false;
                    
partnerContainer.mouseEnabled partnerContainer.mouseChildren false;
                } else {
                    
SettingsButton.visible AdvancedSettingsButton.visible HelpButton.visible MapButton.visible true;
                    
partnerContainer.mouseEnabled partnerContainer.mouseChildren =  true;
                }
            } 
replace with:
PHP Code:
            private function onFullscreen(ev FullScreenEvent) : void {
                if(
ev.fullScreen) {
                    
SettingsButton.visible AdvancedSettingsButton.visible HelpButton.visible false;
                    
partnerContainer.mouseEnabled partnerContainer.mouseChildren false;
                } else {
                    
SettingsButton.visible AdvancedSettingsButton.visible HelpButton.visible true;
                    
partnerContainer.mouseEnabled partnerContainer.mouseChildren =  true;
                }
            } 
If you remove the Map button and panel, modify the position of the Help button:

find:
PHP Code:
<!--HELP BUTTON-->
            <
mx:Button left="280" skin="@Embed(source='../assets/SettingsButton.png')" icon="@Embed(source='../assets/HelpIcon.png')" id="HelpButton" width="101"  height="21" bottom="0" label="Help" click="toggleHelpBtn(event)" enabled="true" fontWeight="normal" color="#707070"
                       
visible="{SettingsPanel.y!=-335}"/>
            <!--
END HELP BUTTON--> 
replace with:
PHP Code:
<!--HELP BUTTON-->
            <
mx:Button left="178" skin="@Embed(source='../assets/SettingsButton.png')" icon="@Embed(source='../assets/HelpIcon.png')" id="HelpButton" width="101"  height="21" bottom="0" label="Help" click="toggleHelpBtn(event)" enabled="true" fontWeight="normal" color="#707070"
                       
visible="{SettingsPanel.y!=-335}"/>
            <!--
END HELP BUTTON--> 
or remove it the same way you did with the Map section.