Adobe Dreamweaver Forums



Last 10 THreads :         DW8 Activation not working (Last Post : moonliner - Replies : 0 - Views : 1 )           »          Creating a boundry in the stage... (Last Post : Rob Dillon - Replies : 1 - Views : 2 )           »          Re: Mouse capture won't activate (Last Post : robertnagle - Replies : 0 - Views : 1 )           »          help! my FB3 has gone insane! (Last Post : peteandrus - Replies : 0 - Views : 1 )           »          help! my FB3 has gone insane! (Last Post : peteandrus - Replies : 0 - Views : 1 )           »          How come the html is being displayed, and not the link (Last Post : Skaterstu - Replies : 0 - Views : 1 )           »          Another way to accomplish this (Last Post : Andy-K - Replies : 2 - Views : 3 )           »          HELP! Cannot upload files in DW CS4 (Last Post : dan@hoppernet.org - Replies : 6 - Views : 7 )           »          Adobe Flash 10 kills Wimpy (Last Post : m77ty8uu - Replies : 32 - Views : 208 )           »          How do I unlock all files in site at once (Last Post : Alan - Replies : 1 - Views : 2 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags: , , , ,



Reply
  #1 (permalink)  
Old 08-28-2008, 05:14 AM
almond0517
 
Posts: n/a
Diggs:
Default Passing XML value to a ScrollingText Component

Good morning Flex Gurus...:smile;

I just have a simple question. I am trying to pass a value from an
ArrayCollection coming from MySQL that was generated into a XML to the
ScrollingText Compoment but is not being displayed by the component. However,
when pass the value to a mx:Text, the value is actually displayed. The
component code is posted below.

Code to display the Scrolling text Correct:
<comps:ScrollingText id="myScrollingText" text="Welcome to our Office..."
fontSize="40"
fontStyle="italic" initialize="myScrollingText.start()"
color="#0053C4" fontWeight="bold" fontFamily="Arial"/>

I successfully implemented a code to access the other parts of the generated
XML to be displayed in my applicaton however when I tried to implement the same
with the component and pass the value it did not work.

Code that is not working:
<mx:Repeater id="roomMarqueRepeater"
dataProvider="{rest_service.lastResult.scheds.mrq. msg}" >

<comps:ScrollingText id="myScrollingText"
text="{roomInfoRepeater.currentItem.mrq_msg}"
fontSize="40" fontStyle="italic"
initialize="myScrollingText.start()" color="#0053C4"
fontWeight="bold" fontFamily="Arial"/>
</mx:Repeater>

ScrollingText.MXML
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"
width="100%" height="50"
horizontalScrollPolicy="off" verticalScrollPolicy="off"
creationComplete="init()" fontSize="20"
fontFamily="Verdana" color="#2C1FDB">

<mx:Script>
<![CDATA[
import mx.controls.Text;
private var myTimer:Timer = new Timer(10);

[Bindable]
public var text:String;

public function start():void
{
myTimer.start();
}

private function init():void
{
myTimer.addEventListener(TimerEvent.TIMER, moveLabel);
}

private function moveLabel(event:TimerEvent):void
{
if (scrollingLabel.x < (0-scrollingLabel.width))
{
scrollingLabel.x = this.width;
}
else
{
scrollingLabel.x --;
}
}
]]>
</mx:Script>

<mx:Label id="scrollingLabel" x="{this.width}" text="{text}"/>
</mx:Canvas>

my XML that is Generated:
<scheds>
<mrq>
<msg><mrq_id>1</mrq_id><mrq_msg>Welcome to our Office!!!</mrq_msg></msg>
</mrq>
</scheds>

Hope someone can help. I tried looking for some parameter passing post but I
can't find one that fit my needs.

Thanks and good day to all...

It really is fun FLEXING...
:smile;



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-28-2008, 10:41 AM
adobenewsbot
 
Posts: n/a
Diggs:
Default Re: Passing XML value to a ScrollingText Component

Adobe Newsbot hopes that the following resources helps you. NewsBot is experimental and any feedback (reply to this post) on its utility will be appreciated:

Flex - Using Item Renderers:
The second component is a Label in which we display the artist name and song title concatenated ..... I have an array collection that populates a datagrid.

Link: http://blog.paranoidferret.com/index...tem-renderers/

Peter Ent: Flex 2 Archives:
In Flex 1.5 it was pretty common to use an Array as a dataProvider to a List component, such as the DataGrid. That's because in Flex, the Array class

Link: http://weblogs.macromedia.com/pent/a...x_2/index.html

Peter Ent: Flex Solutions Archives:
The UIComponent class is the basis for all visual Flex components .... does not work well for list controls but does perform nicely for a VBox and Repeater.

Link: http://weblogs.macromedia.com/pent/a...ons/index.html



Disclaimer: This response is generated automatically by the Adobe NewsBot based on Adobe [L=Community Engine]http://community.adobe.com/ion/search.html[/L].
Reply With Quote
  #3 (permalink)  
Old 08-28-2008, 01:43 PM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: Passing XML value to a ScrollingText Component


