Help, Flex, Flashbuilder
I need help making what i thought was going to be an easy form type application in Flex. I need Drop Down List A to display a 2 pictures, populate a text field and select a specific option in Drop Down List B. Drop Down List B is also tied to one of the pictures so when you change Drop Down List B the picture will change.
For example Drop Down List A is a type of car, when you select your car it displays a picture of the car and a logo of the car and it chooses a car tire in Drop Down List B. As you change Drop Down List B it changes the picture of the car to correspond to the specific tire you chose and will also change Drop Down List C based on the car you chose and the tire you chose.
Here is what i have so far:
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
actionBarVisible="false" creationComplete="srv.send()" tabBarVisible="true" title="Home"
splashScreenImage="@Embed('assets/splash.png')">
<s:states>
<s:State name="State1"/>
<s:State name="State2"/>
</s:states>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
<s:HTTPService id="srv" url="assets/cars.xml"/>
<s:SplashScreenImage>
<s:SplashScreenImageSource
source="@Embed('/assets/splash.jpg')"/>
</s:SplashScreenImage>
<!--
<s:SplashScreenImage>
<s:SplashScreenImageSource
source="@Embed('assets/splash.png')"
dpi="240"
aspectRatio="landscape"/>
</s:SplashScreenImage>
Define one or more SplashScreenImageSource.
<s:SplashScreenImageSource
source="@Embed('assets/logoDefault.jpg')"/>
-->
<s:ContentCache id="imgcache" enableCaching="true" enableQueueing="true"
maxActiveRequests="1" maxCacheEntries="10"/>
<s:ArrayCollection id="arrColl">
<s:source>
<fx:Array id="arr">
</fx:Array>
</s:source>
</s:ArrayCollection>
</fx:Declarations>
<fx:Script>
<![CDATA[
import spark.events.IndexChangeEvent;
protected function dropDownList_changeHandler(evt:IndexChangeEvent):void {
crop.text = "1.2x" + car.selectedItem;
]]>
</fx:Script>
<s:SplitViewNavigator left="0" right="0" top="0" bottom="0" color="#212121">
</s:SplitViewNavigator>
<s:BitmapImage includeIn="State1" height="100%" source="assets/state1.jpg" width="100%"/>
<s:BitmapImage includeIn="State2" height="100%" source="assets/state2.jpg" width="100%"/>
<s:Image left="0" right="0" top="0" bottom="0" source="assets/state1.jpg"
source.State2="assets/state2.jpg"/>
<s:HGroup y="54" left="15" right="298" height="32"
y.State2="54" left.State2="15" right.State2="127">
<s:DropDownList id="car" width="187" height="20"
change="dropDownList_changeHandler(event);" dataProvider="{srv.lastResult.list.car}"
prompt="Select a car"
width.State1="190" blendMode.State1="overlay" color.State1="#FFFFFF"
contentBackgroundColor.State1="#464545" enabled.State1="true"
width.State2="190" blendMode.State2="overlay" borderVisible.State2="false">
<s:itemRenderer>
<fx:Component>
<s:IconItemRenderer
label="{data.carSensor} {data.cropFactor}"
messageField="sensorSize"/>
</fx:Component>
</s:itemRenderer>
</s:DropDownList>
<s:TextArea id="crop" width="64" height="22" editable="false"
width.State1="60" autoCorrect.State1="false" blendMode.State1="overlay"
borderVisible.State1="false" editable.State1="false" enabled.State1="true"
fontFamily.State1="_sans" fontSize.State1="20" fontWeight.State1="bold"
paddingBottom.State1="0" paddingLeft.State1="0" paddingRight.State1="0"
paddingTop.State1="0" selectable.State1="false" textAlign.State1="center"
width.State2="60" blendMode.State2="overlay" borderVisible.State2="false"
editable.State2="false" enabled.State2="true" fontFamily.State2="_sans"
fontSize.State2="20" fontWeight.State2="bold" paddingBottom.State2="0"
paddingLeft.State2="0" paddingRight.State2="0" paddingTop.State2="0"
selectable.State2="false" textAlign.State2="center"/>
<s:DropDownList id="tire" x="10" y="52" width="62" height="20" dataProvider="{srv.lastResult.list.tire}"
prompt="tire"
width.State1="64" blendMode.State1="overlay"
width.State2="64" blendMode.State2="overlay">
<s:itemRenderer>
<fx:Component>
<s:IconItemRenderer
label="{data.cartire}"
messageField="cartire"/>
</fx:Component>
</s:itemRenderer>
</s:DropDownList>
<s:HGroup y="54" left="364" right="172" width="13" height="32">
</s:HGroup>
<s:DropDownList id="desired" width="61" height="20" dataProvider="{srv.lastResult.list.desired}"
width.State1="60" blendMode.State1="overlay"
width.State2="60" blendMode.State2="overlay">
<s:itemRenderer>
<fx:Component>
<s:IconItemRenderer
label="{data.carSensor} {data.cropFactor}"
messageField="desired"/>
</fx:Component>
</s:itemRenderer>
</s:DropDownList>
<s:HGroup y="54" left="365" right="80" width="14" height="32">
</s:HGroup>
<s:DropDownList id="actual" width="61" height="20" dataProvider="{srv.lastResult.list.actual}"
blendMode.State1="overlay"
blendMode.State2="overlay">
<s:itemRenderer>
<fx:Component>
<s:IconItemRenderer
label="{data.carSensor} {data.cropFactor}"
messageField="actual"/>
</fx:Component>
</s:itemRenderer>
</s:DropDownList>
</s:HGroup>
<s:HGroup includeIn="State2" y="127" left="206" right="175" height="32">
<s:DropDownList id="cam2" width="192" height="20" blendMode="overlay" dataProvider="{srv.lastResult.list.cars2}">
<s:itemRenderer>
<fx:Component>
<s:IconItemRenderer
label="{data.carSensor} {data.cropFactor}"
messageField="cars2"/>
</fx:Component>
</s:itemRenderer>
</s:DropDownList>
<s:TextInput id="crop2" width="61" height="22" blendMode="overlay" borderVisible="false"
editable="false" enabled="true" fontFamily="_sans" fontSize="20"
fontWeight="bold" paddingBottom="0" paddingLeft="0" paddingRight="0"
paddingTop="0" selectable="false" textAlign="center"/>
</s:HGroup>
<s:Button id="ShowState2" includeIn="State1" x="1" y="111" width="151" height="55" alpha="0"
click="currentState='State2'" icon="assets/off.jpg"/>
<s:Button id="ShowState1" includeIn="State2" x="2" y="112" width="147" height="53" alpha="0"
click="currentState='State1'" enabled="true" icon="assets/on.jpg"/>
<s:Image id="imaga" x="13" y="163" width="304" height="206" source="assets/singapore.jpg"
fillMode.State1="scale" scaleMode.State1="zoom"
fillMode.State2="scale" scaleMode.State2="zoom"/>
<s:Image id="imagb" x="324" y="163" width="304" height="206" source="assets/singapore.jpg"
fillMode.State1="scale" scaleMode.State1="zoom"
fillMode.State2="scale" scaleMode.State2="zoom"/>
<s:Image id="imagc" x="524" y="11" width="103" height="64" source="{data.image}" fillMode.State1="scale" scaleMode.State1="zoom" x.State2="524" y.State2="11" fillMode.State2="scale" scaleMode.State2="zoom"/>
<s:Image id="imagd" includeIn="State2" x="524" y="84" width="103" height="64" fillMode="scale"
scaleMode="zoom" source="assets/singapore.jpg"/>
<!--
<s:List id="list" top="0" bottom="0" left="0" right="0"
dataProvider="{srv.lastResult.list.car}">
<s:itemRenderer>
<fx:Component>
<s:IconItemRenderer
label="{data.carSensor} {data.cropFactor}"
messageField="sensorSize"/>
</fx:Component>
</s:itemRenderer>
</s:List>
-->
</s:View>
Hello Friends,
I am still waiting for the solution.
Guys was it really tough !! is it possible 1st of all ie what i am looking !!
I will make you understand in simple terms like, In a single line chart i want to display 2 different shapes ie BoxItemRenderer & CandlestickItemRenderer based on a condition. Line chart functionality will be the same but i want to show the shapes in a different color for differentiation. i have already shared the code also.
pls help me out.
Rajesh
Similar Messages
-
AmfPHP + mysql db(online) + flex/flashbuilder
Hi.
I am coming over from flash and doing tuts on flex (using flashbuilder)
I want to connect a mysql database (online) with my flex/flashbuilder app using amfPHP as the preferred technology.
I have to code for the flex app and I was wondering if anybody would be kind enough to help me with the amfPHP classes that I have to use. I KNOW there are tuts online but there are SO MANY that I don't know which one is correct.
ie: I need:
1. The database password etc... in a separate file then I would include it in the other classes
2. The simple class to send back the dataset form the mysql database to the datagrid
3. Session perhaps (as I am creating a learning management system for children to learn English)
I am not looking to be spoon fed but I am a newbie - if you could point me to the best code via links etc...
Am I right in thinking that this is a HELL of a lot better than using my current design with flash(URLVariables) + with a php script etc...
especially if I have over a 100 - 1000 concurrent users which we will have by September.
CHEERSI just discovered this developer's github page yesterday and perhaps his air_amf_sync project may be beneficial to you.
https://github.com/dima/air_amf_sync
Let us know on your outcome. -
Help- Flex Start Page doesn't open the Start Page
Help -> Flex Start Page doesn't open the Start Page.
I see multiple bug entries regarding this resolved, but no description of what I can do to fix it.
I'm running Flex Builder Professional on Windows XPI've heard this can be caused in IE when the pop-up blocker is enabled. Disable it so pop-ups are allowed, and the Flex Start Page may load.
If this post answers your question or helps, please mark it as such. -
Flex/Flashbuilder build AIR, is Adobe suffering from product development myopia?
Hi,
Im really new to using Flex/Flashbuilder to build SWFs. Im actually using Flex3 (3.2) instead of FlashBuilder, but both seem to have to same approach when it comes to creating AIR)
Im trying to get a hold of Adobe's idea of creating AIR apps with Flex/FlashBuilder. From what I make out the way to go is create a Flex project and set it to publish for the desktop. Actionscript projects dont have this option (though I know how to fake it by changing .mxml to .as)
But as Im new to Flex, Im trying to get a hold on the concept of Flex/FlashBuilder. I just cant imagine that developer tools like these encourages developers to use MXML instead of actionscript when you want to develop an AIR app. Especially because the compilers seems to parse MXML code into actionscript class instances. From what I make out sofar this is a ridiculous sidestep and forces developers to learn MXML while the actual language is Actionscript 3.0. Also all the necessary libraries could just as easily be compiled into an Actionscript project, right?
The weird thing is that FlashBuilder seems to have to exact same setup as Flex 3. So, I guess Adobe didnt think that workflow was a Flex 3 flaw. So either Im missing something completely obvious or Adobe suffering from product development myopia.
What's the idea here? Can someone explain, please?We just had the same issue whe trying to upgrade our AIR app from requiring 3.3 to 3.4 by changing the application descriptor. We see the same message "Cannot complete installation because runtime updates are disabled on this machine" in our logs, but nothing was really ever done to disable updates on that particular machine. Checking on different computers now, but if this is a widespread problem then it would disastrous as our user would be unable to use the app. Any idea what is causing this?
This thread is the only(!) Google result for "Cannot complete installation because runtime updates are disabled on this machine". -
Why when I highlight a term in FlashBuilder and select F1, the help window opens and returns nothing (see below). Clicking on those links does not do anything. This is contrary to how the help worked in Flex 3 - returning relevant links to Flex help documentation.
Hi RAJESHWAR
My requirement is more from system user perspective. Lets say an end-user is new to CRM environment/application. He/she has to enter value in a particular field in UI, but doesnot know what that field represents. Then how he/she will come to know about it?
In GUI through F1 help, I can get this information.
Thanx & Regards
Hits -
Hello, dear all
Please help me!
Flex record webcam problem, how to setting Brightness,Contrast,Saturation and Sharpness?
nsOutGoing=new NetStream(nc);
nsOutGoing.attachCamera(m_camera);
nsOutGoing.publish(filename, "record");
I want to control the Brightness,Contrast,Saturation and Sharpness for the recorded flv file.
At present, I only can control the videodisplay object, but I can not able to control Camera.
Thanks very much!!
kimi
MSN: [email protected]Can I change a Video object to to Camera object, If yes, How do??
nsOutGoing.attachCamera(video as Camera);// it does not work rightly
thanks -
Help: Flex can't parse web service fault message correctly
When I use class WebService to issue requests but the
server-side returns error, it is assumed the instance of FaultEvent
class in fault-event-handler contains error information. However
when inspecting member variables of the object I can only found
some very general error information which can't be mapped to the
original error on server side.
E.g.
The server side returns a SOAP document to Flex like:
<env:Envelope xmlns:env="
http://schemas.xmlsoap.org/soap/envelope/">
<env:Header />
<env:Body>
<env:Fault>
<faultcode>env:Client</faultcode>
<faultstring>com.sap.sbs.silo.bean.interfaces.ServiceException:
[SESSION] : No session can serve the request, pls check if the
session is expired!</faultstring>
<detail>
<ns1:ServiceException xmlns:ns1="
http://service.bean.silo.sbs.sap.com"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<reason>-1</reason>
<message>[SESSION] : No session can serve the request,
pls check if the session is expired!</message>
</ns1:ServiceException>
</detail>
</env:Fault>
</env:Body>
</env:Envelope>
But instance of FaultEvent class in Flex fault-event-handler
only contains general error informatin like: (the following values
are gotten during debug)
event = mx.rpc.events.FaultEvent
- fault = mx.rpc.Fault (@541e5e1)
- description = "HTTP request error" : String
- detail = "Error: [IOErrorEvent type="ioError"
bubbles=false cancelable=false eventPhase=2 text="Error #2032:
Stream Error。 URL:
http://PVGD50033332A:8080/silo/SessionService"
URL:
http://PVGD50033332A:8080/silo/SessionService"
: String
- errorID = 0 [0x0] : Number
- faultCode = "Server.Error.Request" : String
- faultcode = "Server.Error.Request" : String
- faultDetail = "Error: [IOErrorEvent type="ioError"
bubbles=false cancelable=false eventPhase=2 text="Error #2032:
Stream Error。 URL:
http://PVGD50033332A:8080/silo/SessionService"
URL:
http://PVGD50033332A:8080/silo/SessionService"
: String
- faultString = "HTTP request error" : String
- faultstring = "HTTP request error" : String
- message = "faultCode:Server.Error.Request
faultString:'HTTP request error' faultDetail:'Error: [IOErrorEvent
type="ioError" bubbles=false cancelable=false eventPhase=2
text="Error #2032: Stream Error。 URL:
http://PVGD50033332A:8080/silo/SessionService"
URL:
http://PVGD50033332A:8080/silo/SessionService'"
: String
- name = "Error" : String
- rootCause = flash.events.IOErrorEvent (@5572371)
- bubbles = false : Boolean
- cancelable = false : Boolean
- currentTarget = flash.net.URLLoader (@541e431)
- eventPhase = 2 [0x2] : Number
- target = flash.net.URLLoader (@541e431)
- text = "Error #2032: Stream Error。 URL:
http://PVGD50033332A:8080/silo/SessionService"
: String
- type = "ioError" : String
Could anybody tell me where I can find the original error
information like 'No session can serve the request, pls check if
the session is expired!' in Flex web service framework?I am also encountering the exact same issue using Apache Axis
1.4 (
http://ws.apache.org/axis/)
as my web services stack. The fault information is seemingly
nowhere to be found. Can someone from the Flex support team please
sound off on this issue. Is fault data supposed to somehow be made
available? I would imagine it would be if meaningful error messages
are to be returned from Web Services in Flex. -
Need help Flex Application and Dataservices
Hi,
Is that possible to have two servers
in 1 i will host my flex application
in the 2nd i will host the data service application. ie my
flex application talks to the remote object sitting in another
server
Thanks in advance..Can I change a Video object to to Camera object, If yes, How do??
nsOutGoing.attachCamera(video as Camera);// it does not work rightly
thanks -
hey guys
I am creating this apps and so far, I have a search page
that display data once user fills out a form (form and result) are
all in one state/page. Now what I would like to do is when user
clicks on one of the search result I would like to go to a details
page. How do I do this? Currently user can move between pages via
view stack and wipe up/down effect between pages. I want to keep
the same effect, but now when user clicks on a record/row the page
wipe's up and the down effect is the details page. If you can point
me to a tutorial or some sample code that would be great. I am
completely new to flex/action scripting.
thanks
JayLook for the CF Extensions in the Flex 2 install directory.
On Windows, the default location is:
C:\Program Files\Adobe\Flex Builder 2\ColdFusion Extensions for Flex Builder
There's a zip file there (the extension) and a "installation" html file. Read that . -
Examples of using flashbuilder/flex tags
can anybody recommend some resources for examples on using some of the flashbuilder/flex tags.
as a cold fusion web developer, there are tons of resources with snippets or simple examples on using most the cold fusion tags and functions.
liveedocs.adobe.com is a great reference guide but sometimes I need examples and snippets ; reference material is not very useful for learning.
is there or will there be something similar with flex/flashbuilder?I assume you're asking specifically about Flex4 examples? There are tons of resources (Adobe and non-Adobe) for pre-Flex 4 coding, so I won't go into those. For some examples and info on Flex 4, you might check out the Adobe devnet site - we're recently posted some articles talking about various aspects of Flex 4, with sprinklings of code and demos to help illustrate the points:
http://www.adobe.com/devnet/flex/
Also, there were a few talks at a Flashcamp event a couple of weeks ago - it might be worth checking out the videos that were posted:
http://labs.adobe.com/technologies/flash/videos/#flashcamp
(more about the event and links to some of the slides here: http://www.flashcamp.org/)
You can also follow some of the blogs out there that are talking about Flex 4. A few of us on the SDK team have blogs, but there are also non-Adobe bloggers out there talking about it and posting code and examples.
Hope that helps.
Chet. -
Lost my flex book; should I wait for FlashBuilder 4 books?
I don't know if things changed very much between Flex 3 and Flash Builder 4.
Anyway, can any of you shed light on what is coming in the form of FlashBuilder books, training or education?
Also, since I am a Flex/FlashBuilder 4 novice, I haven't found userful resources in Flex frameworks; similar to fusebox if you know ColdFusion.
Greatly appreciate any information or future information if you know it.
ThanksI'm not too well informed about Audible support so I won't commment. Creative is generally pretty tight lipped about further developments too so I wouldn't expect anyone to make an official promise.
I DO know that bookmarking is enabled. You can store up to 0 bookmarks and I use it extensivly for the audio books and comedy albums I have in mp3 format.
There was a big discussion about the jogging with the Mini and Micro. I think Creative is being a little more on the cautious side to prevent the player from sustaining repeated shocks. There were users who posted here saying that there is no problem when they go jogging or work out with their Micro. The Micro and Mini are pretty much the same arcitechture inside so being a little rough probably won't hurt too much. It's a matter of Creative being maybe a little too conservati've.
I'd like to add that, since I've owned both, the Micro is an amazingly good player and it kinda blows the Mini outta the water in every way.Message Edited by fdreinthea on 0-8-2005 2:30 AM -
Indesign Script Opening Flex App / Tab Handling
Hi,
I am working on a FlashBuilder 4 application that is opened from, and interacts with, an Indesign CS4 .jsx script. I have added a TitleWindow that provides for login processing (there is a backend database) to the Flex application. The login window is opened from the method that is registered as the initialization method for the Flex application. The flow works nicely. The application, with its presentation of a TabNavigator holding the core panels, visually appears then the login TitleWindow opens modally. The id / password is entered, then the web service is called that handles verifying login. The event handlers that receive the callback from this then populate the controls on the application if the user is verified.
The problem I am having is with tabbing on the TitleWindow. No matter what I do (tabEnabled / tabIndex settings, etc.) within Flex, the TitleWindow will not receive tab presses and react to them. Tabbing seems to cycle through the Indesign application in the background.
From a ScriptUI perspective the Flex application is opened as a Window (I've tried Palette with similar results. I need it to be non-modal). Not only does the first tabbable field not get focus, even when explicitly coded to do so, if you try to tab off of it, which doesn't work, then click on the second field on the TitleWindow to force focus, the first keystroke you type into the text field is ignored.
If I test the application from FlashBuilder directly, without being invoked as a ScriptUI Window / FlashPlayer, the first field gets focus, tabbing works, etc.
Can anyone tell me how to make the login window behave such that I can set focus on field 1 and have it respond to tab presses to cycle to the second field? Is there something I should do in the FlashBuilder application's invocation within the .jsx?
Here are the operative lines from the script:
var res =
"window { \
fp: FlashPlayer { preferredSize: [1100,650], minimumSize:[800,450], maximumSize:[1200, 850] }, \
var importFlashWindow = new Window (res,"Import Stories", undefined, {resizeable:true, independent:true});
importFlashWindow.onShow = function(){
var movieToPlay = new File (mySWFFile);
try {
//This function must be declared before the swf file is loaded as the flex panel calls it
//from its init method.
this.fp.getBaseUrl = getBaseUrl;
this.fp.loadMovie(mySWFFile);
//etc.
I have posted the same basic question in the Flex / FlashBuilder forum with no response. I'm hoping someone here might know what I need to do to get the FlashBuilder application to receive the tab presses instead of the Indesign application behind it.
Any help appreciated.
Thanks,
DavidHi All
I'm doing somthing similar.
I have many textArea in my SWF file and I can't copy and paste text in it using shortcuts.
If I paste contents using the Indesign menu commend, all works fine.
Someone can help me?
thanks
Ivan -
Flashbuilder and Cold Fusion (using application/session variables)
I would like to know if anybody uses Flashbuilder with Cold Fusion?
Since Cold Fusion has lots of different scopes of variables (application, session, client, form, url, etc...) how do you manage this in Flex/Flashbuilder?
Are there forums or groups specifically for using Flex3/Flashbuilder with backend server side technologies such as Cold Fusion?.
The only server side technology that I have interest in is Cold Fusion. I've seen basic tutorials and videos using Cold Fusion CFC's and data binding with Flex. I haven't seen or heard anything using a Cold Fusion application, session, or client variable in Flex.
Hopefully some of you have some experience on this topic.
Thankshey popster,
i too had this question some time ago. my entire app was built on CF with HTML before i started integrating Flex 3 with it. i found that i needed to create cookie variables for all my session variables i was using in order to maintain and remember who the user was in my CFC calls. i also found that after i compiled a flex app, i changed the .html to .cfm (the file that loads the compiled SWF file). by doing this i was able to pass CF session variables into the flex app and you can refer to these anywhere in Flex by using Application.application.parameters.{variable name here}
add the CF variable in the FlashVars line to pass it into Flex (see the last line of code). this will create a variable (in my case i'm passing session.employeenumber). then in your flex app you can reference it by using Application.application.parameters.emplid:
AC_FL_RunContent(
"src", "Request",
"width", "100%",
"height", "87%",
"align", "middle",
"id", "Request",
"quality", "high",
"bgcolor", "#869ca7",
"name", "Request",
"allowScriptAccess","sameDomain",
"type", "application/x-shockwave-flash",
"pluginspage", "http://www.adobe.com/go/getflashplayer",
"wmode","transparent",
"FlashVars","emplid=<cfoutput>#session.employeenumber#</cfoutput"
A little trick I learned (does Adobe really expect us to re-engineer how our apps have been working by no longer using sessions for Flex?). Then in your CFCs if you also create cookies for every session variable you can maintain the variables based on user login. HOPE THIS HELPS!
-Matt -
Flex SDK and AIR runtime version in mobile
Hi, guys.
I'm trying to make my first Flex mobile app.
I'm a little confused about the relationship between Flex SDK and AIR runtime versions for mobile development.
In the "Developing Mobile Applications with ADOBE FLEX 4.6 and ADOBE FLASH BUILDER 4.6" pdf document, it says:
"AIR requirements
Flex mobile projects and ActionScript mobile projects require AIR 2.6 or a higher version. You can run mobile projects on physical devices that support AIR 2.6 or a higher version of AIR.
You can install AIR 2.6 or a higher version only on supported Android devices that run Android 2.2 or a higher version. For the complete list of supported Android devices, see Certified Devices. Also, review the minimum system requirements to run Adobe AIR on Android devices at Mobile System Requirements.
Note: If you do not have a device that supports AIR 2.6 or a higher version of AIR, you can use Flash Builder to launch and debug mobile applications on the desktop."
So, I go and check the Certified devices in http://www.adobe.com/devnet-apps/flashruntimes/certified-devices.html and find that the minimun FLASH PLAYER version accepted by ALL devices is FP 10.1
1. Does this mean that if I want to release an app to target ALL mobile devices, then I can only use Flex 4.5?
2. Do support for Flash Player mean the same than support for Adobe AIR? Or the application will prompt the user to install whatever version of the AIR runtime and all of them would be supported by the device, even in the FLASH PLAYER support is for a lesser version?
Thanks!Thanks for your help, Flex harUI,
The first impression that comes to mind is that FP version is indeed only for the web browser plugin. Then, why does the official Flex 4.6 mobile development documentation have a link to that page that only speaks about the supported FP version in mobiles under the title "AIR requirements"??
This makes it way too confusing.
Do you know whether there is something like an equivalent matrix/list of mobile devices with their supported AIR runtime versions? I went a great deal in trying to keep my original app under 400kb... I didn't know that in the end it would end up weighing 9.5Mb... :S
Thanks again, -
Q: I want to use an XML data source to dynamically display
images and
data in my Flex application. I won't know how many
images/data points I
will have at design time. How can I best approach this?
A: Depending on what you're wanting to do, you can either use
a
Repeater with an Image or custom component that contains an
Image or you can
use a List based component to display an Image or custom
component with an
Image (or SwfLoader, or Loader) in it. The Help is full of
resources on
this subject. Here are some places you may want to try:
Help>Flex Start Page>Creating a Simple RIA
Help>Help Contents>User Interfaces
- Using Data Providers and Collections
- Controls
- Image
- SwfLoader
- Using Data Driven Controls
- Using Item Renderers and Item Editors
- Dynamically Repeating Controls and Containers
Here is an example that might get you running fast if you
find it easier to
learn from a working example than from Help files:
http://examples.adobe.com/flex2/inproduct/sdk/photoviewer/PhotoViewer.html
Q: I've created a custom itemRenderer component to use in a
List
based component (Datagrid, TileList, HorizontalList, etc.).
When my List
first displays, everything looks fine, but when I scroll it
or change the
dataProvider, some of the itemRenderers show values or
formatting that
aren't right. How do I fix this?
A: List-based components don't draw a renderer for every item
in the
dataProvider. Instead, they create enough to display what is
on screen now,
plus one or two more waiting in the wings. This means they
recycle the
renderers rather than creating new ones when you change
dataProvider or
scroll up and down. When you use a creationComplete event to
set up the
itemRenderer, that event doesn't happen again when the
renderer is used for
a different set of data. The solution to this is to override
the set data
protected function that most components have.
For more information, check out the following resources:
http://www.adobe.com/devnet/flex/articles/itemrenderers_pt1.html?devcon=f1
http://blogs.adobe.com/aharui/2007/03/thinking_about_item_renderers_1.html
Q: I want to run a function in my main application from
inside my
custom component. But when I try to refer to myFunction() in
that
component, I get a compile time error Call to a possibly
undefined function
myFunction. How can I fix this?
A: Your component has its own scope, so it doesn't know
anything
about the functions in the main file. You can get around this
by directly
referencing the main application scope like this:
Application.application.myFunction(). However, this makes
your component
tightly coupled, which is a quick way of saying that your
component is only
usable in an application that has a myFunction() function in
it. You're
better off dispatching an event from your component and
letting the
application decide how to handle it. For more information,
check out the
following resources:
http://www.adobe.com/devnet/flex/articles/loose_coupling.html
http://www.adobe.com/devnet/flex/articles/graduating_pt1.html
Q: I want to decide at runtime what kind of component to add
to
display my data. How can I accomplish this?
A: Use getDefinitionByName and ClassFactory to dynamically
create
your class. Just be sure that you actually have at least one
"hard"
reference to each class you intend to use, or the class might
not get
compiled into your swf. Here's a full write-up of how to do
that:
http://www.paulofierro.com/archives/520/
Q: I need to set a property or add an event listener on a
component
that is in a ViewStack/TabNavigator/Accordion. When the
component is not
the first child of the Navigator Container, I get a null
object error
(#1009). What causes this, and how can I fix it?
A: By default, the Navigator containers only create the
children of
each pane as that pane is viewed. The easy way to fix this is
to set the
creationPolicy on the Navigator to "all." However, this will
cause your
application to take longer to load. A better way to fix this
is to wait for
a later event, such as creationComplete on the component you
want to access,
or to use binding to "pull" the data into the component.
The way I handle it is to call invalidateProperties() on
change of the
ViewStack. I then override commitProperties() and call an
"initializer" for
each pane. In the body of each initializer function, I check
to see if the
selectedItem for the viewStack is the one my initalizer cares
about. If
not, I return from the function immediately. Inside that
initializer
function, I set properties and add listeners as appropriate.
Q: When my application is taller than the browser window, I
get
scrollbars in the application. I want the browser to do the
scrolling. How
can I do this?
A: In the html-template/index.template.html file change line
46 (in
the Flex 3 template) to read <body scroll="auto">
instead of the default of
<body scroll="no">.
Q: I am using URLRequest, HTTPRequest, or HTTPService to
retrieve
information from a database on a server. The first time my
application
makes a server call, it works fine. But when I call the same
page again, I
get the same data, even though I know the data has changed on
the server.
Is this a bug?
A: The browser has cached the response it got from the first
call
you made to the page. This means that you need to either
change how you are
calling the page so it appears to be a new request, or you
need to change
the page itself so that it won't be cached.
To change how you are calling the page, append a unique value
to the end of
the URL. For example, new
URLRequest('yourPage.asp?param="+(new
Date()).getTime).
If you want to change the page itself, you need to change the
response
headers. The method for changing the response headers will
vary from
language to language. For more on this see:
http://msdn.microsoft.com/en-us/library/aa923184.aspx
http://www.sun.com/books/components/Hall_ch7.pdf
http://www.w3schools.com/php/func_http_header.asp
http://livedocs.adobe.com/coldfusion/8/htmldocs/Tags_g-h_07.html#3989067
Q: I am using Modules in my Application. When I load the
first
Module, everything works fine. But when I load the second
one, I get a Type
Coercion Error failed error #1034 that looks something like
TypeError: Error
#1034: Type Coercion failed: cannot convert
com.myDomain.package::SingletonClass@fce9a89 to
com.myDomain.package::SingletonClass or TypeError: Error
#1034: Type
Coercion failed: cannot convert
mx.managers::HistoryManagerImpl@22346589 to
mx.managers.IHistoryManager. How do I fix this?
A: When you reference a singleton class, either a custom
singleton
or one of the managers in Flex, into a Module, if this is not
loaded in the
Application domain, it will load into the child domain of the
first Module
to load and other Modules will not be able to see it. To
prevent this,
either directly load your class into the main Application
before loading any
Module, or use a Runtime Shared Library with the class
included.
For more on this, see Alex Harui's presentation on Modules
from Flex 360
http://blogs.adobe.com/aharui/2007/03/modules.html
(slides 19, 24-31).
Not sure what a Singleton is? Check out
http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&postId=262&produc tId=2
Q: I'm using a Repeater to lay out the right number of
components on
the screen for me based on a data source. I'm trying to set
up the id for
each component dynamically like this:
<mx:Repeater id="myRepeater" dataProvider="mySource">
<mx:Button id="{'myButton'+myRepeater.currentIndex}"
label="{myRepeater.currentItem.label}" />
</mx:Repeater>
When I try to run the file, I get a compiler error
'{'myButton'+myRepeater.currentIndex}' is not a valid
identifier.
I need to be able to reference each of the repeated
components. How can I
do this?
A: If you give the component an ordinary id like this:
<mx:Button id="myButton"
label="{myRepeater.currentItem.label}" />
Flex will create an Array for you called myButton that
contains a reference
to each component the repeater created. For more information,
see
Referencing Repeated Components here:
http://livedocs.adobe.com/flex/3/html/help.html?content=repeater_3.html
Courtesy of Amy's Flex Diary.
The most recent version of this FAQ can always be found at
http://www.magnoliamultimedia.com/flex_examples/Amys_Flex_FAQ.pdf"Greg Lafrance" <[email protected]> wrote in
message
news:gbr2r8$qtv$[email protected]..
> Is it possible to number the questions? Sometimes in
your posts you refer
> to Q3, but they are not numbered.
Good point :-). I get tired of counting them sometimes. I'll
try to get
that done before next week.
Maybe you are looking for
-
Why aren't my Muse paragraph styles being recognized by Business Catalyst as CSS?
We switched over to Muse for site-building so that future designers can still build sites here when my coworker leaves, so I was looking at how to integrate an existing Business Catalyst blog into Muse and found this tutorial: Building a Blog with Bu
-
How to remove duplicates while joining two query results ?
Hi all, Please, anyone suggest me how to do below one.. i am using oracle version 11.2.0.3.0 Col_1 Col_2 111 AAA AAA 111 222 BBB 333 CCC As, oracle point of view the above table contains distinct rows. But i need the logic result like below, Col_1 Co
-
Process Chain Ended with Errors - cause unknown
I have had several instances of process chains stopping for no apparent reason. The stops occur between 2 master data infopackage loads. The last step is green and the next is grey. The PSA table has been updated successfully for the last step. A
-
I am using Windows XP with Explorer 8. I get a run time error when trying to read PDF files! Is there a fix for Exploader 8? I have no problem with Firefox reading PDF files.
-
Need a copy of my purchase receipt
On June 23rd, 2014, around 8pm, at the store near Florida Mall (Orlando, Fl), I bought 1 playstation network card ($50 or $20, don't recall) and 1 Sandisk microSD 64gb card, using my VISA credit card, for a total of $135,18 and I need a copy of the r