Actionscript :: Flex Embedded String Resource Encoding

Sep 26, 2011

I embed a text file into my Flex project and read its contents using code like this:[code]The contents of the file is abc. The problem is that the string loaded from the file is not comparable to other strings even though when printed or viewed in the debugger (in FlashDevelop) it seems to be perfectly fine.[code]How do I convert it into a proper string? I tried to use the string methods such as substring to create a copy, but that does not seem to be the solution.

View 1 Replies


Similar Posts:


String :: Flex - Embedded String Resource Encoding?

Apr 13, 2004

I embed a text file into my Flex project and read its contents using code like this:

[Embed(source = "../../data/abc.txt", mimeType = "application/octet-stream")]
private var r_Abc:Class;
var xx:ByteArray = new r_Abc();

[code].....

View 9 Replies

Flex :: Localization And Resource Modules - Runtime Errors - Unable To Load Resource Module From Portal?

Jan 20, 2011

I've created an application that includes a number of Modules and uses Parsley framework. Ant is used to build the application.Recently I thought of using Resource Bundles and implemented it in the system by creating a locale/en_US folder under the src. I added a portal.properties file with all my strings defined.In my modules, I added the metadata

<fx:Metadata>
[ResourceBundle("portal")]
</fx:Metadata>

In the ant build file, I added the below lines within mxmlc.

<locale>@{locale}</locale>
<source-path path-element="${myapp.flex.app.locale}/{locale}"/>
<include-resource-bundles>portal</include-resource-bundles>

The build works fine and when I deploy the application and open it in my browser, I'm greeted with many errors thrown by the Flash player.But if I dismiss the messages, its working fine. My strings are replaced with the values in the property file, but how do I stop the runtime errors being thrown up?I get the below error.

Error: Unable to load resource module from portal at MethodInfo-637()at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()[code].....

View 1 Replies

ActionScript 2.0 :: Load A New External JPEG Image Into A MC With A String Var Encoding A String Caption In The URL Link / Text Fader

Jun 6, 2003

I have a very general requirement that seemed very simple: Step 1: Load a new external JPEG image into a MC with a string var encoding a string caption in the URL link (VALUE="../fadeTest.swf?someTextVar=TestCaption") within the EMBED / OBJECT sections. I know how to do this and it semed to work fine. STEP2: When the JPEG is loaded I would like the substituted Text to Fade In over the JPEG. The JPEG should also fade in before the Text. The fade rate should be programmable.

[Code]....

View 1 Replies

ActionScript 3.0 :: Casting A String To Be A Resource Path?

Mar 18, 2011

I have a situation where I am trying to build a path to an xml node like this:

Code:
var personName:Object = ["xmLoader.xmlData.profilepage.p"]+num+[".p1name"];

Where "num" is a number passed into to the function. What is happenning is when I trace out personName after this code I get:

"xmLoader.xmlData.profilepage.p2.p1name"

instead of the value that resides at that node name (I can trace out p1name which is John from my processed xml earlier in the code).

View 5 Replies

ActionScript 2.0 :: URL Encoding - Render String That Include Accent Marks?

Dec 14, 2005

Any best way to get flash to render a string correctly that includes accent marks? Can I URL encode these special characters?

View 1 Replies

Flex :: Pass String From Virtual Keyboard In AIR To An Embedded HTML Page?

Oct 11, 2011

i'm a newbie in Flex/Air. I'm developing an AIR web browser and i want to use a virtual keyboard to write in the HTML pages.it works well when i try to write in a text area, but i don't know how to write in the html page.EXAMPLE:To write in textarea, i just have to call this:textarea.text = event.keyLabel;

View 1 Replies

AS3 :: Flash - How To Perform Encoding Of A Wave File Into Base64 Encoding

Aug 1, 2011

I need to perform encoding of a wav file into base64...

View 2 Replies

Flex :: Get Resource ( Image ) By It's Name?

Jun 16, 2011

I have checked ResourceManager, but seems like i missed something or i just checked into the wrong place

I have an resource ( embed image ) which i need to retrieve by it's name. How to do that ?

View 1 Replies

Flex :: Resource Tag Not Support Localization?

Mar 27, 2012

Some places in my flex app, I use ResourceManager.getInstance().getString, and other places I use mxml @Resource tag to retrieve resource properties dynamically loaded from ResourceManager. resourceManager.loadResourceModule(resourceModuleURL); But only strings from ResourceManager.getInstance().getString show proper locale based values, while the @Resource tag only returns values from en_US resource. I guess it is because en_US is what I compiled with (-locale=en_US ). So I am wondering if I am using a dynamicly-loaded resource, do I have to abandon the @Resource tag and use ResourceManager.getInstance().getString ?

View 1 Replies

Flex 3 :: Load A Local Resource Synchronously In It?

Jul 16, 2009

I want to store some test data for a FlexUnit test in small XML files in my Flex project, and access them trivially for the flex test. How can I load these bits of data synchronously? HTTPService is the way I'd be loading them _a_synchronously, but adding event handlers to my test cases seems like a bit of overkill.

View 2 Replies

Flex :: Can't Find Compiled Resource Bundles