"almond0517" <webforumsuser@macromedia.com> wrote in message
news:g957an$j14$1@forums.macromedia.com...
> Good morning Flex Gurus...:smile;
>
> I just have a simple question. I am trying to pass a value from an
> ArrayCollection coming from MySQL that was generated into a XML to the
> ScrollingText Compoment but is not being displayed by the component.
> However,
> when pass the value to a mx:Text, the value is actually displayed. The
> component code is posted below.
>
> Code to display the Scrolling text Correct:
> <comps:ScrollingText id="myScrollingText" text="Welcome to our Office..."
> fontSize="40"
> fontStyle="italic" initialize="myScrollingText.start()"
> color="#0053C4" fontWeight="bold" fontFamily="Arial"/>
>
> I successfully implemented a code to access the other parts of the
> generated
> XML to be displayed in my applicaton however when I tried to implement the
> same
> with the component and pass the value it did not work.


When you say "it did not work", what actually _did_ happen? did you get any
errors? Have you set any break points and looked at values? If so, what
results did you get?


Reply With Quote


  #4 (permalink)  
Old 08-28-2008, 06:13 PM
almond0517
 
Posts: n/a
Diggs:
Default Re: Passing XML value to a ScrollingText Component

thanks for the reply.

there were no errors actually. I havent tried debugging coz when i use the
debug my Flex usually hangs up and says that it cant se the flash player.

there is really no errors and will try debugging it however when i run the
application the application works fine but the scrolling text doesnt show.
Funny thing is if remove it from the repeater and change the text value of the
scrolling text to some that is not coming from the XML or any value of a string
it actually works.

any suggestions thanks in advance for the help...


:smile;

Reply With Quote
  #5 (permalink)  
Old 08-28-2008, 10:33 PM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: Passing XML value to a ScrollingText Component


"almond0517" <webforumsuser@macromedia.com> wrote in message
news:g96kq0$83i$1@forums.macromedia.com...
> thanks for the reply.
>
> there were no errors actually. I havent tried debugging coz when i use the
> debug my Flex usually hangs up and says that it cant se the flash player.
>
> there is really no errors and will try debugging it however when i run the
> application the application works fine but the scrolling text doesnt show.
> Funny thing is if remove it from the repeater and change the text value of
> the
> scrolling text to some that is not coming from the XML or any value of a
> string
> it actually works.
>
> any suggestions thanks in advance for the help...


Try

<mx:Repeater id="roomMarqueRepeater"
dataProvider="{rest_service.lastResult.mrq.msg}" >

<comps:ScrollingText id="myScrollingText"
text="{roomInfoRepeater.currentItem.mrq_msg}"
fontSize="40" fontStyle="italic"
initialize="myScrollingText.start()" color="#0053C4"
fontWeight="bold" fontFamily="Arial"/>
</mx:Repeater>

HTH;

Amy


Reply With Quote
  #6 (permalink)  
Old 08-29-2008, 02:41 AM
almond0517
 
Posts: n/a
Diggs:
Default Re: Passing XML value to a ScrollingText Component

Good AM.

Just checked your code and noticed that it wont work because of the
declaration of the Repeater. If you will check you used the 2 different
repeater names.

<mx:Repeater id="roomMarqueRepeater"
dataProvider="{rest_service.lastResult.mrq.msg}" >

<comps:ScrollingText id="myScrollingText"
text="{roomInfoRepeater.currentItem.mrq_msg}"
fontSize="40" fontStyle="italic"
initialize="myScrollingText.start()" color="#0053C4"
fontWeight="bold" fontFamily="Arial"/>
</mx:Repeater>

Also, i already tried this code and still nothing is being displayed in the
ScrollingText component, another thing is when i use the repeater code you
suggested and use a text not using the ScrollingText component and instead use
a Label or text component and then pass the value of the
{roomMarqueRepeater.currentItem.mrq_msg} it works and displays the value.

Thanks in advance hope someone can point me to the correct way to solve this
problemm of ours.



:smile;

Reply With Quote


  #7 (permalink)  
Old 08-29-2008, 03:47 AM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: Passing XML value to a ScrollingText Component


"almond0517" <webforumsuser@macromedia.com> wrote in message
news:g97jhd$9r5$1@forums.macromedia.com...
> Good AM.
>
> Just checked your code and noticed that it wont work because of the
> declaration of the Repeater. If you will check you used the 2 different
> repeater names.


I just copied your code. The only thing I changed was I took out the root
tag from the dataProvider below, since the XML object already _is_ the root
tag.

HTH;

Amy


Reply With Quote
  #8 (permalink)  
Old 08-29-2008, 05:26 AM
almond0517
 
Posts: n/a
Diggs:
Default Re: Passing XML value to a ScrollingText Component

Did you had it working???

I really don't know why it doesnt display. I tried it again, still doesnt
work. Did it work on your side???

Hope someone can suggest us how to fix it.

thanks in advance once again. :smile;

Reply With Quote
  #9 (permalink)  
Old 08-29-2008, 01:16 PM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: Passing XML value to a ScrollingText Component


"almond0517" <webforumsuser@macromedia.com> wrote in message
news:g97r2r$h3c$1@forums.macromedia.com...
> Did you had it working???


I was just fixing an obvious problem I saw.


Reply With Quote


  #10 (permalink)  
Old 08-30-2008, 02:47 AM
almond0517
 
Posts: n/a
Diggs:
Default Re: Passing XML value to a ScrollingText Component

oh ic, hope someone can point us out to a solution to this problem.

I have tried multiple numbers of way to solve it but still to no avail...

hope someone can help us....calling flex gurus....

thanks in advance for the help.


Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 02:23 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk