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

Right click, copy, paste not working.

$
0
0

I'm confused by this... I got assigned a bug where when you copy and paste content (via right click context menu) from one textInput to another textInput it does absolutely nothing.

This only happens from within a specific custom component (the super class is a panel). Other components allow copy and paste and it works just fine.
. But I gotta get the context menu copy/paste working. But its just this one custom component that doesn't allow it...

 

Also, if you straight up Control + C, Control + V, it works fine. Any ideas where I should start digging?


Flex Scrolling Bug in Tree control

$
0
0

<mx:Tree id="tree" labelField="@label" minHeight="400">

          <mx:XMLListCollection id="xmlList">

                    <fx:XMLList id="root" xmlns=www.ns.com>

                    <node label="aaaa">

                              <node label="aaaDesc"/>

                    </node>

                    ... more nodes

                    </fx:XMLList>

          </mx:XMLListCollection>

</mx:Tree>

 

 

thats pretty much the basic code that i have

when scroller is added this functionality doesnt work.

 

 

 

TypeError: Error #1010: A term is undefined and has no properties.

at mx.controls::List/adjustVerticalScrollPositionDownward()[E:\dev\4.5.1\frameworks\projects \mx\src\mx\controls\List.as:1043]

at mx.controls::List/configureScrollBars()[E:\dev\4.5.1\frameworks\projects\mx\src\mx\contro ls\List.as:988]

at mx.controls::List/scrollHandler()[E:\dev\4.5.1\frameworks\projects\mx\src\mx\controls\Lis t.as:1629]

at mx.controls::Tree/scrollHandler()[E:\dev\4.5.1\frameworks\projects\mx\src\mx\controls\Tre e.as:2898]

at flash.events::EventDispatcher/dispatchEventFunction()

at flash.events::EventDispatcher/dispatchEvent()

at mx.core::UIComponent/dispatchEvent()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\co re\UIComponent.as:13128]

at mx.controls.scrollClasses::ScrollBar/http://www.adobe.com/2006/flex/mx/internal::dispatchScrollEvent()[E:\dev\4.5.1\frameworks\projects\mx\src\mx\controls\scrollClasses\ScrollBar.as:1472]

at mx.controls.scrollClasses::ScrollThumb/mouseMoveHandler()[E:\dev\4.5.1\frameworks\project s\mx\src\mx\controls\scrollClasses\ScrollThumb.as:216]

Automatic authentication with a webservice in SAP

$
0
0

hi all

 

I have a flex application which uses SOAP webservices from SAP to retrieve data.

Everytime one of the SOAP webservices is called the user have to enter a name plus password

 

login.png

I would like to make this automaticly. So that the user haven't got to fill this in. But Flex already filled it automaticcally.

But how do this work? How can you set this in Flex?

 

kind regards

 

Anton Pierhagen

How to set a background image to fill the entire screen on any device in a spark mobile application

$
0
0

Hi,

 

I started developing a mobile application with Flex.

I'm trying to set a background image to fill the whole screen. I've been stucked at this point for days now. I tried everything and no solution seems to work for me.

I'm using a TabbedViewNavigatorApplication and i need to set some background images on views.

I need my image to fill the entire screen on any device. i don't need to mantain image aspect ratio,  just need it to be fullscreen. This seemed to work when setting a custom skin on the TabbedViewNavigatorApplication, however this blocked all my views for some reason and all components contained in view became invisible.

 

Can you please tell me how can i achieve this?

 

Kind regards,

Dan

Set CheckBox as [1,0] instead of true/false?

$
0
0
Because boolean is not a data type of SQL 2000, I have to set any boolean columns to data type bit and use 1 and 0 to determine true and false.

I have a new application that pulls data from my SQL db. the CheckBox.selected value recognizes 1 and 0 and will check appropriately when I select a record in my database. However, when I need to add or update a record, CheckBox.selected wants to output as true or false, which my column will not accept. How can I get CheckBox to output a 1 or 0?

TextInput, how to align text vertically?

$
0
0
I have a textfield that I resized to be width=50, height=50. Unfortunately, instead of the line of text the user types appearing in the middle of the box, it is on a line just below the top of the box. I've tryed defining a style where I set the vertical-alignment to "middle" but that has no effect. Is there any way to do this?

<mx:TextInput
maxChars="5"
restrict="123456789"
styleName="background1"
width="50"
height="50"
/>