May 26, 2010

I am using Adobe Flash Builder 4.

I've run into this issue with my latest project, but I was able to re-create it with an almost empty project. Here is what I've done.

Created a new Flex Project Created a locale/en_US folder within this project. Added a class that extends SparkDownloadProgressBar. All this class does is attempt to create a Label.

When I try to debug this application, I get the following error.

Error: Could not find compiled resource bundle 'components' for locale 'en_US'.
at mx.resources::ResourceManagerImpl/installCompiledResourceBundle()[E:dev4.0.0frameworksprojectsframeworksrcmx
esourcesResourceManagerImpl.as:340]

[Code]....

The Flex Compiler/Additional Compiler Arguments section does contain "-locale en_US", but I do not want to just remove this as I am planning to have this load different property files based on the localization region at run-time and how I understand it, I will need to add each locale that I am planning to use on the compile argument line.

View 1 Replies

Flex :: Include Resource Bundles In Modules?

Sep 21, 2010

In the simplest of Flex Projects, create an MXML Flex Module and then load it using the ModuleManager.Create an ActionScript class that extends Module and then configure your project to compile that into a Module.Load this new module instead. The project compiles, but crashes when running with the following error:"Error: Could not find compiled resource bundle 'containers' for locale 'en_US'."I believe the compiler is failing to compile the required class definitions into ActionScript only module, while it succeeds for the MXML module.I can see that my skeleton MXML module is slightly larger than my ActionScript module (66KB vs. 45KB).

View 3 Replies

Actionscript 3 :: Compiling Resource Bundles In Flex

Mar 17, 2011

I want to compile my locale, resource.properties file into a swf.The documentation on Adobe site seems to be insufficient.

View 3 Replies

Flex :: Load Multi Resource To ResourceModuleURLs

Oct 17, 2011

I use Flex3.0(SDK 3.2).

I have a question Flex(resourceModuleURLs).

I am making loading of the resource using flashVars properties in the HTML wrapper as follows now.

