[flexcoders] AS3 or Flex MXML to UML, OO architecture, use cases, object classes, sequence diagrams, and state diagrams

2008-07-30 Thread Pascal Schrafl
Hi all,

Does anyone of you know a tool, to reverse engineer a already existing 
Flex 3 application in order to create the OO architecture, use cases, 
object classes, sequence diagrams and state diagrams in UML?

Thanks a lot for your answers and best regards,


Pascal


Re: [flexcoders] onPress Event in Flex 2.0 on Button?

2006-11-15 Thread Pascal Schrafl
Hi Mike,

Thanks for your answer.

I wanted the second part, that the event gets fired as long as the 
button is pressed. Is there a way, how this can be done easily?

Thanks for your answer,

Pascal

Mike Keesey wrote:

 What do you mean by fires once, instead of the whole time? The 
 onPress callback function in older version of ActionScript also only 
 fired once, when the button was pressed.

 If you want something to be called on every frame while a button is 
 down, you’ll have to start listening for frame events on buttonDown 
 and stop listening for them on buttonUp.

 ―

 Mike Keesey




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



Re: [flexcoders] onPress Event in Flex 2.0 on Button?

2006-11-15 Thread Pascal Schrafl
Hi Andrew and camlinaeizerous,

autoRepeat=true did the job for me. I will check with the 
repeatInterval and the repeatDelay, perhaps it may enhance the function 
a bit.

Thank you very much, you made my day.


Cheers,

Pascal

Andrew Trice wrote:

 Just turn on the autoRepeat property of the button.

  

 mx:Button autoRepeat=true /

  

 You can adjust the repeatDelay and repeatInterval properties to adjust 
 the timing.

  

 -Andy

  

 _

 **Andrew Trice**

 Cynergy Systems, Inc.




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



Re: [flexcoders] VideoPlayer Example

2006-11-06 Thread Pascal Schrafl
Hi Marcel,

I didn't try that. But I will add this line of code to the application 
init function. I will post you my results.

Best regards,


Pascal

Marcel Fahle wrote:
 Hey Pascal,

 without looking at your code (but the symptoms are familar to me ;)):
 did you gave the domain www.youtube.com http://www.youtube.com 
 permission
 using Security.allowDomain()?



 Marcel


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



[flexcoders] VideoPlayer Example

2006-11-05 Thread Pascal Schrafl
Hi all,


I'm trying to build a videoplayer, that gets some urls from an XML file 
and then can play those .flv, that are located at those urls.

I looked at the Flex Manual and have used the NetConnection Example. Now 
as I plug the videoPlayer Component into my application, I suddenly only 
hear the sound, but don't see the video. I'm sure it is playing 
somewhere, just not there, where I want to to play.

I have the following class, that I use:

package youtube {
import flash.display.Sprite;
import flash.events.NetStatusEvent;
import flash.events.SecurityErrorEvent;
import flash.media.Video;
import flash.net.NetConnection;
import flash.net.NetStream;
import flash.events.Event;
import flash.display.StageScaleMode;
// import flash.display.StageAlign;
   
import flash.net.URLRequest;
import flash.net.URLLoader;

public class VideoPlayer extends Sprite {
 
private var videoURL:String // = 
http://www.youtube.com/get_video.php?video_id=seGhTWE98DUt=OEgsToPDskJTX-7s6JV2QE3tijPcNMT6.flv;;
private var connection:NetConnection;
private var stream:NetStream;
   
// variables for video url
private var loader:URLLoader;
private var videoID:String;

public function VideoPlayer() {
// stage.align = StageAlign.TOP_LEFT;
// stage.scaleMode = StageScaleMode.NO_SCALE;
trace(1. VideoPlayer instanziert)
connection = new NetConnection();
trace(2. new Net Connection);
// connection.addEventListener(NetStatusEvent.NET_STATUS, 
netStatusHandler);

connection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, 
securityErrorHandler);
trace(3. error handler eventListener);
connection.connect(null);
trace(4. connection(null));
}
   