.background1 {
background-color: #f5f5f5;
font-size: 10px;
font-weight: bold;
text-align: center;
padding: 0px;
margin: 0px;
width: 50px;
border-spacing: 0px;
border: 0px
}

From ArrayCollection to Array in DataBinding

$
0
0

Hi,

 

I am trying to use somebody else's visual component (have src code of that mxml),

which uses Array items as a DataSource.

 

In my program I use ArrayCollection to hold my data (from the data feed - changes in real time).

I need to pass some data from my ArrayCollection into that component inside the binding,

something like:

<view:Component1  items="{dataArrayCollection}"?? />

 

currently have in Component1.mxml:

public function set items(a:Array):void {...}

 

Since that component is pretty complicated, I would not want to break its logic,

so I am thinking of adding some data adapter, public method to Component1 like:

 

public function set dataProvider(ac:ArrayCollection):void {

Array tempArr = new Array();

// copy some data from ac -> tempArr

items(tempArr);

}             

and do: <view:Component1  dataProvider="{dataArrayCollection}" />

 

Is there a more efficient way of doing that (I guess, "set dataProvider" will be called a lot, on each update)?

I don't think I can just straight convert ArrayCollection -> Array, need just a small subset of data.

 

Please advise.

 

TIA,

Oleg.

Playing YouTube Video in Spark VideoDisplay

$
0
0

Hello,

 

I am using the AS3 Google API which has a GoogleVideoSearch class that returns objects representing Google/YouTube videos.  These objects have a playUrl property that looks like this:

 

http://www.youtube.com/v/m1dv_y_3EK0&fs=1&source=uds&autoplay=1

 

This content appears to be a SWF, and youtube.com doesn't have a general crossdomain.xml policy file.

 

What would be the best way to play this content in a Spark Video control or is it even going to be possible?

 

Can I somehow load the bytes of the SWF into a Loader then attach those bytes to a VideoDisplay sort of like I do with Images from non-trusted sites


Eclipse Helios: Is the Flash Builder 4 plugin supported?

$
0
0

Two questions:

 

1) I recently discovered that a new version of eclipse has been released codenamed: Helios. I am wondering if anyone had any issues with installing the latest Flash Builder plugin?

 

2) Should I run off the 32 bit version of eclipse or can I use the 64 bit version?

 

Thx,

 

David

spark Labels text is not selectable - what to do ?

$
0
0

I am displaying data in spark Labels. Now I find that the user cannot select and copy the displayed text. The docs don't show what needs to be done (mx.Label allowed this but a spark label does not).

 

So what's the solution? How can I allow users to select and copy data displayed on my screen?

Flex upload #2038 I/O Error

$
0
0

Hi to all!!!!!

 

I coded an actionscript procedure which takes a list of files to upload and it begins to upload them one at a time.

The first file in the list is uploaded correctly (the file is loaded in the correct directory, I obtain the response from the server and also I write successfully file information into a mysql table ), but after a while a #2038 I/O error is fired.

I can't really understand what's going wrong since all the previous task are performed correctly.

 

The filereference variable is declared outside of any function so I don't miss the reference whene the functions' scope is cleared out.

 

Below the function code:

 

the fileUpload variable is declared outside the function. I just reinitialize it.

_uploadQueue is an array containing all the filereference objects which have to be loaded.

