Max Titov IV @ TechSplice

The most beautiful music of all is the music of what happens.
  • Home
  • About

Archive for the ‘Flex’ Category

You are currently browsing the archives for the Flex category.

15 Jul 2011

MXML: “true && true” error

Stumbled across this strange error while doing some development.  I’ve needed to determine the enable function of a button based on two boolean conditions and as a result created the following bit of code:

<com:Component enabled=”{booleanA && booleanB}”/>

The compiler didn’t like what I’ve put together and threw the following error: The entity name must immediately follow the ‘&’ in the entity reference.

At first I litteraly thought that I’ve forgotten how to code and trivially tried a simple if statement in a <fx:Script> tag – that worked without a problem.  I’ve also tried to see if the or ”||” operator worked within the enabled attribute – which it did. My last thought before searching for a solution online was that the latest version of Adobe Flex had a bug in it.

Some of the solution that I’ve discovered are:

  • use ;&amp instead
  • use (booleanA) ? (booleanB):false
  • use !(!active1 || !active2)
I found the third option to be quite amusing though in general the root cause of the problem is the XML parsing of the MXML code.  Once you understand it should be straight forward.
15 July, 2011 at 14:39 by maxtmax

Tags: coding, Flex, programming
Posted in Flex | Comments Off

16 Jan 2011

Adobe Flex: smooth out the images – scaleContent

When you’re dealing with a situation that requires the use of the following image settings:

width="100%"
height="100%"
scaleContent="true"
maintainAspectRatio="true"

You can find your self in a situation where the loaded content will result in a pixelated bitmap.  Simply add a complete event handler to your image component and update the contents of the event in the following way:

var lv_btmp:Bitmap = ((event.target as Image).content as Bitmap);
if ( lv_btmp != null )
lv_btmp.smoothing = true;

this will smooth out the image that you have loaded.

16 January, 2011 at 23:12 by maxtmax

Tags: adobe, Flex, programming
Posted in Flex | No Comments »

29 Nov 2010

FLEX: BlackBerry SDK basic compilation error [locale]

When I tried creating a new project with the BlackBerry sdk I ran in to the following error:

Description Resource Path Type Location
Unable to resolve resource bundle "collections" for locale "en_US".
Flex Problem Unknown

Although annoying I quickly found a solution:

  • Go to the Project Properties
  • Navigate to Flex Compiler
  • And type in the following line
-library-path+="C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\
blackberry-tablet-sdk-0.9.0\frameworks\locale\en_US"
29 November, 2010 at 21:57 by maxtmax

Tags: configuration, Flex
Posted in Flex | No Comments »

28 Nov 2010

FLEX: convert HTML format to RichText

If you are working with rich text editors you will run in to a situation where you have to format an HTML string to RichText value.

Following code can accomplish this:

gc_ta_bio.textFlow =
TextConverter.importToFlow( "<h1>Your String</h1>,
TextConverter.TEXT_FIELD_HTML_FORMAT )

Where the MXML control will look something like this:

<s:RichEditableText id="gc_ta_bio" />
28 November, 2010 at 21:28 by maxtmax

Tags: actionscript, Flex, programming
Posted in Flex | No Comments »

18 Oct 2010

Flash Cross-Domain policies

A nice introduction to what the cross-domain policy are all about

18 October, 2010 at 16:39 by maxtmax

Tags: cross domain, flash, policy, programming, share
Posted in Flex | No Comments »

11 Mar 2009

AMFPHP + Flex 3 = Error [unable to open 'services-config.xml']

While trying to configure the AMFPHP set up with the Flex 3 framework I ran in to a problem while setting up the services-config.xml.

I’ve created the file in the root directory and specified in the Flex Compiler [Additional compiler arguments] the following string -locale en_US -services “services-config.xml”.

As soon as I clicked OK an error popped up with a message unable to open ‘services-config.xml’.   After trying varying things I was able to figure out that the problem was with the location of the file.  Simply placing the file at the root of the directory wasn’t the right location.  I needed to put the file in the same directory as the main MXML executable – after that the program worked as expected.

11 March, 2009 at 21:06 by maxtmax

Tags: adobe, amf, amfphp, builder, configuration, Flex, php, sdk, setup
Posted in Flex | 4 Comments »

2 Mar 2009

Gumbo effects comming soon

Gumbo: the next release of Adobe Flex SDK interface will has some interesting and useful features.  The idea of developing custom controls [like buttons or menues] which slide in and out based on mouse interaction can be problematic to build.  The logic of incomplete slide ins and slide outs along with the gittery screen can cause the application to look unpolished.

All of this is about to change as you can see in this video describing the new sequence functionality that will be available in the next release.  Have a look at the more complex sequences.

PS: seems that the new release will be hitting the shelf sometime in the second half of 2009.

