Quantcast
Channel: Adobe Community : Popular Discussions - Flex (Read Only)
Viewing all 46188 articles
Browse latest View live

Access inline RadioButton within itemRenderer in a DataGrid

$
0
0

I have a RadioButton column in a DataGrid. I added the RadioButtons in this way:

 

<mx:DataGrid id="dg" x="0" y="25" width="510" height="260" selectedIndex="0" dataProvider="{department.prof}" showHeaders="false" itemClick="handleClick(event);" >
      <mx:columns>
          <mx:DataGridColumn headerText="Selection" dataField="selection" width="75" >
               <mx:itemRenderer>
                      <mx:Component>
                             <mx:VBox>
                                 <mx:RadioButton id="rb" />
                             </mx:VBox>
                      </mx:Component >
               </mx:itemRenderer>
          </mx:DataGridColumn>

 

          //Other <mx:DataGridColumn> go here. Their inline components' contents are provided with the dataProvider="{department.prof}"

     </mx:columns>

</mx:DataGrid>

 

I want the RadioButton in the clicked row is selected and others are unselected using the handleClick(event) function:

 

private function handleClick(event:ListEvent):void {

        var s:Object = event.itemRenderer.data['name']; // dataProvider is a mx:Model in XML form and there is a <name> sub element under <prof>
        Alert.show(event.rowIndex + " clicked "+s['last']); // I can access the String content in <last>
       
        // How do I access all the RadioButton in the DataGrid? I do not have a key

        // (event.itemRenderer.data['Selection'] as RadioButton).selected = true; this is NOT working as 'Selection' is just a Column title, not a key.
        // the RadioButton id 'rb' is also NOT working: rb[event.rowIndex].selected = true;
    }

 

<?xml version="1.0"?>
<department>
  <prof>
    <name>
      <first>Mike</first>
      <last>Smith</last>
    </name>

   </prof>

    .....

</department>

 

I also tried a RadioButtonGroup for all the RadioButton's in different rows, but it does not work.

Thanks for any suggestions...


Another Compiler Bug (message: An internal build error has occurred... Unknown Flex Problem)

$
0
0

I was fighting with this problem for a few days. Finally I've got it resolved. I want to describe it and fill in BUG in the bug report, but I am not sure about Adobe support options. So, I am putting bug report here.

 

1. ASSUMPTION: All problems which compiler reports as unknown problem are the real compiler BUGs/Problems. Eventually MXML compiler/ActionScript compiler should be able to take C++ or FORTRAN code or an aribitrary text and nicely tell "Error: It is not ActionScript (Flex) code" or "the code is corrupted from Line so and so...". When compiler crashed, it is most probably due to one of the states not handled (or not handled correct). Keeping this in mind I assume, that my code has nothing to do with the compiler crash.

 

2. PROBLEM Description.

 

     - I tried to port our internal project from Flex3.5/Flex Builder 3 to Flex4.1/Flash Builder 4.

     - After checking out and trying to build code I start getting weird problems like Error 1037: Packages cannot be nested.

     - After cleaning and compiling project by project, walking up dependency tree, I was able to get rid of this problem.

     - On last Project I've got another problem (An internal build error has occurred... Unknown Flex Problem). Which I stuck with for a while.

     - When I checked log file I found following messages:

 

============================================================

 