the index param is always zero because I always upload the first item in the list (...that's just for keep it ready for future changement)

 

private function uploadFileIndex(index:int):void{                    trace("uploadFileIndex-> ",index,this._uploadQueue.length)                    this.fileUpload=new FileReference()                    this.fileUpload=this._uploadQueue[index]                                                this.fileUpload.addEventListener(ProgressEvent.PROGRESS,this.progressUpload)                    this.fileUpload.addEventListener(DataEvent.UPLOAD_COMPLETE_DATA,this.responseUpload)                    this.fileUpload.addEventListener(Event.COMPLETE,this.finishUpload)                                this.fileUpload.addEventListener(IOErrorEvent.IO_ERROR,this.handleError)                        this.fileUpload.upload(this.uploadService)                        trace("uploadFileIndex-> load")                    if(grdUpload.alpha==0){                        this.fadeIn.play() //just an effect to display the queue                        }                        }

 

 

below the output:

 

uploadFileIndex-> load
Upload-> response:  File loaded
Upload error->  [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2038: Errore di I/O del file. URL: http://www.domain.com/php/fxUploadEcm.php?folder=ecm&idDirectory=3&overwrite=0&sId=---session_id---"] (flash.events::IOErrorEvent)#0  bubbles = false  cancelable = false  currentTarget = (flash.net::FileReference)#1    creationDate = Wed Feb 16 12:32:17 GMT+0100 2011    creator = (null)    data = (null)    modificationDate = Wed Feb 16 12:33:33 GMT+0100 2011    name = "usa_3.jpg"    size = 921849    type = (null)  errorID = 0  eventPhase = 2  target = (flash.net::FileReference)#1  text = "Error #2038: Errore di I/O del file. URL: http://www.domain.com/php/fxUploadEcm.php?folder=ecm&idDirectory=3&overwrite=0&sId=---session_id---"  type = "ioError"

 

the upload starts correctly, it traces the progress event correctly (which  also correctly updates a progress bar ).

The upload process ends correctly (I can trace the response of the php script).

After this.....kaboom!!!!

The #2038 error is fired.... :-(

 

Even more strange is that sometimes it uploads the first file and also the second, but then it crashes on the third file.....

 

Has somebody faced the same issue?

 

Thanks in advance.

best regards!!!!

 

P.S.

I'm on flash builder 4 on mac firefox

Error Items-90122: "Invalid Executable Size " the size of your app's executable file exceeds the maximum allowed size of 80 MB ,

$
0
0

Hi,

 

I am getting "Invalid Executable Size" error when i am trying to upload my app Ipa to iTunes , the same app was uploaded before without this issue, can any one help me to get out of this and to upload my app to iTunes ,Screenshot 2015-03-09 10.08.47_edited.png

 

 

Any help greatly appreciated....:)

 

 

Thanks in advance..

 

Thanks,

HariKrishnan

Find out Flex SDK Version from swf or swc file?

$
0
0

Given a

flex generated swf file or swc file, is it possible to find out the flex sdk version using which it was compiled? Please explain using code snippet.

BlazeDS and Flex Intergration Problems

$
0
0

Hello All.

 

I have  downloaded BlazeDS4 and installed it onto a windows server using  tomcat.  I have then been able to log into this server and use the  examples provided using this address - http://localhost:8080/   I should note, that this link also works on remote computers by giving  the correct IP address instead of localhost.

 

So i know  that Blaze is working fine.

 

But now i want to configure this with Flash  Builder 4, so that i can try and create my own apps.

 

I go "File  > New > Flex Project "

 

Then i select J2EE from Server Technology, and  then select "BlazeDS"

 

Now this is where i get stuck, I don't know what  settings to put for

 

"Root Folder"  "Root URL" "Context Root"

 

If for  example my server IP is - 10.1.2.12:8400

 

Could somebody talk thru me what  settings i need to use ? I keep getting a message

 

Invalid root. The WEB-INF/flex folder  must contain either flex-config.xml or services-config.xml.

 

If anyone  could help I would be thankful ! !

"Security error accessing url" even when staying on same domain, *and* I've got a crossdomain.xml

$
0
0

Hi All,

 

I've been working on a small app in Flash Builder.  It's hosted on my Windows 7 box, which is running IIS7.  I'm running some data services on my box, also hosted in IIS.

 

It's been working just fine when I pull it up locally, but after sending it to a coworker to get some feedback I discovered that from any other machine, the calls to the JSON data services are all failing with an error, "Security error accessing url".  My initial thought was that I had the wrong base URL, and sure enough, I did--my data services were configured to use the base URL http://localhost/.  I changed it to use my machine name, and thought that would fix it.  It did not.  I then decided to add a crossdomain.xml file, but it turns out it's already there from a previous project I did.  It's allowing all traffic (I included it at the end of this post).

 

So, my data service is on the same domain that the SWF is served from, and that domain also has a crossdomain.xml file in place that should allow access.  But for some reason, it's still failing with a security error.  Any suggestions on where to look next?  What might I have misconfigured?

 

<?xml version="1.0"?>

<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">

<cross-domain-policy>

    <allow-access-from domain="*" />

</cross-domain-policy>


how to disable items in DropDownList

$
0
0

Hi.

 

I'm using a data provider for a DropDownList that has a boolean field called "locked".ie.

 

<s:ArrayCollection id="dropDownListAC">
<fx:Object name="normal" locked="true" />
<fx:Object name="hard" locked="false" />
<fx:Object name="crazy" locked="false" />
</s:ArrayCollection>

 

how can i make it so individual items in the DropDownList are disabled if "locked" is true?

 

 

 

thanks!!

Closing FLEX current application using AS

$
0
0

I use the following code to close the current application using Action Script and JavaScript:

 

var urlString:String = "javascript:window.opener = self; self.close();";

var request:URLRequest = new URLRequest(urlString);

navigateToURL(request, "_self");

 

Then I got the message: SecurityError: Error #2121: Security sandbox violation: navigateToURL

 

Is there a way to solve the problem or should I use another way to close the current application from AS.

 

Regards,

PopUpManager problem

$
0
0

Hi

 

I am getting a weird error when trying to call addPopup() to add a custom popup. It's been working the whole time until I made some minor changes today that broke it, and now I can't seem to get it back in working order.

 

My code (fired on button click to open popup):

 

 

 

 

 

 

function openActionPopup(userObj:Object):void {

     var actionPopup:ViewEditDeletePopup = new  ViewEditDeletePopup();

      PopUpManager.addPopUp(actionPopup, this); 

}   

 

And in ViewEditDeletePopup.mxml I just have a Panel, which contains an HBox, which in turn contains 3 buttons.

When addPopUp is called, I get the following error: (apart from the error, the popup opens correctly and is completely functional. It's just the error that pops up every time.) My popup mxml does implement IFlexDisplayObject. It's funny because I have another popup elsewhere in the app that I create in the exact same way, but it does not produce the error. However, replacing the ViewEditDeletePopup.mxml with the other popup also doesn't work. I think the problem lies within PopUpManager itself.

The error:

 

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at mx.managers::PopUpManagerImpl/addPopUp()[E:\dev\4.x\frameworks\projects\framework\src\mx\ managers\PopUpManagerImpl.as:434]
at mx.managers::PopUpManager$/addPopUp()[E:\dev\4.x\frameworks\projects\framework\src\mx\man agers\PopUpManager.as:193]
at com.SecSA.employeesHR.views::ViewEmployees/openActionPopup()[C:\wamp\www\SecSAView\src\co m\SecSA\employeesHR\views\ViewEmployees.mxml:35]
at com.SecSA.employeesHR.views::ViewEmployees/__employeeGrid_itemClick()[C:\wamp\www\SecSAVi ew\src\com\SecSA\employeesHR\views\ViewEmployees.mxml:93]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[E:\dev\4.x\frameworks\projects\framework\src\mx\core \UIComponent.as:12528]
at mx.controls.listClasses::ListBase/mouseClickHandler()[E:\dev\4.x\frameworks\projects\fram ework\src\mx\controls\listClasses\ListBase.as:10319]

 

What could I be missing?

Thanks!

problem with a sqlite update statement using variables

$
0
0

Flash Builder/Flex 4

 

I'm trying to create a routine that will allow me to change the name of an author in a sqlite table.

 

I have this update statement which works with hardcoded data:

 

//trace("updateName function newAuthorName: " + newAuthorName (returns Dusty));

//trace("updateName function oldAuthorName: " + oldAuthorName (returns Kristin));

 

updateStmt = new SQLStatement();

updateStmt.sqlConnection = conn;

 

var sql:String = "UPDATE tableName SET authorNameColumn = 'Dusty' WHERE authorNameColumn = 'Kristin' ";

 

updateStmt.text = sql;

 

 

 

updateStmt.execute();

 

If I change the statement to

 

"UPDATE tableName SET authorNameColumn  =" +  newAuthorName +  "WHERE authorNameColumn =" + oldAuthorName;

I get SELECT error: SQLError: 'Error #3115: SQL Error.', details:'near 'authorNameColumn': syntax error'

 

I've tried changing many things about this statement trying to isolate the problem, but it seems to not like the variables.

Restrict Input to a Datagrid cell

$
0
0

I am trying to restrict my datagrid cell input so that it only accepts numbers. I create my Datagrid columns in actionscript instead of mxml.

I am trying to assign a textInput to ItemEditor property of datagridcolumn.

 

var newColumn : DataGridColumn = new DataGridColumn(s); // si s the header string

newColumn.editable = true;

 

var ti : TextInput = new TextInput();

ti.restrict = "0-9";

 

newColumn.itemRenderer = ti as IFactory;

 

However, this does not work. Anyone have better suggestions on restricting datagrid cell input ??

 

 

Thanks

Viewing all 46188 articles
Browse latest View live


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