Effects of the Playbook

Hello

I want to put an effect wipe or some other effect from one screen to the other, when I click on the button of the screen1 he must navigate to screen2. within the navigation, I want to put some effects. How can I do this, answer wih example line of code is much appreciated.

Help, please?

Hey ramesh,.

Here's a rough code for the transition to work. It should give you a general idea. When you click the first button, it will "sweep" in a new screen and then on the new screen when you click the button it "erases" the new screen. Here is the code:

Page1.as:

package
{
    import caurina.transitions.Tweener;

    import flash.display.Sprite;
    import flash.display.StageAlign;
    import flash.display.StageScaleMode;
    import flash.events.MouseEvent;

    import qnx.ui.buttons.LabelButton;

    [SWF(width="1024",height="600",backgroundColor="#CCCCCC",frameRate="30")]
    public class Page1 extends Sprite
    {
        private var nextPage:Page2;
        private var transBtn:LabelButton;

        public function Page1()
        {
            super();

            // support autoOrients
            stage.align = StageAlign.TOP_LEFT;
            stage.scaleMode = StageScaleMode.NO_SCALE;

            nextPage = new Page2();

            /*
             * Button to get the new screen on screen
            */
            transBtn = new LabelButton();
            transBtn.label = "Click to change Screens";
            transBtn.setSize(300,52);
            transBtn.setPosition(100, 200);
            transBtn.addEventListener(MouseEvent.CLICK, showNewPage);

            addChild(transBtn);

            /*
             * Add the new screen, but it wont be visible because it's x
             * position is more than the page dimension of 1024 (check other page)
            */
            addChild(nextPage);
        }
        public function showNewPage(e:MouseEvent):void
        {
            /*
             * Create the transition to bring the new screen in from x:1024 (off screen)
             * to x:0 in .3 seconds in a straight line (linear)
            */
            Tweener.addTween(nextPage, {x:0, y:0, time:.3, transition: "linear"});
        }
    }
}

Page2.as:

package
{
    import caurina.transitions.Tweener;

    import flash.display.Shape;
    import flash.display.Sprite;
    import flash.events.MouseEvent;

    import qnx.ui.buttons.LabelButton;

    public class Page2 extends Sprite
    {
        private var pageBackground:Shape;
        private var transBtn:LabelButton;

        public function Page2()
        {
            super();

            /*
             * Set the position of the screen at 1024 so it doesnt show
            */
            this.x = 1024;

            /*
             * Create a "background" for the new page
            */
            pageBackground = new Shape();
            pageBackground.graphics.beginFill(0xFF0000, 1);
            pageBackground.graphics.drawRect(0,0,1024,600);
            pageBackground.graphics.endFill();

            /*
             * Button to get rid of this screen.
            */
            transBtn = new LabelButton();
            transBtn.label = "Welcome to Page 2, click here to go back.";
            transBtn.setSize(300,52);
            transBtn.setPosition(100,200);

            transBtn.addEventListener(MouseEvent.CLICK, showOldPage);

            /*
             * add the button and the background
            */

            addChild(pageBackground);
            addChild(transBtn);

        }
        public function showOldPage(e:MouseEvent):void
        {
            /*
             * Create a transition for this page to disappear starting from
             * x: 0 to x:1024 (off screen) in .3 seconds in a straight line (linear)
            */
            Tweener.addTween(this, {x:1024, y:0, time:.3, transition: "linear"});
        }
    }
}

comments should guide you in the code. Good luck!

Tags: BlackBerry Developers