!ENTRY com.adobe.flexbuilder.project 4 43 2010-12-21 15:45:24.353
!MESSAGE Uncaught exception in compiler
!STACK 0
java.lang.ClassCastException: macromedia.asc.parser.InputBuffer cannot be cast to flex2.compiler.as3.CodeFragmentsInputBuffer
at flex2.compiler.as3.AbstractSyntaxTreeUtil.lineNumberToPosition(AbstractSyntaxTreeUtil.jav a:1266)
at flex2.compiler.mxml.ImplementationGenerator.generateBinding(ImplementationGenerator.java: 569)
at flex2.compiler.mxml.ImplementationGenerator.generateBindingsSetupFunction(ImplementationG enerator.java:863)
at flex2.compiler.mxml.ImplementationGenerator.generateBindingsSetup(ImplementationGenerator .java:812)
at flex2.compiler.mxml.ImplementationGenerator.generateInitializerSupportDefs(Implementation Generator.java:1878)
at flex2.compiler.mxml.ImplementationGenerator.generateClassDefinition(ImplementationGenerat or.java:1044)
at flex2.compiler.mxml.ImplementationGenerator.<init>(ImplementationGenerator.java:206)
at flex2.compiler.mxml.ImplementationCompiler.generateImplementationAST(ImplementationCompil er.java:499)
at flex2.compiler.mxml.ImplementationCompiler.parse1(ImplementationCompiler.java:197)
at flex2.compiler.mxml.MxmlCompiler.parse1(MxmlCompiler.java:168)
at flex2.compiler.CompilerAPI.parse1(CompilerAPI.java:2871)
at flex2.compiler.CompilerAPI.parse1(CompilerAPI.java:2824)
at flex2.compiler.CompilerAPI.batch2(CompilerAPI.java:446)
at flex2.compiler.CompilerAPI.batch(CompilerAPI.java:1274)
at flex2.compiler.CompilerAPI.compile(CompilerAPI.java:1496)
at flex2.tools.oem.Application.compile(Application.java:1188)
at flex2.tools.oem.Application.recompile(Application.java:1133)
at flex2.tools.oem.Application.compile(Application.java:819)
at flex2.tools.flexbuilder.BuilderApplication.compile(BuilderApplication.java:344)
at com.adobe.flexbuilder.multisdk.compiler.internal.ASApplicationBuilder$MyBuilder.mybuild(A SApplicationBuilder.java:276)
at com.adobe.flexbuilder.multisdk.compiler.internal.ASApplicationBuilder.build(ASApplication Builder.java:127)
at com.adobe.flexbuilder.multisdk.compiler.internal.ASBuilder.build(ASBuilder.java:190)
at com.adobe.flexbuilder.multisdk.compiler.internal.ASItemBuilder.build(ASItemBuilder.java:7 4)
at com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.buildItem(FlexProjectB uilder.java:480)
at com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.build(FlexProjectBuild er.java:306)
at com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuilder.build(FlexIncremen talBuilder.java:157)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:633)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:218)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:360)
at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:516)
at org.eclipse.core.internal.resources.Project.build(Project.java:94)
at org.eclipse.ui.actions.BuildAction.invokeOperation(BuildAction.java:221)
at org.eclipse.ui.actions.WorkspaceAction.execute(WorkspaceAction.java:162)
at org.eclipse.ui.actions.WorkspaceAction$2.runInWorkspace(WorkspaceAction.java:483)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38 )
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
!SESSION 2010-12-22 09:48:27.766 -----------------------------------------------
eclipse.buildId=M20100909-0800
java.version=1.6.0_16
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -data C:\Client_Flex4 -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product

 

================================================

 

3. RESOLUTION/WORK AROUND

 

     - I was able to get this problem cleared by putting compiler option for Flex Application projects:  -keep-generated-actionscript

 

4. SIDE NOTE

 

  I do not really see putting this compiler option as the solution and living with the mistery is making me fill a bit bad.

 

 

 

Localization and FlexMojos

$
0
0

Hi Guys!

 

I have a problem with localization and FlashBuilder... my project
compiles and works fine....

 

But, if  open in the FlashBuilder some problems appear...

 


Messages in Problems view:

 