public function playVideo(myVideoID:String):void
{
trace(videoID received in Method:  + myVideoID);
// First, load the YouTube video page to get the 't' parameter.
// See loadComplete()
trace(playVideo aufgerufen)
loader = new URLLoader();
loader.addEventListener(complete, loadComplete);
loader.load(new URLRequest(http://www.youtube.com/watch?v=; 
+ myVideoID));
trace(5. url request: http://www.youtube.com/watch?v=; + 
myVideoID);
videoID = myVideoID;
}

private function loadComplete(event:Event):void
{
// Extract 't' parameter, pass it to get_video.php
trace(6. loadComplete:  + event);
trace(videoID in loadComplete Function:  + videoID);
var t:String = String(loader.data).match(/t=[^]*/)[0];
trace(7. t String:  + t);
videoURL = http://www.youtube.com/get_video.php?video_id=; 
+ videoID + t + .flv;
trace(8. videoURL got from Server: 
http://www.youtube.com/get_video.php?video_id=; + videoID + t + .flv);
connectStream();
}
   
/*
private function netStatusHandler(event:NetStatusEvent):void {
switch (event.info.code) {
case NetConnection.Connect.Success:
trace(connectStream in netStatus Handler);
connectStream();
break;
case NetStream.Play.StreamNotFound:
trace(Stream not found:  + videoURL);
break;
}
}
*/
   
private function 
securityErrorHandler(event:SecurityErrorEvent):void {
trace(securityErrorHandler:  + event);
}

private function connectStream():void {
trace(connect Stream);
var stream:NetStream = new NetStream(connection);
// stream.addEventListener(NetStatusEvent.NET_STATUS, 
netStatusHandler);
stream.client = new CustomClient();
var video:Video = new Video();
// video.x = 1;
// video.y = 1;
video.height = 240;
video.width = 320;
// video.opaqueBackground = true;
video.attachNetStream(stream);
stream.play(videoURL);
trace(videoURL final:  + videoURL);
addChild(video);
}
}
}

class CustomClient {
public function onMetaData(info:Object):void {
trace(metadata: duration= + info.duration +  width= + 
info.width +  height= + info.height +  framerate= + info.framerate);
}
public function onCuePoint(info:Object):void {
trace(cuepoint: time= + info.time +  name= + info.name +  
type= + info.type);
}
}