AC_FL_RunContent(
"src", "ResourceModuleApp",
"flashVars", "resourceModuleURLs=es_ES_ResourceModule.swf&localeChain=es_ES",

[Code].....

View 1 Replies

Flex :: Http - Prevent From Caching An External Resource

Jul 1, 2009

I'm writing a flex application that polls an xml file on the server to check for updated data every few seconds, and I'm having trouble preventing it from caching the data and failing to respond to it being updated.

I've attempted to set headers using the IIS control panel to use the following, without any luck:

CacheControl: no-cache
Pragma: no-cache

I've also attempted adding a random HTTP GET parameter to the end of the request URL, but that seems like it's stripped off by the HttpService class before the request is made. Here's the code to implement it:

http.url = "test.xml?time=" + new Date().getMilliseconds();

And here's the debug log that makes me think it failed:

(mx.messaging.messages::HTTPRequestMessage)#0
body = (Object)#1
clientId = (null)

[Code].....

View 2 Replies

Flex :: Access Https Resource If Swf Is Served From Http?

Jan 24, 2011

My swf is being served via http protocol. I don't really see this being easily changed. There's a resource that a website has opened up via their api that I need to access but it is using https protocol. Because of this my swf can't access the resource because of security settings.

Option 1 would be to serve my swf via https. I can't do this at the moment.

Option 2 would be set secure="false" property of the cross domain policy file. I can't do this, I dont have access.

View 1 Replies

Actionscript :: List Keys Of Given Resource Bundle In Flex

Feb 14, 2011

Is there any way in action script to list all the keys (not values) of given resource bundle.My use case is to combine content of two different resource bundle. I wan to do this by creating a new resource bundle at runtime and add each key value pair from two different resource bundles into one.

View 1 Replies

Flex :: What Encoding Unescape() Function Uses

Aug 24, 2010

what encoding unescape() function uses? I have problem that URL param has utf8 foreign chars, that flash fails to read.

View 1 Replies

Flex :: Encoding For RTF Text - Does One Exist

Nov 2, 2011

I'm wondering if there is an encoding like UTF8/16 that can account for characters that are bold, italic, underlined, and super/sub-scripted? If not, is it under consideration by the powers that be? Reason for the question is that I have a large excel file where many cells contain rtf text such as italics, bold, superscript; and I need to access the information on a row-by-row basis. I know I can save the file in html or xml, but I would like to import the data into MySQL - keeping the formatting - and then being able to access the data a row at a time.

I've considered using Markdown or Textile, but that means a whole lot of time changing each cell - we're talking about 5,000 records. Also, I want to continue to use Flex and I'm not sure if Flex can display html formatted text in their text controls because of their their text engine...

View 1 Replies

Flex :: Specify Linked Resource Folder In MXMLC Compiler Arguments?

Oct 13, 2011

I've got external folder with resources (graphics, movies, etc) which is shared between a couple of projects. I'm able to link this resource folder in FlashBuilder (as described in [URL]). After that all the paths to embeds are relative to the project, and that's the behaviour I want.

This linked resource appears in .project file as follows:
<linkedResources><link>
<name>resources</name>
<type>2</type>
<locationURI>DOCUMENTS/Shared/resources</locationURI>
</link></linkedResources>

Note, that it isn't source folder and it is not included in compilerSourcePath tag. The question is how can I specify resource linked folder in mxmlc command line arguments? -source-path is not working here, relative pathes to embeds can not be resolved.

View 1 Replies

Flex :: URL Encoding When Downloading A File In Flash?

Aug 25, 2010

I have a flash app that needs to download a file, whose name contains UTF-8 characters.

Internally, the filename is read from a UTF-8 XML file, e.g. "my filé.pdf". The code goes something like this:

url = get_filename_from_XML();
req = new URLRequest( url );
ref = new FileReference();
ref.download( req );

The problem is that the URL is encoded in Latin1, i.e. the é is encoded as %E9 instead of %C3%A9 (according to FireBug). How can I get Flash to encode the URL correctly?

View 2 Replies

Read Flex / Flash URL Which Has Transfer-Encoding

Aug 25, 2010

I have a problem reading from Flex a url which has Transfer-Encoding: chunked because the FLex waits for the server to send terminate signal which in chunked transfer isn't sent...

View 2 Replies

Flex :: Detect And Convert Text Encoding?

Oct 28, 2010

Some text (or html) document from web is not encoded as UTF-8, so I want to convert encoding of text document to UTF-8. Do you have any clues for dealing with text encoding?

And I found that, when application draws element with encoding-broken text (such as "º ½¾ ±"), the application is often killed with alert dialog "adl quit unexpectedly". How can I make my application more endurable.

View 1 Replies

Flex :: Encoding Key Strokes As Bits In Uint

May 9, 2011

I am trying to encode certain values that I receive from keyboard event. Basically I want to check if a certain key combination has been pressed or not, so for that I am converting the key codes into sequence/pattern and store it in an object and a value(function) against each code sequence. Now I have to use four bytes and in first byte(MSB) I've to store shift, alt, ctrl respectively and in the last(LSB) I have to store the keycode of the key pressed.

Here is the code:
private function m_encodeValue(key:String, Ctrl:Boolean = true, Alt:Boolean = true, Shift:Boolean = false):uint {
var encodedValue:uint;
encodedValue = uint(Shift) << 2 | uint(Alt) << 1 | uint(Ctrl);
encodedValue = encodedValue | (uint(key.toUpperCase().charCodeAt(0)) << 24);
return encodedValue;
}

View 1 Replies

Flex :: URL Encoding - Posting Data On Server

May 27, 2009

I want to post data to a URL on my server from a Flex app. I am using the following
UrlParam = UrlParam + '&name='+ name.text + '&business=' + buisness.text; navigateToURL(new URLRequest(UrlParams),'_self');
The problem I am having however is that if I enter a business with an ampersand ("A&b.com") then the name does not send. Does Flex have anything out of the box to do the encoding from & to %26?

View 2 Replies

Flex :: Error : Could Not Load Definitions From Resource FlexTasks.tasks. It Could Not Be Found

Oct 23, 2009

I'm attempting to compile a Flex application from an ANT script, inside of Eclipse (CFBuilder, based on Eclipse), and I've run into this error:

Could not load definitions from resource flexTasks.tasks. It could not be found.

I haven't been able to find anything that gives directions on where this file (flexTasks.tasks) should be copied to, if it's needed at all. Some places indicate that it should be part of the flexTasks.jar file. I've tried two different things:

Copy the jar file into the ant/plugins/lib folder (and restart my CF Builder instance)Specify the path to the jar in the classpath attribute, as suggested by the comment on this page Neither helps me get past this error.Here's my build script, for reference:

<project name="Tagging" default="compile-tagging" basedir=".">
<!-- setup flex compilation capability -->
<taskdef resource="flexTasks.tasks" />
<property name="flex.src" value="./src" />

[code]....

View 5 Replies

Flex :: AS3 Video Encoding At Runtime With High Compression

Sep 15, 2010

I need to compress video image data (lets say a display object) in AS3 to a Byte Array with high compression at runtime. Framerate only needs to be around 5 but 1024x768 video needs to go to < 40 Kilobyte per Second without the quality being too bad. I wrote a custom encoder and got it to around 80-100 Kilobyte per Second for 1024*768 which still is too much and I don't see a lot of improvements to be mad to my encoder.

Using JPG or PNG Encoder gives way higher KB/s. Is there any open source way to to decode and encode video in as3 at runtime ? E.g. a H.264 as3 encoder and decoder ? Or other codecs? Or maybe a C# source code of h.264 encoder and decoder ? I think I could port it to as3. Doesnt need to be h.264, just something with good quality when running at 5 Frames/Sec and 40 Kilobyte...

View 2 Replies

Flash :: Detect File Encoding In Flex / Actionscript?

Feb 8, 2011

is there method/algo to detect universal file encodings ?

View 1 Replies

Use Two Embedded Fonts On One String?

Aug 4, 2009

I am dynamically loading rss description into it and would like to have first character and characters unsupported by other font be in that first font. i limited the range of char of that second font so all unsupported chars and first char should be in that first font.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved