Flex :: Check The Device Type?
Jun 18, 2011how ( if it is ) to check the device type with flex ?
with device type i mean : PC, laptop, tablet, phone ..
how ( if it is ) to check the device type with flex ?
with device type i mean : PC, laptop, tablet, phone ..
Say I start at a leaf node, and I traverse up the tree by using .parent(). I need an exit condition once it hits root. At the moment, I'm using parent.@name != "root", where name is just an attribute, but shouldn't I be able to check the type of element as well? How? Also, is there another way to end the traversal in as3?
View 1 RepliesI have two objects [object MovieClip] [object ContentDisplay]
i have to differentiate them abut i can't find a method in as3 check variable type.
I have imported my wav files to my library added them to the down state of my buttons and when I test the file I get (Sound has no valid device sound path although exporting device sounds was requested in the export settings. This sound will be ignored.) I have been surching for an answer but as of yet have found none.
View 3 RepliesCan a Flex application that was designed for use on a PC be run on an iPad, iPhone, or Android-based mobile device? Seems like a simple enough question.[URL]..yields a picture of a dude running a (presumably) Flex application on an Android. So at first glance, the answer would appear to be "yes." End of story.
There is so much (mis)information out there on various tech sites that suggest Flash-based technologies simply won't run on iOS or other mobile platforms. Why is this? Perhaps they mean to say that Flex won't run "out of the box" and requires a plugin? Or do they mean it won't run at all?
Every time I think I've reached a definitive conclusion, some post on SlashDot or CNET directly contradicts it. So what's the scoop? Can one take an existing Flex application and run it on iOS/Android? (I realize there are screen size issues to consider so the app might not run effectively. I just want to know if the runtimes are available on the mobile devices to allow the Flex app to launch at all.)
The following is my codes. This is still work in progress; so, you will see some functions with empty contents. Plus, this is my first Flex application; please bear with me. This is a quiz application that gets the questions and answers to each questions from a ColdFusion web service. There are three types of questions, True or False, Multiple Choice with single selection, and Multiple Choice with multiple selections. So, based upon the question type, the application would dynamically generate the appropriate amount of radio buttons or check boxes for the users to select. I got these working. The problem that I am having is, I am not sure how to check what the users have actually selected. In some other forums and posts on other web site, it said that I can use event.currentTarget.selectedValue to get the user selection. But when I actually do it, I got a run-time error saying, "Property selectedValue not found on mx.controls.FormItem and there is no default value." My question is, what do I need to do to capture the user selections?
[Code]...
Just started playing with the new AIR functions NetworkInfo and NetworkInterface, but can't build ...
This is the example I started from: tourdeflex But these lines cause errors:
var networkInfo:NetworkInfo = NetworkInfo.networkInfo;
var networkInterfaces:Vector.<NetworkInterface> = networkInfo.findInterfaces();
I'm developping an Adobe Flex application.
I need to detect gps devices when plugged. Currently, it is a bad heuristic-based detection that is used (it tries to find specific files/directories). It uses the StorageVolumeInfo to discover plugged devices.
'd like to know if there's a way to get the USB id with Flex.
I am trying to compile an air app, and I keep getting this error: D:Tomcatwebappspublic-htmladmMain.swf (The device is not ready) It seems that someone who worked before me, had worked from a local server. I searched Flex for all known variations, I couldn't find where it is looking for this. I googled as well, which didn't get me anywhere. Does anyone know how to remove this compiling error?
View 2 RepliesI have a Flex 3 application in which embedded fonts were being used. However, due to licensing restrictions, I have to remove the embedded fonts. Not a big problem, but now legal wants to know which device font is being used? Seems like I can only provide them a list of "suggested" fonts from my css file, and not the actual font that will be used at runtime.
[URL]
"If the client's system does not have the first font in the list, Flash Player attempts to find the second, and so on, until it finds a font that matches. If no fonts match, Flash Player makes a best guess to determine which font the client uses."How can I determine what is the font that the Flash Player ultimately ends up using?
I am creating a sqlite database for my mobile app. once the user has supplied the correct password the database is opened. Various screens of the application will need to read and write data from the db. is there a way I can make the connection global when I open it, so it can be accessed from any view?
the code I am useing to open the DB is
var sqlConnection:SQLConnection = new SQLConnection();
sqlConnection.addEventListener(SQLEvent.OPEN,sqlOpenSuccess);
sqlConnection.open(DBFile, SQLMode.CREATE, false, 1024,null);
I made the simple application using flash builder 4.5.1 for both iOS and android. I test the application on my iphone and ipad, it working fine. But when I try to install on my android device(Samsung GT-5570). It get the following error message.Error occurred while installing the application:1603 KB/s (6108444 bytes in 3.719s)pkg: /data/local/tmp/Runtime.apkFailure [INSTALL_FAILED_INVALID_APK]I google about the error.I found that It is cause of my device have ARMv6 architecture.Now I have 2 question.Question 1. Is there any other reason of failing installation.Question 2. If the reason is same than any other way available to make build for ARMv6 and ARMv7 architecture phone.
View 1 RepliesI have a project that uses video for a chat application, I can get it to work in the flex emulator but when I deploy it to the device the button that initiates the video doesn't change and video never starts. My devices all have 2 cameras except my computer but specifiying Camera.getCamera([1]) didn't change anything except mess up my emulator and cause a NullPointerException. Camera.getCamera([0]) works just the same as not having the ID. I have tried messing with different values quality and nothing makes a difference
private function publishVideo():void{
_publishingVideo = true;
_ns = new NetStream(_nc);
[code]......
Developing APPs on IOS using Flex 4.6 I am displaying parsed epub files into stagewebview. It works fine on the device. However, when I try to add the annotation tool which (likes the ibook annotation), I can only select one single word!! I tried the "Game of Flex" which it did the same way as loading a web content into a stagewebview component, and it cannot have control to select more word as well. Therefore, I think its the current limitation (correct me if there is actually a way to do that in stagewebview) on the stagewebview. So, do you guys have other good ideas to display content as html without the limitation? like use other components, call JS? or use native object-c?
View 1 RepliesTried stage.stageWidth and stageHeight on applicationComplete, but for some reason the actual numbers returned do not seem to be accurate - the image always appears off-centered (stageWidth/2 - imageWidth/2). How do you determine the mobile device's actual screen size, to center an object?
View 1 RepliesI'm trying to prevent keyboard show when I click Textinput field on my device. I use Textinput only to show some text and for click event (to push a view).
View 2 RepliesHow do you scroll an editable TextArea (Flex Hero) on a touch device? I am referring to the situation where the text does not fit in the TextArea height.When I try to tap and drag the text gets selected and not scrolled... Am I missing a something here? I am using verticalScrollPolicy = on (also tried auto).I am testing the code in the Blackberry Playbook simulator (my targeted device for my app).
View 2 Repliesat some point in the past, i believe soon after i got Flash CS5 and installed it, i started receiving the following error when clicking the "Check Syntax" button:
Warning: 5004: The file '/Applications/Adobe Flash CS5/Common/Configuration/ActionScript 3.0/FP9/playerglobal.swc', which is required for typechecking ActionScript 3.0, could not be found. You may need to reinstall Flash.
what's particularly annoying is that playerglobal.swc file is present in that FP9 directory. do i need to choose some arbitrary setting somewhere so Flash CS5 knows it's not 2008 and that i'm not deploying on Flash Player 9?
i have "roll over" event listener and i would like to that works only with MovieClips (without textfields etc.). I would like to write something like that:
if(event.target == MovieClip){ do something }
else { do something else}
This doesn`t work properly.
How to check type of event.target in "if" statement?
I'd like to know how to use the JavaScript onChange event on <input type="file"... so that when a user selected files, onChange will call Flash to return the file's size and decide what to do next.2nd. How to use JavaScript to exclude this check, if the browser doesn't have Flash.
View 1 Repliesi'm following Christian Cantrell guide for packaging AS3 application for iPhone, but i can't find a way to use the packager for creating an app for testing on device. I've tried with -target ipa-test and -target ipa-app-store but when i try to upload my app on the iPad, iTunes throws an error sayng that i'm not allowed.I've done a simple test using the Packager bundled width CS5 (with the same certificates) and everything gone right.
Is is possible to use CS5 Packager for Flex project ? (i know that flex isn't optimized for mobile)
I have a tree with nodes , and a delete button , first user select the node and click this delete button , I want this node to be removed from the tree , Its not XML , every node in tree is of type Object
{label:'folder',children:[{label:'file1'}]}
I tried delete myTree.selectedItem (but compiler wont let me do it) also tried myTree.selectedItem = null (just unselects the item)and also how can I access reference to parent object of myTree.selectedItem ?
I'm using flexmojos 3.8 with flex compiler 4.1.0.16248.My Project compiles fine in Flash Builder, but with flexmojos / maven I get the following Error: Type was not found or was not a compile-time constant: UncaughtErrorEvent
The Flex Code looks like this:
loaderInfo.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR, onUncaughtError);
The Flex Compiler 4.1 should know the type UncaughtErrorEvent - Why does it fail?
I have a dictionary with objects as keys. How can I check if specific object is available in the dictionary?
View 3 RepliesSee [URL] Now there is a button called Answera, which when clicked should have a symbol (movie clip) called Check appear at the cordinated specified. Check exists in the libary (but does not have an instance name) and no where else on the stage. when I run this code I get: 1180: Call to a possibly undefined method Check. -> var rightCheck = new Check(); How is it undefinded if it exists in the libary?
View 7 RepliesHow we add check box in advance data grid header
View 1 Replies$output .="<keyword>".$_POST['keyword']."</keyword><name>".$row['url']."</name><occur>".$row['occurrences']."</occur><queryTime>".(substr($end_time-$start_time,0,5))."</queryTime>";
}
I want to check in Flex, if the value of name is null or not. I tried for these, but i am not getting any alert when the node value is empty.
[Code]...
I have an application which receives dynamic XML data from a server. The structure of the XML is dynamic and the tags/attribute names cannot be predicted. NO row items can be hardcoded. The data is coming back from a database (imagine columns and rows), and the type of the data is known on the server side. The following is just an example, an only shows the structure of how the data comes back.
[Code]...
I've got a Flex 3 project. Flex makes an ExternalCall to some Javascript. The Javascript is then turned into XML.
But, my xml isn't parsing in IE. It works in all other browsers. I think that the problem is that I haven't set the XML's content-type and IE doesn't like that. So my code looks like:
myReturn = '<myXMLReturn>' + myReturn + '</myXMLReturn>';
myReturn = '<?xml version="1.0" encoding="UTF-8"?>' + myReturn;
xmlReturn = new XML(myReturn);
How would I set: header('Content-type: application/xml'); in Actionscript?
As I understand it IE requires that the Content-type be set.
I get the error message. Doing like tuts said. package { import flash.events.*; // rememeber to import all flash libraries or the ERROR will come up with "TYPE" does not exist etc.
[Code]...