[flexcoders] Re: Flex 4 CSS

2011-08-23 Thread Netaman
Have you tried; This is using flex 4, the following workaround;
Where the image would be the same size as the container
mx:Image id=backgroundImage   styleName=backgroundImage
alpha=.8 source={backgroundImage.getStyle('source')} 
maintainAspectRatio=false/


then in the CSS, you add the following;
mx|Image.backgroundImage{
source: Embed(/assets/images/someimage.png); 
width:580;
height:246;
x:114;
y:161;  
border: 1px green solid;
}

You can extend bordercontainer and add code to handle a style change;
public override function styleChanged(styleProp:String):void {
// code to handle element properties and not just styles
// such as x, y, height and width handled in css
}

If you need code example, then just write back to me and I will supply with 
what you need, as time permits.

--- In flexcoders@yahoogroups.com, Davidson, Jerry jerry.davidson@... wrote:

 I tried both BorderContainer and Panel, but neither would display an
 image.  I can get the background color to change, but not add an image.
 
  
 
 Perhaps a skin will work, but I can't get it to work so far.  I've
 replaced the two lines of CSS with the default class panel skin which
 is over 300 lines long, includes three overrides and other methods and
 still doesn't seem to have an ability to add an image.
 
  
 
 Who would have guessed a simple image would bring Flex to its knees?
 
  
 
  
 
  
 
 From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On
 Behalf Of valdhor
 Sent: Friday, August 19, 2011 1:59 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Flex 4  CSS
 
  
 
   
 
 Instead of using mx:Canvas try using s:BorderContainer.
 
 ?xml version=1.0 encoding=utf-8?
 
 s:Application xmlns:fx=http://ns.adobe.com/mxml/2009;
 
 xmlns:s=library://ns.adobe.com/flex/spark
 
 xmlns:mx=library://ns.adobe.com/flex/mx
 
 
 
 fx:Style
 
 .bgImage
 
   {
 
 color: #DEDACF;
 
 contentBackgroundColor: #DEDACF;
 
 backgroundImage: Embed(BannerBackground.jpg);
 
 backgroundImageFillMode: repeat;
 
 }
 
 /fx:Style
 
 
 
 s:BorderContainer width=100% height=600 styleName=bgImage
 
 s:Label text=CSS Background test /
 
 /s:BorderContainer
 
 
 
 /s:Application





[flexcoders] Re: Motion JPG and PCM Audio in AVI

2011-08-08 Thread Netaman


--- In flexcoders@yahoogroups.com, Netaman rtigrett@... wrote:

 Is it possible to play an AVI with Motion JPG and PCM Audio(wav) in flex?
 
 I know about standingwave3 to play audio, does anyone have an algorithm to 
 parse the video and audio from the AVI in actionscript?
 
 Randy


Yes it is possible, took the weekend, but I can play AVI, just bytes ready to 
be read, attached is the application, also had to do some c work in the 
standingwave3 lib so that it plays 16bit 16Khz 1 channel WAVs, 


?xml version=1.0 encoding=utf-8?
s:Application xmlns:fx=http://ns.adobe.com/mxml/2009; 
   xmlns:s=library://ns.adobe.com/flex/spark 
   xmlns:mx=library://ns.adobe.com/flex/mx 
   minWidth=955 minHeight=600 creationComplete=readAVI()
fx:Declarations
!-- Place non-visual elements (e.g., services, value objects) here --
/fx:Declarations

