flex achieve marquee effect (bottom-up roll)

2010-08-20  来源:本站原创  分类:Flash  人气:167 

Principle is actually using a Text (or TextArea) control, and then add a Move effect to move up Text control. The key point is: get control in the high creationComplete event, there would be a high degree of error is too large. Source code is as follows:
<? Xml version = "1.0" encoding = "utf-8"?>
<Mx: Application xmlns: mx = "http://www.adobe.com/2006/mxml" layout = "absolute"
creationComplete = "complete ()">
<mx:Script>
<! [CDATA [
private function complete (): void
(
move_up.yFrom = cs.height - 6; / / "plus 6 minus 6 is more natural to connect end to end"
move_up.yTo = 0 - tt.height + 6; / / Ibid
move_up.repeatCount = 0; / / infinitely repeated
move_up.repeatDelay = 0; / / repetition time, ms
move_up.duration = 6000; / / scroll one time, ms
move_up.play ();
)

private function move_pause (): void
(
move_up.pause (); / / pause
)

private function move_resume (): void
(
move_up.resume (); / / start from the suspended position
)
]]>
</ Mx: Script>
<mx:Move target="{tt}" />
<Mx: Panel width = "250" height = "200" layout = "absolute" title = "Announcements"
fontSize = "13" horizontalCenter = "0" verticalCenter = "0">
<Mx: Canvas width = "100%" height = "100%" left = "0" top = "0"
verticalScrollPolicy = "off" mouseOver = "move_pause ()" mouseOut = "move_resume ()">
<Mx: Text width = "94%" horizontalCenter = "0"
text = "On the surface, the text scroll from bottom to top, is actually Text control in the roll." verticalCenter = "0">
</ Mx: Text>
</ Mx: Canvas>
</ Mx: Panel>
</ Mx: Application>

相关文章
  • flex achieve marquee effect (bottom-up roll) 2010-08-20

    Principle is actually using a Text (or TextArea) control, and then add a Move effect to move up Text control. The key point is: get control in the high creationComplete event, there would be a high degree of error is too large. Source code is as foll

  • flex achieve marquee effect (bottom-up roll) (change) 2010-06-24

    Recently a small project to do need to use this effect, today's completion of the project, will share the results show. Principle is actually using a Text (or TextArea) control, and then add a Move effect to move up Text control. The key point is: ge

  • [Js Effects] instead of a scroll marquee effect of the code subtitles 2010-03-18

    [Js Effects] instead of a scroll marquee effect of the code as marquee labels caption is now used less and less, so most of rolling results-based approach also use javascript to achieve, and those who are not understand why does not directly friends

  • Android tutorial series Six: TextView group document to be used - with hyperlinks and marquee effect 2010-11-25

    Wrote Application of these two days busy with my "I Group" of the update, here's the article updates a lot slower, please forgive me! This section describes what the simple use of TextView, and the hyperlink text, marquees and other instances. A

  • FLEX achieve full-screen functionality and right-click menu (note) 2010-02-08

    FLEX achieve full-screen function, in this do to record, not enough light to write AS, but also on the html / js to make some small changes to some preceded by good news of this change is not troublesome, there is this demand can refer a friend next.

  • Gallery with GridView to achieve the effect of (turn) 2010-10-24

    Gallery with GridView to achieve the effect of (turn) In the horizontal results similar to Gallery Gallery to do to try to achieve, but the effect is not good. Using TableLayout, drag the image appears when the horizontal because of tilt (slight vert

  • Click on the water application to achieve the effect of dye diffusion 2011-08-02

    Please give an idea of ​​my friends, if the dye diffusion process to achieve the effect of water drops? Achieved using java directly, or in the form of page, or other language can, the key is to give an idea. Thank you! ~ ~ ~

  • [Android Development] android marquee effect in textview achieve 2010-11-28

    ??

  • PHP + Flex achieve more than chat 2010-05-21

    Ordinary language we use PHP + JS code written in many chat rooms are using Ajax technology refresh intervals of time to chat data. Now using Flex + PHP language, through the socket implementation to achieve client and server interaction. As long as

  • js achieve scroll effect 2010-08-31

    <! DOCTYPE html PUBLIC "- / / W3C / / DTD XHTML 1.0 Strict / / EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd "> <Html xmlns = " http://www.w3.org/1999/xhtml "> <head> <meta http-equiv="Cont

  • Flex switch closure effect 2010-11-15

    Preface: I did not write some special effects, such as the implementation of multiple effects. Slowly after the star attraction get ... and also saves the value of the security checks ... Oh, add one point. Each method here returns a Effect. I used t

  • flex 4 flashing effect in a traditional 2010-08-18

    flex 4 in a conventional flicker effect, notes the following: <? Xml version = "1.0" encoding = "utf-8"?> <! - Http://blog.flexexamples.com/2010/08/13/creating-blinking-text-on-a-spark-richtext-control-in-flex-4/ -> <S:

  • Transfer: flex filter: spotlight effect. Magnifier effect. Zoom blur. Emboss effect and wave effects 2011-05-30

    Unfortunately, the source code does not provide the appropriate libs package 1: Spotlight Effect: Example: http://www.rphelan.com/flex/SpotlightDemo/SpotlightDemo.html ambientColor - color to apply to all pixels of the image angle - angle at which th

  • android achieve jitter effect 2011-08-11

    Jitter is used to achieve animation Animation shake.xml file <translate xmlns:android="http://schemas.android.com/apk/res/android" android:fromXDelta="0" android:toXDelta="10" android:duration="1000" android:inte

  • TextView achieve Marquee effects 2010-04-05

    TextView v=new TextView(this); v.setText(" Wow Wow Wow HA HA HA HA HA HA HA HA HA HA Wow Wow wahahawahhahwahhahahwahahhahahawhahhaha......"); v.setTransformationMethod(SingleLineTransformationMethod.getInstance()); v.setSingleLine(true); v.setEl

  • flex achieve googelMap 2010-09-12

    A: First install the sdk, if FB is even more convenient, my use of the FB. 2: Download Google provides flex google map tool kit, I provided in the annex to this tool kit under the swf files in the lib, I have added in the annex, do not find. 3: The n

  • Android QQ week to learn and achieve IphoneTreeView effect. 2010-10-09

    After a week of tests, and finally the effect of Android version of QQ's IphoneTreeView achieved. Although there are no small flaws, but compared with the terms of the degree has a 90% reduction, browse similar effects and functions. From the graph w

  • [Anroid development] how to achieve wave effect 2010-11-30

    In the Android game open, we often need to wave effects, then how to achieve it? Can refer to here , and more content access http://360safe.javaeye.com

  • EditText android achieve shock effect 2010-12-01

    EditText we all know, this case can be achieved when we click on the button when the EditText will shock, specifically how to shock, vibration, long, several times, and so from our xml file inside the configuration parameter. I was to picture it, but

  • Scroll up and down with the flip panel to achieve the effect of JTable 2010-12-16

    import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; import java.awt.Graphics; import java.awt.Polygon; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.Icon; import javax.swing.JB