Unable to resolve resource bundle "components" for locale "en_US".
Unable to resolve resource bundle "components" for locale "en_US".
Unable to resolve resource bundle "controls" for locale "en_US".
Unable to resolve resource bundle "core" for locale "en_US".
Unable to resolve resource bundle "core" for locale "en_US".
Unable to resolve resource bundle "core" for locale "en_US".
Unable to resolve resource bundle "effects" for locale "en_US".
Unable to resolve resource bundle "layout" for locale "en_US".
Unable to resolve resource bundle "skins" for locale "en_US".
Unable to resolve resource bundle "styles" for locale "en_US".
Unable to resolve resource bundle "textLayout" for locale "en_US".

 


I know, this locales is in
framework(framework-4.1.0.16076-en_US.rb.swc) and
spark(spark-4.1.0.16076-en_US.rb.swc)...

 

Tried put this dependencies in my pom.xml and run the command:

 

mvn clean eclipse:clean flexmojos:flashbuilder

 

But not work..... Can you help-me?

 

Thanks!

 

My pom.xml in this time is:

 

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
       <modelVersion>4.0.0</modelVersion>

 

       <parent>
               <groupId>br.com.envisia.plataforma</groupId>
               <artifactId>Envisia2</artifactId>
               <version>1.0.0-SNAPSHOT</version>
       </parent>

 

       <groupId>br.com.envisia.plataforma</groupId>
       <artifactId>EnvisiaWeb</artifactId>
       <version>1.0.0-SNAPSHOT</version>
       <packaging>swf</packaging>

 

       <name>Envisia Web Application</name>

 

       <build>
               <sourceDirectory>src/main/flex</sourceDirectory>
               <testSourceDirectory>src/test/flex</testSourceDirectory>
               <plugins>
                       <plugin>
                               <groupId>org.sonatype.flexmojos</groupId>
                               <artifactId>flexmojos-maven-plugin</artifactId>
                               <version>${flexmojos.version}</version>
                               <extensions>true</extensions>
                               <dependencies>
                                       <dependency>
                                               <groupId>com.adobe.flex</groupId>
                                               <artifactId>compiler</artifactId>
                                               <version>${flexframework.version}</version>
                                               <type>pom</type>
                                       </dependency>
                               </dependencies>
                               <configuration>
                                       <sourceFile>br/com/envisia/plataforma/view/Main.mxml</sourceFile>
                                       <debug>true</debug>
                                       <contextRoot>Envisia2</contextRoot>
                   <runtimeLocales>
                       <locale>en_US</locale>
                   </runtimeLocales>
                   <locales>
                       <locale>en_US</locale>
                   </locales>
                   <mergeResourceBundle>false</mergeResourceBundle>
                               <themes>
                                  <theme>${project.build.directory}/themes/spark-theme.css</theme>
                                  <theme>${project.build.directory}/themes/halo-theme.swc</theme>
                               </themes>
                               </configuration>
                       </plugin>

 

                       <plugin>
                               <groupId>org.sonatype.flexmojos</groupId>
                               <artifactId>flexmojos-maven-plugin</artifactId>
                               <version>${flexmojos.version}</version>
                               <executions>
                                       <execution>
                                               <goals>
                                                       <goal>wrapper</goal>
                                               </goals>
                                       </execution>
                               </executions>
                                 <configuration>
                                       <outputDirectory>${project.build.directory}/EnvisiaWeb</outputDirectory>
                                   <parameters>
                                     <title>Envisia</title>
                                     <width>100%</width>
                                     <height>100%</height>
                                   </parameters>
                                   <htmlName>index</htmlName>
                                 </configuration>
                       </plugin>

 


                       <plugin>
                          <artifactId>maven-dependency-plugin</artifactId>
                             <executions>
                                <execution>
                                   <id>copy-themes-for-flex4</id>
                                   <phase>generate-resources</phase>
                                   <goals>
                                      <goal>copy-dependencies</goal>
                                   </goals>
                                   <configuration>
                                      <includeTypes>swc,css</includeTypes>
                                      <outputDirectory>target/themes</outputDirectory>
                                      <overWriteIfNewer>true</overWriteIfNewer>
                                      <includeGroupIds>com.adobe.flex.framework</includeGroupIds>
                                      <includeArtifactIds>halo,spark</includeArtifactIds>
                                      <includeClassifiers>theme</includeClassifiers>
                                      <stripVersion>true</stripVersion>
                                   </configuration>
                              </execution>
                           </executions>
                       </plugin>

 

               </plugins>
       </build>

 

       <dependencies>

 

               <dependency>
                       <groupId>com.adobe.flex.framework</groupId>
                       <artifactId>flex-framework</artifactId>
                       <version>${flexframework.version}</version>
                       <type>pom</type>
               </dependency>

 

               <dependency>
                       <groupId>org.swizframework</groupId>
                       <artifactId>swiz</artifactId>
                       <version>1.0.0</version>
                       <type>swc</type>
               </dependency>

 

               <!-- Themes -->
               <dependency>
                  <groupId>com.adobe.flex.framework</groupId>
                  <artifactId>halo</artifactId>
                  <version>${flexframework.version}</version>
                  <classifier>theme</classifier>
                  <type>swc</type>
                  <scope>theme</scope>
               </dependency>

 

               <dependency>
                  <groupId>com.adobe.flex.framework</groupId>
                  <artifactId>spark</artifactId>
                  <version>${flexframework.version}</version>
                  <classifier>theme</classifier>
                  <type>css</type>
                  <scope>theme</scope>
               </dependency>

 

               <!--  Tests -->
               <dependency>
                       <groupId>com.adobe.flexunit</groupId>
                       <artifactId>flexunit</artifactId>
                       <version>0.85</version>
                       <type>swc</type>
                       <scope>test</scope>
               </dependency>

 

       </dependencies>

 