fx:Script
![CDATA[
import com.noteflight.standingwave3.elements.Sample;
import com.noteflight.standingwave3.formats.WaveFile;
import com.noteflight.standingwave3.output.AudioPlayer;

import mx.collections.ArrayCollection;

import spark.collections.Sort;
import spark.collections.SortField;
private static const RIFF:Number = 1380533830;
private static const AVILIST:Number = 1279873876;
private static const AVIIDX:Number = 1768192049;
private static const AVIMOVI:Number = 1836021353;
private static const AVIVID:Number = 808477795;
private static const AVISND:Number = 808548194;
private static const AVIVIDCOMP:Number = 808477794;


public var player:AudioPlayer=new AudioPlayer(4096);
public var soundBytes:ByteArray;



public var aviBuffer:ByteArray;
public var wavData:ByteArray = new ByteArray();
public var imageArray:ArrayCollection = new ArrayCollection();
public var myTextLoader:URLLoader = new URLLoader();

public var indexCnt:int = 0;
public var loader:Loader;
public var AU:AVIUtility = new AVIUtility(); 


public var timer:Timer = new Timer(34);  
public function readAVI():void {
myTextLoader.addEventListener(Event.COMPLETE, onLoaded);
myTextLoader.dataFormat=  URLLoaderDataFormat.BINARY;
myTextLoader.load(new URLRequest(lf_8.avi));
}

function onLoaded(e:Event):void {
trace(finished loading video);
aviBuffer = ByteArray(e.target.data);
while (findAudio()){

}
trace(Images + (indexCnt-1).toString());
timer.addEventListener(TimerEvent.TIMER,changeImage);  
timer.start();
createAudio();
}

private var index:int = 0;  
private function changeImage(e:TimerEvent):void{  
if (imageArray.length  0)
return;
var status:Boolean = true;
for (var h:int = 0;himageArray.length;h++){
status = status  imageArray[h].status;
if (status == false)
return;
}


pageViewer.source = imageArray[index].storedImage ;  

if(indeximageArray.length-1)  
index++;  
else  
timer.stop();;  
}  

private function findAudio():Boolean{
var startAudio:ByteArray = new ByteArray();
var a:int = 0;
var sizeU:uint;
var audio:ByteArray;
var foundAll:Boolean = false;
if(aviBuffer.length  1){
for (a;aviBuffer.position=aviBuffer.length -1;){
 sizeU = aviBuffer.readUnsignedInt();
 aviBuffer.endian = Endian.LITTLE_ENDIAN;
 switch (sizeU){
 case RIFF:
 //trace(RIFF);
 sizeU = aviBuffer.readUnsignedInt();
 //trace(Size: + sizeU.toString() +  Pos: + 
aviBuffer.position.toString());
 break;
 case AVILIST:
 //trace(LIST);
 sizeU = aviBuffer.readUnsignedInt();
 //trace(Size: + sizeU.toString() +  Pos: + 
aviBuffer.position.toString());
 break;
 case AVIIDX

[flexcoders] Re: Center Image while rotating and keeping aspect ratio

2011-08-05 Thread Netaman

Wrote a function to center image it works, it maybe a starting point for you so 
that you can write your own function. using 4.01

public var oldImage:String;

private function centerImage(rImage:Image):void {

 
var capImg:Image = new Image();
var newImage:Bitmap = new Bitmap();
var ch:Number = 0;
var cw:Number = 0;
var ih:Number = 0;
var iw:Number = 0;
var mX:Number = 0;
var mY:Number = 0;

capImg = rImage;
/* the following is to reduce the image flicker in a list using 
an itemrenderer*/
if (oldImage != null  capImg.source == oldImage)
return;
else
oldImage = String(capImg.source);


newImage  = new Bitmap(Bitmap(capImg.content).bitmapData);

ch = HEIGHTNUMBER;
cw = WIDTHNUMBER;
ih = capImg.content.height;
iw = capImg.content.width;

if (ih iw){
cw = iw*ch/ih;   
} else if (ihiw){
ch = ih*cw/iw;  
}

mX = (WIDTHNUMBER - cw) /2;
mY = (HEIGHTNUMBER - ch) /2;

capImg.x = mX;
capImg.y = mY;
capImg.width = cw;
capImg.height = ch;
capImg.source = newImage;  
   

}



[flexcoders] Motion JPG and PCM Audio in AVI

2011-08-05 Thread Netaman
Is it possible to play an AVI with Motion JPG and PCM Audio(wav) in flex?

I know about standingwave3 to play audio, does anyone have an algorithm to 
parse the video and audio from the AVI in actionscript?

Randy 



[flexcoders] Multiple Select DropDownList Custom Component Help

2010-07-20 Thread Netaman
I have a start of a custom component, that should based on the List component, 
allow for multiple selections.

Any help would be greatly appreciated, thanks

Randy

package com.somecompany.pm.Components
{
import flash.events.Event;
import flash.events.KeyboardEvent;

import spark.components.DropDownList;

public class MultiDropDownList extends DropDownList
{

private var _ctrlKey:Boolean = false;
private var _selectedIndices:Vector.int;
private var _selectedItems:Vector.Object

public function MultiDropDownList() {
allowMultipleSelection = true;
super();
}

override public function closeDropDown(commit:Boolean):void{
if (!ctrlKey)
super.closeDropDown(true);
} 

override protected function keyDownHandler(event:KeyboardEvent):void {
super.keyDownHandler(event);
ctrlKey = event.ctrlKey;

if (ctrlKey)
allowMultipleSelection = true;
}

override protected function keyUpHandler(event:KeyboardEvent):void {
super.keyUpHandler(event);
ctrlKey = event.ctrlKey;

if (!ctrlKey) {
closeDropDown(false);
dispatchEvent(new Event(change,true));
}
}

override public function set selectedItems( value:Vector.Object):void 
{
_selectedItems = value;
}

[Bindable(event=change)]
override public function get selectedItems():Vector.Object {
return _selectedItems;
}

override public function set selectedIndices(value:Vector.int):void {
_selectedIndices = value;
}

[Bindable(event=change)]
override public function get selectedIndices():Vector.int {
return _selectedIndices;
}


public function get ctrlKey():Boolean {
return _ctrlKey;
}

public function set ctrlKey(value:Boolean):void  {
_ctrlKey = value;
}

}
}



[flexcoders] Re: Flex Project Management App

2010-07-12 Thread Netaman
You can create a array of component names such as;
spark.components.Button
spark.components.TextInput
spark.components.CheckBox
spark.components.Label
spark.components.RadioButton
spark.components.DropDownList
mx.controls.DataGrid
spark.components.TextArea
mx.controls.DateField
then pass want you want into this function;
   private function makeElement(className:String, 
COMPONENTID:String):UIComponent {
var objClass:Class = getDefinitionByName( className ) as Class; 

if( objClass != null ) {
var newObject:UIComponent = UIComponent( new objClass() );
newObject.id = COMPONENTID;
newObject.name = COMPONENTID;
return newObject;
} 
else 
return null;
}


then create a switch that looks at the resulting element and add any styles, or 
other properties to the element, or other elements, and add then to your 
container. The dropdown and datagrid will require extra code to provide a 
dataprovider, and you will have to add the default skin by a setStyle, but that 
should get you going in the right direction.

one cavot is that the id is not searchable you will have to search by name in 
the container, if you want to change the element after you add it to the 
container.

I create elements dynamically by quering a database to create the elements 
needed in a flex applicaton, the structure and flow of forms are all in the 
database and I use flex to create the components on the fly...  

Randy 

--- In flexcoders@yahoogroups.com, Angelo Anolin angelo_ano...@... wrote:

 Hi FlexCoders,
 
 I came across a Flex PM site and I would like to ask what are the necessary 
 controls / things I need to do to achieve the same application.
 
 The site's page is:
 
 http://www.radscientist.com/flexpm/demo/index.html
 
 I am having problems re-creating those items which expands when the plus sign 
 is 
 clicked as well as adding new items when the Add Milestone button is clicked. 
  How do I achieve adding controls on the fly on the application?
 
 I hope you could provide some guidance on this.
 
 Thanks.
 
 Angelo





[flexcoders] Re: The lifespan of flex.

2010-07-12 Thread Netaman

The question you have to ask is how long will HTML5 be supported before HTML6-8 
takes over the browser, also it looks like not all implementations of HTML are 
the same, so more browser supported third party javascript addons to handle the 
multitude of html5 workarounds...

Flex is a fun language to code in and when it life is over it will create a 
vacuum for the next best application development environment, but by that time 
hopefully there will be direct connects to the brain for application 
development and some of the best development done while we sleep.

IMHO

Randy
--- In flexcoders@yahoogroups.com, Wesley Acheson wesley.ache...@... wrote:

 Hi,
 
 One of our clients is expressing concerns over the over all lifespan of
 flex.
 
 Some of his specific worries are to do with the way flash isn't allowed on
 certain apple mobile devices and the initial implementations of HTML5 which
 is obviously backed by the W3C.  Their concern is that flex won't be a
 supported product 5 years down the line and/or the changes in browser
 technology by that point will render flash obsolete.
 
 Have any studies been done about the long term feasibility of flex?  Are
 Adobe commited to a long term existence of the product? Is there any public
 evidence of large firms using it successfully?
 
 Regards,
 
 Wesley Acheson





[flexcoders] Re: flex 4 - NavigatorContent question / element parent

2010-06-16 Thread Netaman

I use viewStack.removeAllChildren();

also, what I do with the NavigatorContent, is everytime I create a new 
NavigatorContent container I load the resulting child UI component object into 
an arrayCollection then when I need to get to the object inside the 
NavigatorContent I use the viewStack.selectedIndex as an index to the 
ArrayCollection to manipulate the object, or generate a popup, etc...

public function setNavContent(navLabel:String, newView:*):void {
var itemNav:NavigatorContent = new NavigatorContent();
itemNav.label = navLabel;
itemNav.addEventListener(MouseEvent.DOUBLE_CLICK, 
circleD.editForms);
itemNav.doubleClickEnabled = true;
itemNav.minHeight = 300;
itemNav.minWidth = 400;
itemNav.addElement(newView);
circleD.peViewStack.addChild(itemNav);
}

Where navLabel is a tab string and newView is a UI component usually a 
composite component 

If you need a whitewashed code example let me know.

Randy
--- In flexcoders@yahoogroups.com, bhaq1972 mbha...@... wrote:

 myPanel.owner is the same as myPanel.parent so that won't work.
  
 Making it a property would work. What would the disadvantages be with using 
 myPanel.parent.parent.parent (a trace shows this to be the navigatorcontent)?
 
 I wonder why there is no such property like 'elementParent' to go with 
 addElement()  analagous to 'parent' and addChild()?
 
 one follow up question -
 I'm now adding the NavigatorContent to a viewstack.
 When i do viewstack.removeChild(nc), how do i make sure nc (naviagtorcontent) 
 is destroyed?
 thanks
 
 
 --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
 
  Or make nc a property of the class so you can use it in any method.
  
  --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
  
   Try myPanel.owner
   
   
   On 6/9/10 8:23 AM, bhaq1972 mbhaque@ wrote:
   
   
   
   
   
   
   I added a Panel component into a NavigatorContent
   
   public function aMethod():void
   {
var nc:NavigatorContent = new NavigatorContent();
   
   nc.addElement(myPanel);
   }
   Now, in another method I want to access this NavigatorContent
   
   eg
   public function anotherMethod(myPanel:Panel):void
   {
   var nc:NavigatorContent = myPanel.parent as NavigatorContent;
   
   however nc is not myPanel.parent.
   
   doing a trace, the navigatorContent is actually
   the myPanel.parent.parent.parent
   
   Is there not a property/method which gets me a reference to the element 
   Parent
   
   (a bit like addChild() / parent relationship)
   
   
   
   
   
   
   --
   Alex Harui
   Flex SDK Team
   Adobe System, Inc.
   http://blogs.adobe.com/aharui
  
 





[flexcoders] Re: Jazzing Up Your Flex Applications

2010-06-16 Thread Netaman
Check out TourDeFlex, some stunning effects, also look into changing the layout 
for lists, etc to make stunning effects. If you havn't looked into LCDS for 
RTMP. Real Time Messaging is very cool, and allows the application to be 
updated from the server, instead of pulling data from the server it is pushed 
to you.

Randy 

--- In flexcoders@yahoogroups.com, Angelo Anolin angelo_ano...@... wrote:

 Hi Flexcoders,
 
 Am looking for some possible recommendations for ideas on how to jazz up an 
 application.  Jazz up means, placing effects, transitions, animations, etc. 
 which would make the user be amazed and astounded on the visuals of the 
 application.
 
 Although I am not a designer by nature, I know that through Flex, once could 
 make the applications really look good and function awesome visually.
 
 Would anyone share how they make their applications visually stunning with 
 effects, animations and transitions?
 
 I saw an application on Bill White's blog 
 (http://www.billdwhite.com/wordpress/?p=98) where there's a good amount of 
 effects in place to make the application stunning.
 
 Would you be able to share me as well some screenshots or samples of your 
 application (business, data-aware) where I could reference as to make my 
 applications behave and look visually good.
 
 Thanks.
 
 angelo





[flexcoders] Re: Have a Spark List with an Itemrenderer

2010-06-01 Thread Netaman


I figured it out;

Add an addEventListener FlexEvent.UPDATE_COMPLETE to the List component, and in 
the event function;

 public function eventcalledfunction(event:FlexEvent):void {
 if (List.dataGroup.getElementAt(0) == null)
 return;
 var newVar:ArrayCollection = new ArrayCollection();
 newVar = this.parentDocument.formArray as ArrayCollection;
 var i:int = 0;
 var j:int = 0;
 
 for (i=0;iList.dataGroup.numElements;i++) {
 var rRenderer:ListRenderer = List.dataGroup.getElementAt(i) as 
ListRenderer;
 var rPanel:Panel = rRenderer.panelComponent as Panel;
 rPanel.removeAllElements();
 }   
 
 for (i=0;inewVar.length;i++) {
 var sRenderer:ListRenderer = List.dataGroup.getElementAt(i) as 
ListRenderer;
 var sPanel:Panel = sRenderer.panelComponent as Panel;
 sPanel.addElement(newVar[i]); 
 }
 }



Randy

--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 I'd add more smarts to the ItemRenderers so they can add the elements 
 themselves.
 
 
 On 5/29/10 7:56 AM, Netaman rtigr...@... wrote:
 
 
 
 
 
 
 I have a spark List that uses an itemRenderer to add a empty panel. I then 
 have a dynamic list of components that I need to add to each panel in the 
 List. How can I addElement to the itemRenderer panel in the List, after the 
 list is displayed?
 
 I have seen the List dataGroup indexToRenderer array and would be perfect, 
 but it is a private variable, I have looked for a function that would 
 retrieve the index, but sadly could not find one.
 
 Any help would be appreicated, thanks
 
 Randy
 
 
 
 
 
 
 --
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui





[flexcoders] Have a Spark List with an Itemrenderer

2010-05-29 Thread Netaman
I have a spark List that uses an itemRenderer to add a empty panel. I then have 
a dynamic list of components that I need to add to each panel in the List. How 
can I addElement to the itemRenderer panel in the List, after the list is 
displayed?

I have seen the List dataGroup indexToRenderer array and would be perfect, but 
it is a private variable, I have looked for a function that would retrieve the 
index, but sadly could not find one. 

Any help would be appreicated, thanks

Randy



[flexcoders] Dynamic skin on spark.component.textinput

2010-05-04 Thread Netaman
I stripped away most of the code and just have all the pertinent parts.

The UIComponent is used because I don't know what class I will be adding to the 
application, I have hard coded the string for clarity.
What I am trying to do is dynamically create a textinput spark component, 
but running into a problem with the skin class, when I create the UIComponent 
the skin is null and I get an exception when I add it to the HGroup.

So thought that if I added the skinclass before I added the element to the 
HGroup it would work.

Does anyone have any example code to set the skinclass of a textinput 
dynamically?

private function createTextInput():void {
var objClass:Class = getDefinitionByName( spark.components.TextInput 
) as Class;  
var newObject:UIComponent = UIComponent( new objClass() );  

var xObject:HGroup = new spark.components.HGroup();
var newLabel:Label = new spark.components.Label();
newLabel[ text ] = First Name:;
newObject[skinClass] = spark.skins.spark.TextInputSkin;
newObject.percentWidth = 20;
xObject.addElement(newLabel);
xObject.addElement(newObject);
this.addElement( xObject );
}



[flexcoders] Re: ExternalInterface : debugging, DOM, Export Release Build

2010-02-11 Thread Netaman
I make changes in the html-template directory in the file index.template.html 
in flex 3 these changes do not get overridden when added to the html wrapper, 
remember to do a clean then build. 

Randy

--- In flexcoders@yahoogroups.com, Tim Romano tim.rom...@... wrote:

 My browser-deployed Flex app, built in FB4, is using the 
 ExternalInterface. The Flex app gets some search terms from the user, 
 goes out to a webservice for some data, and then pushes some html markup 
 out to a DIV in the HTML document using the ExternalInterface.call() 
 method.
 I send the content across the bridge as a parameter to javascript 
 function that appends a child to the target DIV. Nice and simple with 
 the EI. However, I have a couple of questions about the logistics of 
 developing this sort of application in FlashBuilder.
 
 When Export Release Build is chosen from the Project menu in FB4, it 
 destroys and recreates the HTML deployment wrapper for the SWF. Is there 
 any way for the developer to provide an HTML document template to FB, 
 marked up with comments/metadata tags, such that only the Adobe 
 browser-sniffing code and SWF-embed code gets overwritten but the rest 
 of the HTML document (the user-portion) remains intact?
 
 Also, is it possible to set up a project in FB4 that uses the 
 ExternalInterface, where you can step through code in the debugger and 
 also see pushed content being rendered in the HTML document hosting the 
 SWF?  In debug mode it seems not possible to work with your actual HTML 
 host document and its javascript functions-- or am I missing something 
 obvious? I am pretty new to FB and that could easily be the case.
 
 Finally, will future versions of the ExternalInterface expose the DOM of 
 the hosting document via ActionScript object wrappers?
 
 Thanks





[flexcoders] Re: popup window send event to main screen

2009-10-19 Thread Netaman
Yes you can, A quick overview - Create an Event meta tag  
create a class for the meta event that extends the Event and 
then dispatch your event that bubbles to the main application 
from your popup.

read here;
http://livedocs.adobe.com/flex/3/html/help.html?content=createevents_3.html

Of course if you are looking to create flex software that incorporates events 
then read the rest of the message.

You might want to look at a framework like puremvc, or a more complex framework 
like cairngorm, these use an more complex event driven model, view, controller, 
I personally keep it simple and apply a easyMVC architecture. Anyone can make 
it complex, keeping it simple is Genius. By keeping it simple I can apply my 
own algorithms to software development having used for the last 27 plus years 
of on the job training.

read on if you want my candid opinion about frameworks.

So when you look at a programming model and it looks simple then you have the 
freedom to think outside the box, some software industry pundits have placed a 
big giant box in front of you saying learn this to solve the whatever comes up 
in the everyday software development, basically placing you inside a box, just 
a bigger box, saying this will lead you to quicker development, share the same 
core logic between programs, so on and so forth, but if you look closely enough 
and see that all their patterns and verbiage is just the framework a learning 
exercise, nothing wrong with learning, use what you like and discard the rest. 

The biggest pattern to solving the software development algorithms of tomorrow 
and today is on a web search engine page, I have found that by searching the 
web it's the biggest pattern solver of them all, better then any framework. I 
am more a web research software developer then software developer, design and 
function from a web search to figuring out the next software steps. 

The one thing I see the industry doing is following a framework, thinking it to 
be the greatest thing since bytes came in a core, but they miss the point, that 
by making pointless framework constructs/ additions to a software architecture 
they have diluted the meaning of the framework, making it hard to grow, making 
it complex.

No one person or group of persons has the intelligence to lead you down a path 
of programming enlightenment, just a bunch of software developers that dream in 
code. 

Randy





--- In flexcoders@yahoogroups.com, markflex2007 markflex2...@... wrote:

 Hi,
 
 Do you think if it is possible for popup Flex window to send event to main 
 Application screen?
 
 Thanks
 
 Mark





[flexcoders] Re: Question for Math guys/girls

2009-10-19 Thread Netaman
What if the user should make the line shorter then 100 pixels does the marker 
go away, I don't think it's math more like an array collection of markers. You 
save the x,y coordinates of the marker, as the line gets bigger or smaller you 
replace the markers that fit on the line from the array's x,y coordinates... 
Add an click event listener to your container with the line, then create a 
function to add the x,y coordinates to an array. Without a code example I can 
only guess what you are trying to accomplish. You can create a timer to refresh 
your container with the markers from the array, or generate another event when 
the line changes length, or you add another marker.

Do you have any code to share?
 
Randy

--- In flexcoders@yahoogroups.com, flexaustin flexaus...@... wrote:

 I have a line which can be horizontal or diagnol, and the user can make it 
 longer or short by dragging an end.
 
 If the user should click anywhere on the line I need to keep track of this 
 and place a marker or callout over this clicked spot on the line at all 
 times.  So if the user clicks say 1/4, say 100 pixels from the bottom of the 
 line) the way down from the top left of a diagonal line I need to put a 
 marker there. Then if the user drags the line to make it twice as long I 
 still need that marker to be in the same spot. 
 
 How would I do this math wise?  And no I don't want it to be a percentage of 
 the length of the line. Meaning I always want the spot to be 100 pixels from 
 bottom of the line.
 
 TIA, J





[flexcoders] Flex with Sharepoint

2009-09-24 Thread Netaman
Does anyone have a better way of integrating Flex with Sharepoint then with a 
ColdFusion remote call to a C# app;

C# code here 

using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Net;
using System.Text;

namespace pathBugLibrary1
{
public class pathBug1
{
public String getURLData(string urlName,string username, string 
password)
{
CookieContainer Cookies = new CookieContainer();

WebRequest request = WebRequest.Create(urlName);
request.Credentials = new NetworkCredential(username, password);
request.Method = GET;

WebResponse response = request.GetResponse();
//string responseFromServer = 
(((HttpWebResponse)response).StatusDescription);
Stream dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
reader.Close();
response.Close();
return (responseFromServer);
}
}
}

I am doing a screen scrape from Sharepoint in ColdFusion and returning all the 
pertenient data back to Flex for display and user interaction.

ColdFusion 8 code here for .Net 
cfobject type=.NET  action=create
 class=pathBugLibrary1.pathBug1 assembly=pathBugLibrary1.dll  
name=pathBug1
cfset foo = pathBug1.getURLData 
(http://serveraddress/PATH/webpagename,username,password;)  

then you can parse foo for specifics, and return any data you need back to flex

I am looking for a better way to use the sharepoint data with a flex frontend, 
the code above works, just alot of web data parsing on my end

Randy


 




[flexcoders] Re: Double click on Datagrid cell

2009-09-15 Thread Netaman
Can you add an eventlistner to the vbox so that when the mouse key clicks you 
get a function call?

for example;

?xml version=1.0 encoding=utf-8?
mx:WindowedApplication xmlns:mx=http://www.adobe.com/2006/mxml; 
layout=absolute creationComplete=init()

mx:Script
![CDATA[
import mx.controls.Alert;

private function init():void {
vboxtest.addEventListener(MouseEvent.MOUSE_DOWN,mouseDidSomething);
}
private function mouseDidSomething(event:MouseEvent):void {
Alert.show(mouse it);
}
]]
/mx:Script

   mx:VBox id=vboxtest borderStyle=solid width=300 height=300
   
   /mx:VBox
/mx:WindowedApplication


--- In flexcoders@yahoogroups.com, Angelo Anolin angelo_ano...@... wrote:

 Could you try to declare the double click event on the datagrid, i.e.
 
 mx:DataGrid id=myDataGrid doubleClick=yourDoubleClickFunction()
   mx:columns
     .
   /mx:columns
 /mx:DataGrid
 
 and in your script, declare the function 
 
 private function yourDoubleClickFunction():void
 {
     // Place your codes here.. 
 }
 
 HTH.
 
 
 
 
 
 From: ferrari.hunk ferrari.h...@...
 To: flexcoders@yahoogroups.com
 Sent: Wednesday, 9 September, 2009 22:43:28
 Subject: [flexcoders] Double click on Datagrid cell
 
   
 Hi,
 
 I'm developing an application where I'm using a datagrid that shows some 
 information from an xml. Every cell in the grid is of the form
 itemRenderer
 compoment
 Vbox
 HBox
 Text/ //some text goes within this block
 Text/ //some text goes within this block
 Text/ //some text goes within this block
 /Hbox
 /VBox
 /component
 /itemRenderer
 
 I have set a function call for the datagrid on ItemDoubleClick event; and 
 this even gets triggered only when i double click on any TEXT that is on the 
 cell; and NOT on any part of the cell. However, I would like to have this 
 triggered when the user clicks anywhere in the cell.
 Sombody please help,
 
 Thanks!!





[flexcoders] Remote object call gives forbidden 403 response

2009-02-18 Thread Netaman

Is there a simple fix for the following message?

faultDetail = Channel.Connect.Failed error NetConnection.Call.Failed: 
HTTP: Status 403: url: 

IIS frontend Cold Fusion 8 backend

Randy



[flexcoders] Flex Remote object call - in vmware

2009-02-18 Thread Netaman
Has anyone ran into the problem of Flex remote object call working for 
about 10 minutes and then failing on all the channels. 

The setup is a IIS 6.0 server front-end facing the Internet and the 
private network on a virtual host (vmware), and Cold Fusion 8 back-end, 
with Flex 3 application making remote calls through CF to SQL server 
2005. All servers are in a vmware environment.

Randy