2 March, 2009 at 22:34 by maxtmax

Tags: adobe, animation, contribution, features, fix, Flex, gumbo, interesting, new, release, sdk, sequence
Posted in Flex | No Comments »

2 Mar 2009

Adobe Flex online tutorials

A great collection of tutorials for anyone who is interested in learning how to work with Adobe Flex. The lessons cover everything from the basics of Flex Builder to more complicated topics like building run time shared libraries. Have a look and learn something new.

2 March, 2009 at 22:12 by maxtmax

Tags: adobe, builder, education, environment, Flex, knowledge, lesson, tutorial, video
Posted in Flex | No Comments »

2 Feb 2009

xCelsius: a half baked solution

Before I begin let me just say that I am a big supporter of what Adobe has done with the Flex application.  As a result I’ve tried to be un-biast and explicit about my opinion.

I have a few concerns regarding a new product xcelsius.  Despite impressive results there are fundamentals shortcommings that will become evident while working with the application.

  • Flexibility
    • The product is designed strictly to follow a particular approach.  This methodology is quite unintuitive and requires the developer to put additional effort when designing the model.  The structure is rigid and sometimes confusing.  Most of the time it feels like you are trying to create a workaround forcing the intuitive solution in to the Xcelsius model.
  • Functionality
    • Overall the product looks like a 1/2 backed solution.  It is an implementation that is driven by the components provided with the standard load [some are not sufficient in terms of what is expected from a developer's point of view].  The platform is designed to rely on Microsoft Excel but lacks capability to take advantage of basic Excel advantages [like Visual Basic enhancements], the solution is restricted to support only a handful of Microsoft Excel functions/formulas.
  • Maintainability & Support [This I believe is a major issue going forward with this solution.]
    • The application has no debugger.
    • Everything is linked to a Excel cells which can have complicated formulas. IE: cell A references cell B that references C which sums cells D through E which in it self point to cell F.
    • During the training we’ve agreed that we would want to call the database to load information directly.  This would eliminate the above mentioned complicated point.  But still – the developer will be left with a BLANK spreadsheet where one would have to guess where and how the cells are referenced. In laymen’s terms: try figuring out where Matrix!$D$21:$O$21 is coming from.

Overall this is just another attempt to market Adobe’s ability to present data, an attempt that failed miserably.

2 February, 2009 at 10:46 by maxtmax

Tags: explanation, flash, issues, mess, problems, quick fix, review, xcelsius
Posted in Flex, Software Engineering | No Comments »

23 Jun 2008

Adobe Flex Builder 3 short dump [JVM terminated. Exit code=1...]

I was using Adobe Flex Builder 3 [AF3] for a few weeks now. I like what has been done with the application, the new functionality is very useful and there is a ton of new options that can be configured while designing your applications.

Unforchunately similarly to it’s predecessor there are major bugs in AF3. A week ago for no apparent reason the application stopped working. Every time ran the application it threw a short dump before initializing the EDI.

Adobe Flex Builder 3 short dump.

I’ve tried reinstalling the application and even removed the old versions of JRE references. Nothing helped and just as before I had to rely to googling and looking at configuration files.

The problem lied in the small FlexBuilder.ini file located in the root installation directory. The contents of the file included the following settings:

-vmargs
-Xms128m
-Xmx512m
-XX:MaxPermSize=256m
-XX:PermSize=64m
-Djava.net.preferIPv4Stack=true

I’ve modified the contents to exclude the last lines and vuala, the application went back to it’s usual state [sure I lost all my projects but its nice to have a working EDI once again].

23 June, 2008 at 9:18 by maxtmax

Tags: builder, development, error, fix, Flex, problem, short dump, solution, workaround
Posted in Flex | 5 Comments »

« Older Entries
  • Subscribe using FeedBurner
  • Cloud Data

    abap adobe animation basic beautiful builder camera code configuration contribution design development digital engineering fix flash Flex function images interesting lesson new paypal Photography php problem problems program programmer programming review sap SAP/ABAP sdk setup soap software solution story system tables transaction transports user video

    WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.

  • My Links

    • Cooking
    • Gallery
    • Resume
  • Online Tools

    • Airline Ticket Search
    • Estimate Shipping Cost [from US]
    • Link your Blog
  • Software Engineering Blogs

    • Adam Goucher
    • Joel on Software
    • The Third Bit
    • Wide Awake Developers
  • Categories

    • Everyday stuff
    • Flex
    • Photography
    • SAP/ABAP
    • Short Stories
    • Software Engineering
    • Web Development
  • Gallery

    Roy Tanck's Flickr Widget requires Flash Player 9 or better.

Max Titov IV @ TechSplice is proudly powered by WordPress
Design & code by Jonk
Entries (RSS) and Comments (RSS).