</project>

clear text box data when state is changed back in viewstack

$
0
0

Hi,

 

     I am working with viewstack and i have two states in that one is login page and one is registration page, when i am in login page after entering username and password in respective textboxes and i clicked on register button it will navigate me to registration page and in registration page i have cancel button on clicking of this it will again navigate to login page here the problem is when i am coming back to login page from registration page i am able to see the username and password in textboxes of login page. but i want to clear the data when i change the state.

 

please provide me the solutions....

 

Thanks in Advance..

 

 

Regards

Ram

RTMP Keep-Alive Messages

$
0
0

We are creating a product involving a Flex/Flash Client intregrated with FluorineFx at the server side.  Our goal is to use RTMPT signaling to ensure compatibility with customer sites firewall settings.

 

We have noticed a difference in the number of TCP keep-alive signals when configured to use RTMP (port 1935) compared to RTMPT (HTTP tunneled).   For the RTMP signaling we see keep-alive messages occurring at a rate of 1 every 10 seconds.   For the RTMPT configuration we are seeing several keep-alive messages per second.

 

Reducing the number of RTMPT keep-alive signals will 1) help reduce the CPU utilization by the web server and 2) reduce negative interactions by ISA Web proxies that may limit the number of HTTP transactions.

 


Any suggestions on how to reduce the frequency of keep-alives from the client would be most appreciated.

How to access fl.motion.AdjustColor class

$
0
0

I'm using FlashDevelop with the Flex 3.5 SDK, and it's not able to find the fl.motion package.

 

The Adobe docs indicate this package is available with Flex 4.1 and earlier:

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fl/motion/AdjustColor.h tml

 