Similar Questions

  • Scroll to Image/object/MovieClip as the Playbook Native clock App

    Hi guys,.

    I'm curious to know what makes scrolling image/object/movieclip effect, just like the native clock of the playbook application...

    What I get in my little mind, is that the clock app uses scroll pane that scroll horizontally.

    The 3 points are inside a container, and the container is set as the content of the scroll pane.

    the problem is that I do not understand how the elements also scaling vertically with the movement (scrolling the scrolling pane).

    I tried to scale according to the scroll event deltaX, but not good so far...

    Could someone here please help me get the idea of how to do this?

    Before thanks for your help

    Hi in case there are others like me who is also curious.

    Now I can able to scroll carousel effect, as the native clock of the playbook app.

    Here's what I do:

    -do clip in flash pro that animate the object to scale up and down.

    -import the .swc published in Flash Builder project,

    -call class video clips, add it to a container,

    -define the container as Scroll content pane,

    -Update of the current image of the video clips respectively as the scrolling of the scroll pane

    Sorry that my code is still a mess, if you want to know the code I use just PM me

    Now I am facing the problem with scrolling of the scroll pane, which does not display content to the top position of 1024px, but that's another question, which I'll post in the different thread

  • How to get the text have the same effect as the video?

    Hello

    For the first time post here, but I wonder how to get the text of the titles have the same effect as the video behind her.

    For my video, I use 'bad tv' and other effects such as Gaussian that obviously changes the appearance of video, creating the look of VHS. However, I then inserted text via the title, but it normally appears. How can I make this text have the same effects as the video behind it?

    A friend told me I might need to add text to the video first, then do the effects, I have not tried, but wonder if there is an easier way, as this would require me to restart.

    EDIT: That's what I'm looking for. https://youtu.be/7_2PHQI89dI?t=24s The text has the same effect as the video.

    Thank you

    One way is to create a clip made up based on the title and the original clip. Then apply the effect.

    Another way is to use an adjustment layer.

    Good luck.

    Russ

  • It's good to put in glass on screen? is - that may decrease the effectiveness of the screen?

    friends, I brought 6 s more. It's good to put in glass on screen? is - that may decrease the effectiveness of the screen?

    < re-titled by host >

    It could cause your iPhone overheating which may also void the warranty.

  • What are the effects of the clearing the browser Cache?

    What are the effects of the clearing the browser Cache?

    Caches to store a copy of the page Web that you visit to speed up the loading of the page even when you revisit the page.

    Once you empty the Caches, pages must be again downloaded from Web sites.

    With higher bandwidth available now, is not a problem.

    Sometimes these caches can get damaged and a troubleshooting step

    You can clear those without causing any problems.

  • If I delete a song in the list of duplicates itunes, it has an effect on the existing playlist?

    If I delete a song in the list of duplicates itunes, it has an effect on the existing playlist?

    Official notice of Apple on the duplicates is here: find and remove duplicates in your iTunes library. This is a manual process and article fails to explain some of the potential pitfalls such as the lost coast and membership of playlist, or sometimes the same file can be represented by multiple entries in the library as well as a removal and recycling the file will break all the others.

    Use MAJ > view > show items to reproduce exactly to display the duplicates because it is normally a selection more useful. You must manually select all but one of each group to remove. Sort the list by Date added can make easier select appropriate tracks, but it works better when executed immediately after the dupes were created.  If you have several entries in iTunes connected to a same file on the disk hard then don't not send to trash.

    Use my DeDuper script (Windows only) If you are not sure, do not want to do it by hand, or want to maintain ratings, play counts and playlist membership. See this background thread , this post for detailed instructions and Please take note of the warning toback up your library before deduping.

    (If you don't see the menu bar press ALT to temporarily view or CTRL + B to keep displayed.)

    The latest version of the script can put away the dead links as long as there is at least a double live to merge his stats and membership of the playlist and must deal wisely when the same file has been added through multiple paths.

    With this many files, it might pay to break down the problem into smaller pieces.

    TT2

  • Smart battery business effects on the phone battery?

    Hello

    What is your contribution regarding the effects of the case continually recharges the phone?

    First of all, I'm confused that the case feeds the case when the phone is 100% or if it is just trickle charge the phone and keep it 100%. I read a few articles such as (http://fortune.com/2015/12/14/apple-iphone-battery-case-review/) saying that the case battery fully powers the phone. However, I have reason to believe that the case is simply trickle charge the phone.

    If the case was simply charging the phone on charge of compensation, he would have no adverse effects on the long-term phone battery? As (http://www.powerstream.com/li.htm) and (http://batteryuniversity.com/learn/article/charging_lithium_ion_batteries) does point out that trickle charge a Li-ion battery can have negative effects on the battery. I much prefer fresh case of how Mophie battery, I can turn it on when I want to and end it before 100%, but I prefer by far holding the handle of the smart case in my hands.

    The management of the battery of the phone is very smart. When the battery reaches 100%, it stops to load. Completely. When the phone is 100% power is connected powering the phone, and the battery is ignored. If you could leave it plugged into the wall for weeks without interruption, and it wouldn't hurt anything. In fact, you SHOULD leave plugged in overnight, every night and allow automatic backups iTunes via WiFi or iCloud. In this way the most you can lose is a day data.

    As a result, the case feeds the phone up to exhausts its battery, then the battery takes over. If the battery is not fully charged when you connect the case he will first charge the battery.

  • Updates to Windows during the stoppage has not taken effect and the same updates (16 of them) keep coming back in the next restart.

    Original title: Windows updates has not taken effect.

    My Windows updates during the shutdown did not effect. The same updates (16 of them) keep coming back in the next restart.

    I tried fixed it 50461 mentioned in one post, but the problem persists.

    Any help to appreciate.

    Hi Lee CC,.

    1 windows operating system you are using?

    2. you receive an error code or error messages?

    3. Why have you tried the Fixit 50461? Have you received a 646 error?

    This problem can occur if updates failed to install.

    Method 1:

    You can read the following article and try to reset the Windows Update components and check.

    How to reset the Windows Update components?

    http://support.Microsoft.com/kb/971058

    Method 2:

    You can also read the following article and check if it helps.

    Troubleshooting Windows Update or Microsoft Update when you are repeatedly offered an update

    http://support.Microsoft.com/kb/910339

    Hope this information is useful.

    Jeremy K
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Strobe effect of the ThinkPad T520 screen

    I have a ThinkPad T520 with installed Optimus graphics. I noticed that the screen has a sort of strobe effect, maybe the strobe effect isn't the best word, but basically what it does is you can see lines of light moving toward the bottom of the screen very quickly. It is most visible on the blue background of "Microsoft" by default.

    I tried to reinstall my graphic drivers, Optimus disabling and turning the refresh rate to 60 Hz, not good.

    After further tests, it seems to be more noticeable in the middle to low light. At full intensity, you don't notice the issue more.

    I looked around online, something about the inverter may be bad? The guarantee would cover this?

    Edit: Called support, they will replace the LCD unit.

  • I am running winXP home on laptop wireless via a router, and I continue to have an effect on the net.

    login procedure

    I am running winXP home on laptop wireless via a router and I continue to have an effect on the net, and a window saying I need to go through a certain procedure of connectivity in order to return on the net than what seems to come regularly and after that I went through the procedure, I'm back on the net could you please inform me how to eliminate this problem.

    Hi conorcloris,

    ·         What is the exact error message?

    ·         Did you do changes on the computer before the show?

    Follow the steps in the article.

    How to troubleshoot a network home in Windows XP

    http://support.Microsoft.com/kb/308007

    In Windows network connection issues

    http://support.Microsoft.com/kb/313242/en-us

    Troubleshooting Internet connection sharing in Windows XP

    http://support.Microsoft.com/kb/308006/en-us

  • everytime I have start watching videos sreaming they all start as they should, but later, they get real slow and it the effects of the performanced spped PC

    everytime I have start watching videos sreaming they all start as they should, but later, they get real slow and it the effects of the performanced spped PC

    Hello

    1 how long have you been faced with this problem?
    2. don't you make changes on the computer before this problem?
    3. what browser do you use?

    In response to the questions above could help us help you better. However, you check to see if the problem persists in the clean boot state.

    From your computer by using a minimal set of drivers and startup programs so that you can determine if a background program is interfering with your game or program. This type of boot is known as a "clean boot".

    Reference:

    How to configure Windows XP to start in a "clean boot" State

    http://support.Microsoft.com/kb/310353

    When you are finished troubleshooting, follow these steps to reset the computer to start as usual:

    1. click on start and then click Run.

    2. type msconfig and click OK.

    The System Configuration Utility dialog box appears.

    3. click on the tab general, click Normal Startup - load all services and device drivers and then click OK.

    4. When prompted, click on restart to restart the computer.

  • each program loading has a blur transparency effect with the office showing behind. How can I recreate this effect?

    I want to use this effect on my Web site at the beginning of a slide show.  photos will move under this effect to the very fuzzy search then go out under the layer and be at the point.  Thanks much for any help!

    Hello

    You can try to search using your favorite search engine and search for fonts or effects you need to create your web page. If you don't know what to look for, then look at the name of your desktop theme and seek with him.

  • Windows Defender: "" this operation has been cancelled due to restrictions in effect on the computer, contact your system administrator ""

    original title: windows Defender

    I am a beginner and need help. I uninstalled net protect + because it wasn't, not with BT which were unnecessary, but thanks to a member of the forum. Net + had problems trying to reinstall Protect so therefor I installed internet security essentials and now windows Defender does not work! When I try to open the message reads "this operation has been cancelled due to restrictions in effect on the computer, contact your system administrator" can someone help me with this problem. The system is windows vista Home premium.

    Have you installed Microsoft Security Essentials (MSE)? If so, you need not and should not run Windows Defender.  MSE does all what does Windows Defender and much more. Boulder computer Maven
    Most Microsoft Valuable Professional

  • error on the application running on the playbook

    Hello

    I built an application using phonegap, what I have running on other devices, but I built a .bar file and I get the following error when you try to install the application

    failure of 821 request-requires-system: System name not recognized 'BlackBerry 10'

    Ive been looking for oonline and in some forums but I can't seem to find an answer to this question.

    It seems that the BAR file was built for 10 BlackBerry which is a different architecture than the OS of the PlayBook.

    There is here a guide which describes the process of generation for PlayBook:
    http://docs.PhoneGap.com/en/2.3.0/guide_getting-started_blackberry_index.MD.html

    Specifically, you must use the Tablet OS SDK, not the BlackBerry 10 SDK.

  • To access the PlayBook PIN / UDID

    Hello

    Is it possible to access unique information on the PlayBook, such as his PIN code, via the WebWorks SDK?

    Thank you.

    This feature has been released with the WebWorks SDK for Tablet OS v2.1

    Details of the API here:

    http://www.BlackBerry.com/developers/docs/WebWorks/API/BlackBerry.identity.html

Maybe you are looking for

  • Facial recognition error

    I have upgraded to iOS 10 the other day and it is very good even on my iPhone 6plus. However in the photos app, the facial recognition software is great, but it is not perfect. He can see me and group all my photos into an album (JanuaryShark) and th

  • Upgrade SSD or hybrid to my T510

    Hi all I am considering upgrading my hard drive to my old T510 to 2 years since my original 300 GB drive fills I am considering getting an ssd or a Seagate hybrid drive, but I'm not sure. I want a faster startup time and improved performance. Right n

  • Can we build two installers (each installs different .exe) in the Labview project?

    Hello Since it has many common files between two test programs, I built two applications in a single project. Then I need to build two installers for applications accordingly. I'm having trouble to add the second request in the second installer when

  • Change background string indicator when color in short

    Hi, I know how I can change the background color for an indicator of string by using the Text.BGColor property. My question is how can I change this only when the indicator is at the point, I mean when the cursor is in this area. As soon as the curso

  • EXPRESSIONS of back subnets por parte e ISP.

    Públicas tuve the pedir mas direcciones IP need an ISP, el problema e're me lo asigno in rango, rango otro el otro is asigno al mismo router secondary como lo, el problema no lo puedo ver aun asignandoselo an otra graphical mi router. Como puedo hace