In my videoDisplay component (it's a canvas) I use this code, to start 
the video:

import youtube.VideoPlayer;

public function play(videoID:String):void
{   
var videoplayer:VideoPlayer = new VideoPlayer();
videoplayer.x = 0;
videoplayer.y = 0;

[flexcoders] Fade Text in and out, when text variable is changed

2006-11-05 Thread Pascal Schrafl
Hi all,


I have some text, that gets retrieved from some variables (those 
variables get retrieved from an xml-file). I would like to fade in the 
text, when the variable changes and fade it out, when the old text is 
replaced by the new one (i.e. again the variable changes). I tried 
showEffect=Fade hideEffect=Fade but it didn't work. Can anyone point 
me in the right direction?


Thanks a lot for your answers and best regards,


Pascal


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



[flexcoders] DataTip on DataGrid: Change background color

2006-11-05 Thread Pascal Schrafl
Hi all,


I use some DataTips on a DataGrid (showDataTips=true). It works fine, 
but the DataTips have a yellow background. Where can I change this 
background color? I have tried to use the CSS Style:

DataTips
{
backgroundColor: #FF
}

but the background color of the DataTips didn't change.

Can anyone help me?

Thanks a lot,


Pascal


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



[flexcoders] Slider thumb controlling playheadTime of VideoDisplay

2006-11-04 Thread Pascal Schrafl
Hi all,


I have a slider thumb and would like to controll the playheadTime of a 
VideoDisplay with it. I therefore use this code:

?xml version=1.0 encoding=utf-8?
mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=340 
height=300

!-- video display --
!-- important, video sends the thumb position on progress event --
mx:VideoDisplay x=10 y=10 width=320 height=240 
id=videoShow source=http://www.online-editor.ch/flex/welcome.flv;
autoPlay=false maintainAspectRatio=true autoRewind=false 
playheadUpdateInterval=250 bufferTime=5
progress=playheadSlider.value = videoShow.playheadTime 
progressInterval=250 /

 !-- playhead scrubber, can we add the scrubber function here ?? --
 mx:HSlider x=10 y=270 width=320 id=playheadSlider 
allowTrackClick=true maximum={videoShow.totalTime} minimum=0
 enabled=true value={videoShow.playheadTime} 
thumbDrag=videoShow.playheadTime = playheadSlider.value /


!--  mx:HSlider x=10 y=270 width=320 id=playheadSlider 
allowTrackClick=true maximum={videoShow.totalTime} minimum=0
 enabled=true thumbDrag=playheadSlider.value = 
videoShow.playheadTime value={videoShow.playheadTime}
 change=videoShow.playheadTime = 
Math.round(playheadSlider.value)/ --
/mx:Canvas


Now, what happens is, that the slider thumb changes his position 
according to the playheadTime of the video. But when I drag the slider 
thumb with the mouse (and therefore fire the thumbDrag Event), the thumb 
jumps back to the playheadTime position. I think, this is so, because 
the progressInterval is set to 250 miliseconds and overrules the 
thumbDrag Event.
Can I somehow override the progress Event, so that when I drag the 
slider thumb, the playheadTime is adjusted?

Thanks a lot for your answer and best regards,


Pascal


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



[flexcoders] DataGridCollumn: Display formatted value

2006-11-03 Thread Pascal Schrafl
Hi all,


I have a DataGridCollumn where I display the time in Seconds (i.e. 77). 
I would like to convert the diplayed time into minutes and seconds.

I have a function, that converts the seconds into minutes and seconds, 
i.e. 1:17 The function is named secondsToMinuteString.

Here's the code:

   private function secondsToMinuteString(secs:Number):String
   {
   if (isNaN(secs) == false) {
   var m:Number = Math.floor(secs / 60);
   var s:Number = secs - (m * 60);
   var r:String = m + :;
   if (s  10) {
   r += 0;
   }
   return r + s;
   }
   return ;
   }
 
I now try to seconds of the DataGridCollumn, by using this approach:

mx:DataGridCollumn headerText=Duration dataField=length_seconds 
labelFunction=secondsToMinuteString(length_seconds) /

I try to pass the value, that is received to the function, and then it 
shall be displayed. This doesn't work, as I get a cast error (Error 
#1067) and an access of undefined property length_seconds error (Error 
#1120). Can anyone tell me, how I can convert this correctly?

I am still seeking for a Flex Developer, who could assist me. If you are 
interested, please let me know by private email.

Thanks a lot for your answers.

Best regards,


Pascal


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



Re: [flexcoders] DataGridCollumn: Display formatted value

2006-11-03 Thread Pascal Schrafl
Hi Igor,


Thanks for your answer.

As far as I understand the function, it gets one parameter passed in 
(secs in the function). The error is in the DataGridCollumn, there it's 
complaining, that it can not find the length_seconds value, although it 
is included in the XML, that gets retrieved. Must I first read out the 
value and then pass it? Or is my solution not usable in a 
DataGridCollumn? How can I access the value? perhaps by using 
video.length_seconds? (video is the xml returned).

Thanks for your answer and best regards,


Pascal

Igor Costa wrote:

 you are trying to access a undefined variable in my concern you didn't 
 have in your function the lengh_seconds but also just secs.


 Regards

 On 11/3/06, * Pascal Schrafl* [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:

 Hi all,

 I have a DataGridCollumn where I display the time in Seconds (i.e.
 77).
 I would like to convert the diplayed time into minutes and seconds.

 I have a function, that converts the seconds into minutes and
 seconds,
 i.e. 1:17 The function is named secondsToMinuteString.

 Here's the code:

 private function secondsToMinuteString(secs:Number):String
 {
 if (isNaN(secs) == false) {
 var m:Number = Math.floor(secs / 60);
 var s:Number = secs - (m * 60);
 var r:String = m + :;
 if (s  10) {
 r += 0;
 }
 return r + s;
 }
 return ;
 }

 I now try to seconds of the DataGridCollumn, by using this approach:

 mx:DataGridCollumn headerText=Duration dataField=length_seconds
 labelFunction=secondsToMinuteString(length_seconds) /

 I try to pass the value, that is received to the function, and
 then it
 shall be displayed. This doesn't work, as I get a cast error (Error
 #1067) and an access of undefined property length_seconds error
 (Error
 #1120). Can anyone tell me, how I can convert this correctly?

 I am still seeking for a Flex Developer, who could assist me. If
 you are
 interested, please let me know by private email.

 Thanks a lot for your answers.

 Best regards,

 Pascal



  



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



Re: [flexcoders] Re: DataGridCollumn: Display formatted value

2006-11-03 Thread Pascal Schrafl
Hi Andrew,


Thanks for your advice. Thank you for explaining me the function of 
labelFunction. I will try your approach and will let you know, if I had 
success.


Best regards,


Pascal

greenfishinwater wrote:

 This is an example of labelFunction that works for me:

 In mxml:
 mx:DataGridColumn headerText=Status dataField=price_status
 labelFunction=priceStatusLabel/

 The function in AS3:
 private function
 priceStatusLabel(item:Object,column:DataGridColumn):String {
 if (item.price_status == O) {
 return Open;
 } else if (item.price_status == C) {
 return Closed;
 } else {
 return item.price_status;
 }
 }

 For the labelFunction in the grid column you only specify the function
 name. The actual function has access to the data from the grid column.

 Andrew




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



[flexcoders] Flex Developer seeked for expert help

2006-10-29 Thread Pascal Schrafl
Hi all,

I'm seeking for a Flex 2 Developer, who could assist me in developing a 
small application (video player for youtube with some zinc functions, I 
just need to get that video displayed at the moment). I assume, that I 
would need about 2 hours of dedicated time. I seeking for an expert to 
whom I may ask my questions and perhaps the source code and get fast 
answers or assistance, as I'm spending to much time fiddling arround 
with Flex and I'm running out of time (and my deadline is looming ;-(().
Could you please let me know, if anyone is interested in helping me. I 
can pay some money, but as I'm a student, I don't have a hugh budget. 
I'm looking forward to your answers (preferably directly to my 
emailaddress and not to the list).


Best regards,


Pascal


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



[flexcoders] Autoscrolling Text

2006-10-28 Thread Pascal Schrafl
Hi all,

I wanted to ask, if somebody can let me know, how I can create a 
autoscroll text. As I will have a fixed screen size, I would like to 
display the text in a textbox, and check the text, if it surpasses a 
certain length. If the complete text can not be displayed in the textbox 
(as it is too small), I would like to create an automatic scrolling 
text, that just scroll the text down and then starts again. If the 
autoscrolling is too complicated, could I somehow implement a listender, 
that reacts on a mouse click on the textbox and then displays the next 
portion of the text?

Thanks a lot for your tipps.

Best regards,


Pascal


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



[flexcoders] Accessing methods in nested components

2006-10-24 Thread Pascal Schrafl
Hi all,

I'm new to Flex but used OpenLaszlo before. I must now build an 
application to use with Zinc for my studies and as OpenLaszlo is not 
supported by Zinc, I decided to use Flex 2.

I have several components and would like to call some methods in other 
components.

Here's my application structure:

main Application

component: login which is a panel
component: filenet which is a canvas

within the filenet component I have several different components:

component: sidebar which is a accordion.

within the sidebar, there is a component called:
component: addressBookTab which is a canvas
and in this component there is an other component called:
component: addressBook which is a canvas

in the addressBook component, I want to call a HTTPService, but I must 
call it, after the user has authenticated himself (using the login 
component). I use the getAddressBookEntries() Function to call the 
HTTPService.

I therefore have a function, that handles the login. If the server gives 
back a true, then I would like to call the HTTPService and load the user 
specific data.

I use the following command:

parentDocument.filenet.sidebar.addressbookTab.addressBook.getAddressBookEntries();
 


I use the parentDocument property to get out of the login component and 
then try to go all the way down to the addressBook component and call 
the appropriate function.

Unfortunately, I don't have any success, as the method doesn't get 
called. Am I doing something wrong?

There must be some way to call a method from a component within an other 
component. Perhaps I use to many components, and this causes the error? 
I have ensured, that all id's assigned are unique within the whole 
application.

I hope you can help me solve this problem. If it is useful to post the 
source code, just let me know.

Thanks a lot for your help.

Best regards,


Pascal



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



[flexcoders] Accessing a method in a component

2006-10-24 Thread Pascal Schrafl
Hi all,

I'm new to Flex but used OpenLaszlo before. I must now build an 
application to use with Zinc for my studies and as OpenLaszlo is not 
supported by Zinc, I decided to use Flex 2.

I have several components and would like to call some methods in other 
components.

Here's my application structure:

main Application

component: login which is a panel
component: filenet which is a canvas
 
within the filenet component I have several different components:

component: sidebar which is a accordion.

within the sidebar, there is a component called:
component: addressBookTab which is a canvas
and in this component there is an other component called:
component: addressBook which is a canvas

in the addressBook component, I want to call a HTTPService, but I must 
call it, after the user has authenticated himself (using the login 
component). I use the getAddressBookEntries() Function to call the 
HTTPService.

I therefore have a function, that handles the login. If the server gives 
back a true, then I would like to call the HTTPService and load the user 
specific data.

I use the following command:

parentDocument.filenet.sidebar.addressbookTab.addressBook.getAddressBookEntries();

I use the parentDocument property to get out of the login component and 
then try to go all the way down to the addressBook component and call 
the appropriate function.

Unfortunately, I don't have any success, as the method doesn't get 
called. Am I doing something wrong?

There must be some way to call a method from a component within an other 
component. Perhaps I use to many components, and this causes the error? 
I have ensured, that all id's assigned are unique within the whole 
application.

I hope you can help me solve this problem. If it is useful to post the 
source code, just let me know.

Thanks a lot for your help.

Best regards,


Pascal



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



Re: [flexcoders] Accessing methods in nested components

2006-10-24 Thread Pascal Schrafl
Hi Tracy,

Thanks for your answer. And sorry for the trippe posting. I used the 
mx.core.Application.application approach too, but I always get an error 
#1069. I have no clue, why it doesn't work. From the nested component 
(addressBook) I can access the sessionID by using 
parentDocument.parentDocument.parentDocument.sessionID but not vice-versa.

Best regards,


Pascal



Tracy Spratt wrote:

 Your theory looks ok.

 Can you successfully access anything in the main application scope 
 using parentDocument? 

 If not, try using Application.application instead.

 Once you can hit the application level members, work your way down to 
 whre you need to be.

  




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



Re: [flexcoders] Accessing methods in nested components

2006-10-24 Thread Pascal Schrafl
Hello Gordon,


Thanks for the hint. I will try this. I didn't know, that the 
parentDocument must be cast, because I use it also 
(parentDocument.currentState='') and there it works. I will try it and 
give you a feedback, if it solved my problem.

Best regards,

Pascal


Gordon Smith wrote:

 If you cast parentDocument to your application class, the compiler can 
 tell you whether you've constructed the right expression or not. For 
 example, if your app is MyApp.mxml, then do

  

 MyApp(parentDocument).filenet...

  

 Without the cast, it can't typecheck anything because parentDocument 
 is a generic Object on which you can access anything dynamically, 
 including things that don't exist.

  

 - Gordon




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



Re: [flexcoders] Accessing methods in nested components

2006-10-24 Thread Pascal Schrafl
Hi Gordon,

My main application is called main.mxml and I have tried to cast it:

main(parentDocument).filenet.sidebar.addressbookTab.addressBook.getAddressBookEntries();

I still get the Error #1069.

Thanks for the help.


Best regards,


Pascal


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/