Does this mean the Flex SDK should also have it?  (I have also tried it in Flex Builder, and that can't find it either)

 

If I can't access it via the Flex SDK, does anyone know an alternative to do the same thing?  I know about ColorMatrixFilter, but I also want to change contrast and saturation, which it doesn't allow.

VerifyError: Error #1014: Class mx.modules::ModuleBase could not be found.

$
0
0

Hi all,

         Am trying to load the remote CSS.swf file at runtime in the AIR application using loadstyledeclaration and URLLoader. am not able to load. getting the following error. Please help me in this.

 

VerifyError: Error #1014: Class mx.modules::ModuleBase could not be found.

 

    at flash.display::MovieClip/nextFrame()
    at mx.core::FlexModuleFactory/deferredNextFrame()[E:\dev\4.x\frameworks\projects\framework\s rc\mx\core\FlexModuleFactory.as:631]
    at mx.core::FlexModuleFactory/update()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\ FlexModuleFactory.as:401]
    at mx.core::FlexModuleFactory/moduleCompleteHandler()[E:\dev\4.x\frameworks\projects\framewo rk\src\mx\core\FlexModuleFactory.as:718]

 

 

 

 

 

 

 

Thanks

J Kishore

catch close event of main window (air)

$
0
0

Hi flex community,

 

My question is how can I handle it that if the user closes the application (in my case a windowed application: air) that a alert message asks the user if he really want to leave the application.

 

I would be happy for every useful answer.

 

Greetings

flexx0r


How To Embed and Display an SWF in a Flex App.

$
0
0

Hello all,

 

I'm trying to embed an swf animation into a flex 4.5 application and display it, but it isn't working!

I am getting error after error.  When I try to use addElement(), I get the following error:

 

1067: Implicit coercion of a value of type mx.core:MovieClipLoaderAsset to an unrelated type mx.core:IVisualElement.

 

If I use addChild(), then it throws another error at runtime.

 

Here is my code:

[Embed(source="assets/con_mov.swf")]
private var connectMov:Class;
private var conMov:MovieClipLoaderAsset = new connectMov();

 

Here is the code I'm trying to use to displey it:

borderContainer.addElement(conMov);

 

I've tried just adding it to the application using this.addChild(connectMov), but I get an error at runtime.  This is ridiculous!  Bringing an swf generated in Flash into Flex and displaying it shouldn't require this much effort - IMHO.  There is plenty of documentation on how to embed an swf into Flex, but almost nothing on how to display it!

 

It's just a simple placeholder animation and I don't need to access any functions inside of it, so I want to embed it rather than use swfLoader.

 

Thanks for any help or advice you can give!

 

Matt

Install Flex SDK on MAC OS

$
0
0

Hi Folks,

          I have downloaded Flex SDK (for all platforms), but on SDK's bin folder contains only exe files. Is it is a correct version or is there any seperate version available for mac machine? Kindly let me know please.

 

Thanks,

 

With Regards,

 

Arun P. Ganesh

Why am I getting-"The ExternalInterface is not available in this container" in Flex Mobile Project

$
0
0

I am using StageWebView to show an HTML page. I want to call a function in my flex mobile project to be called from a JS function. Using ExternalInterface, I have 

 

 

   in Flex - 

    ExternalInterface.addCallback("myFunction",myFunc);

  

   in JS -

 

 

        function thisMovie(movieName) {

           if (navigator.appName.indexOf("Microsoft") != -1) {

             return window[movieName];

           } else {

             return document[movieName];

          }

        }

      

       function showAlert()

       {

              alert("Going to call AS function");

            thisMovie("ShowLocalHTML").myFunction("Hello");

              return false;

       }

 

 

I am getting "Error: Error #2067: The ExternalInterface is not available in this container. ExternalInterface requires Internet Explorer ActiveX, Firefox, Mozilla 1.7.5 and greater, or other browsers that support NPRuntime." when trying to run the application.

 

 

And my project targets Android platform. And  I have Mozilla, Chrome installed on my desktop - although I am not user if that is relevant to the problem.

 

 

Please help in resolving this issue.

How to draw rectangle with tail

$
0
0

Hi,

          I need to draw rectangle with tail at the bottom left in flex4.5. I have to add content inside the rectangle. Help me.

 

 

Regards,

Jayagopal.

Air QR code generator/reader

$
0
0

