Flex4 full focus Halo INavigatorContent error creationPolicy = "none"

2010-12-31  来源:本站原创  分类:Flash  人气:163 

1. Flex4 in full:

  • The page (for example, the head page) to add creationComplete event handling: creationComplete = "init ();"
private var fullScreenBtnLabel:String = " Full-screen ";

private function init():void{
        stage.addEventListener(FullScreenEvent.FULL_SCREEN,function(event:FullScreenEvent):void {
                fullScreenBtnLabel = event.fullScreen ? " Ordinary " : " Full-screen ";
  • Page Add button:
<mx:LinkButton label="{fullScreenBtnLabel}"  click="changeScreen(event)" textDecoration="underline"/>
  • button click event handler:
private function changeScreen(event:MouseEvent):void{
        stage.displayState = stage.displayState == StageDisplayState.FULL_SCREEN ? StageDisplayState.NORMAL : StageDisplayState.FULL_SCREEN;

Completed, this page can be achieved in the "Full Screen" and "ordinary" to switch between the.

Note: (1). Flex3 use mx.core.Application.application.stage.displayState = StageDisplayState.FULL_SCREEN; to achieve full-screen switch.

(2) full-screen, you can not use the keyboard.

2. By default, the use of Flex to access the html wrapper generated swf file, even if the page using focusManager.setFocu creationComplete event that an input box has focus, but the swf does not get the whole focus is not on the page loading is complete direct input. Solution: Modify the project directory html-template \ index.template.html, add a label in the onload event <head>

<script type="text/javascript">
function doload() {
    try {
    } catch (ex) {

<!--  ---------- html ----------- -->

<body onload="doload()">

3. ViewStack Daily News "Halo Navigator offspring must implement INavigatorContent." Error.

Solution: nested layer NavigatorContent

4. ViewStack in creationPolicy = "none", manually create the component:

mainViewStack.createComponentFromDescriptor (mainViewStack.childDescriptors [index], false);
mainViewStack.validateNow ();


<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                           xmlns:mx="library://ns.adobe.com/flex/mx" creationComplete="init();">

                        import mx.core.INavigatorContent;
                        import mx.core.UIComponent;
                        private function init():void {
                        // Create a subfolder in ViewStack View And display
                        private function selectChildViewByIndex(view:UIComponent,index:int):void {
                                if(view == null){
                                mainViewStack.selectedIndex = index;


        <mx:ViewStack creationPolicy="none">
                        <s:Panel title="panel1"/>
                        <s:Panel title="panel2"/>
                        <s:Panel title="panel3"/>

                <s:Button label="show panel1" click="selectChildViewByIndex(panel1,0)"/>
                <s:Button label="show panel2" click="selectChildViewByIndex(panel2,1)"/>
                <s:Button label="show panel3" click="selectChildViewByIndex(panel3,2)"/>

  • Flex4 full focus Halo INavigatorContent error creationPolicy = "none" 2010-12-31

    1. Flex4 in full: The page (for example, the head page) to add creationComplete event handling: creationComplete = "init ();" [Bindable] private var fullScreenBtnLabel:String = " Full-screen "; private function init():void{ stage.addEv

  • Rails detail (e) log log 2010-03-21

    Log Rails built-in functions, or more accurately, Rails exposed Logger object, which can be used in all the Rails program. Logger is a transplant from a ruby in the Log of a simple framework (you can ruby's command line type ri Logger to see the stan

  • The first JSP + Servlet + JavaBean + JDBC sample programs 2010-04-20

    Operating Environment: Quote JDK1.5 Tomcat5.5 MyEclips5.5.1 GA SqlServer2000 windows2003 1. SqlServer Query Analyzer under the new table: create table dbuser( userId int identity(1,1) primary key not null, userName varchar(50), userPasswd varchar(50)

  • android camera settings 2010-12-21

    Now almost all mobile phone camera functions to achieve it, and support hardware pixel higher and higher, in real life use and more widely, and specifically in the Android provides a Camera to deal with the camera-related events, Camera is a camera d

  • validator validation plug-in 2011-01-06

    One. Necessary before use Official Website :http://bassistance.de/jquery-plugins/jquery-plugin-validation/ API: http://jquery.bassistance.de/api-browser/plugins.html The current version :1.5.5 Need JQuery version :1.2.6+, Compatible 1.3.2 <script src

  • Linux operating system commands detailed analysis PS 2010-10-10

    Linux operating system commands detailed analysis PS To monitor the process control system, use the ps command to meet you. / Bin / ps ps trip is to show transient state, not dynamic continuous; If you want to run-time monitoring of the process, shou

  • FLEX3 and FLEX4 different namespace, resulting in an error when parsing tags mx 2011-05-29

    I use flex3 development environment, but the code is elsewhere over the flex4 test the code, a change began to feel the prefix can change the label, but later discovered that the namespace should change it. Otherwise there will be parse error at < mx

  • cairngorm2.2.1 and flex4 integration. error error solution 2010-07-07

    See address http://forums.adobe.com/message/2843178 # 2843178: Download cairngorm their source. Then the new flex library project. And change the CairngormError.as class package com.adobe.cairngorm { import mx.resources.IResourceManager; import mx.re

  • flex4 international settings (online error correction) 2011-05-13

    I developed a system to use FLEX, but also the international setting. So flex4 internationalization of research the next. Has been a lot of google pages, or no one is right, our only explored. flex4 international and online, or, as the src directory

  • Flex4 WindowedApplication (Halo and Spark) the difference between 2010-02-21


  • Flex4 changes in the official version of the namespace 2010-03-24

    Compared with the previous FLEX3 in FLEX4 the beta version (including beta2), the new FLEX MXML application split into several namespaces: xmlns: fx = "http://ns.adobe.com/mxml/ 2009 "xmlns: s =" library: / / ns.adobe.com / flex / spark &qu

  • Depth Flex4 - understanding the similarities and differences between Element and Child 2010-09-16

    Original Address: http://www.billdwhite.com/wordpress/?p=296 When I learned the many benefits of my Flex4 those new features, I decided instead to use it. At first, I tried to use the Flex predecessor both in knowledge and experience to quickly enter

  • Flex Error List 2010-03-29

    The following run-time errors may occur. In ActionScript 3.0, both in the strict mode or warning mode, compile, will be run-time type checking. Code Message Description 1000 system memory. The system memory available to compile the code does not meet

  • CWE / SANS released in 2010 the 25 most dangerous programming error 2010-02-26

    http://www.infoq.com/cn/news/2010/02/cwe-sans-top25 CWE / SANS 2010 released the 25 most dangerous programming error, is a most widely spread and cause serious software flaw list of the key programming errors. These errors are usually easy to find an

  • chapter 1: intruduction to flex4 2010-03-31

    1, flex4 introduced many new features. Including the new skin and component architecture, the new special effects engine, a scalable distribution mechanism, a text engine, a new drawing class library. 2, flex4 contains two component architecture. Inc

  • flex4 component s: states 2010-03-31

    1.FLEX4 state overview of the many rich Internet applications, web page to change the appearance of the user's behavior based. The definition of the components of a state on a performance style. To use state, you should first define a default state,

  • On the ora-12505 ORACLE error, and connectivity solutions and related information 2010-03-08

    On the ora-12505 ORACLE error, and connectivity solutions and related information Recently, I use jdbc to connect oracle 9i database, the following error occurred: Error occured while trying to connect to the database Error connecting to database: (u

  • Flex4 Chinese subtitles teaching video (Translation from the Adobe Developer Center) + offline download player 2010-04-07

    Welcome to RIAMeeting Video Download Tool + offline player, this is a development based on AIR technology, designed to help people in the offline state can watch Flex3 / Flex4 teaching video gadgets, through the use of this tool, you can your favorit

  • IT project management in the six error of thinking 2010-04-16

    Error 1: Error demand research phase, resulting in many projects never end! In the software industry, there is no formal show in interface design to the customer before work is in demand all the research stage. In fact, doing the construction industr

  • The integration of MyEclipse and flex4 2010-04-26

    First, download a good software required MyEclipse8.0 official version and flash builder 4 plug-in version (Note: it must be a plug-in version of the oh), keep in mind flex4 version 3.4 or above to support the core, the lowest cost by myeclipse7.5 ab