Anyone have any current recommendations for Air QR code generator and reader (ANE, lib)?

 

I need a solution that will:

1) Generate a text/string QR code in Air desktop

2) Generate a text/string QR code in Air cross-platform mobile app (android or iOS).  Same code base as #1.

3) Scan the QR code on cross-platform mobile device (android, iOS) from within my Air app.

 

I see a lot of search results for various ways, but so far nothing cross-platform.

 

Thanks!

Don

Process Actionscript on the Server

$
0
0

Is that possible? Any examples?

 

Thanks

How to re-open tree nodes after a refresh to AdvancedDataGrid's GroupingCollection?

$
0
0
Hello,
I have an AdvancedDataGrid, which has as it's dataProvider a GroupingCollection. The GroupingCollection's source is bound to an ArrayCollection. Items in the ArrayCollection can be edited.
After a change to the ArrayCollection, I refresh() the GroupingCollection so it displays properly. Unfortunately, this collapses the tree of the AdvancedDataGrid, that is, the previously open nodes are no longer open. I would like to re-open the nodes after a refresh.

In the code provided, I have attempted to save the nodes which were open before the refresh, perform the refresh, then re-expand the nodes with AdvancedDataGrid.expandItem(). But it didn't work, and I am stumped.

Any ideas on how to expand nodes in the AdvancedDataGrid?
or
Any ideas on how to allow the user to modify a data item, including fields used as GroupingFields, in an AdvancedDataGrid?



integrating apache velocity and adobe flex

$
0
0
Hi,
I am doing a project in flex and which needs designing of some templates based on the user requirements and i would like to use apache velocity(http://velocity.apache.org/engine/releases/velocity-1.5/) tool for template designing, but i want to know how far it is possible to implement apache velocity template inside flex, i would like to use apache velocity template to integrate with the flex in client side. if it is not possible is there any other template designing tools which helps to integrate with flex

Regards
Kumar E

Problem with Flex DateField.

$
0
0

Hi,

 


I am trying to convert a date string to Date object using DateField class. My date string is "14-Jun-2009", and the statement is,

 

dt:Date  =  DateField.stringToDate("06-Jun-2009", "DD-MMM-YYYY");

 

This returns a null date object.

 

Whereas if i am using the date string "14-06-2009" and format string as "DD-MM-YYYY" it works fine.

 

Any help will be appriciated.

 

Cheers,

Raghu.

Display Hindi Font Problem (Localization)

$
0
0

Hello Friends,

 

I have sucessfully implemented the localization in Flex 3. But the problem is only English, France languages are displayed well but Hindi Fonts are getting displayed as boxes.

 

Can any one help me to come out of this issue? I had searched on google also but yet not able to find the problem.

 

Waiting for quick response.

Flex 4 -> Datagrid add checkbox to a column

$
0
0

Hello all.

 

I am trying to add a checkbox to a datagrid column, so that i can use it to delete a record from the array.  My datagrid is as follows

    <mx:DataGrid x="10" y="40" width="903" dataProvider="{questionsArr}" sortableColumns="false" draggableColumns="false" editable="true">
        <mx:columns>
            <mx:DataGridColumn headerText="No." dataField="Number" width="100" editable="false"/>
            <mx:DataGridColumn headerText="Question" dataField="Question" />
            <mx:DataGridColumn headerText="Delete"  width="100" />
        </mx:columns>
    </mx:DataGrid>

The user inputs questions into the array via a textinput box.

 

But what i want to do is add a checkbox to the "Delete" column.  If anyone could help me with this that would be great !

Mobile Device Unique id

$
0
0

Hey all,

 

I am starting down the path of creating a mobile application and I have a need for a deviceid (something unique to the particular mobile device.) so that I can register the application for use with Multi-Factored Authentication.  Is there an API somewhere in the Flex Framework or the upcoming mobile release where I can access a unique id for the device the app is running on?

Viewing all 46188 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>