How can you increase performance?

Hello
I'm building a site, but it's the framerate is very slow.

I read a few articles that the Sprites are much faster then movieclips.

For example, I have 5 long movieclips (4300 pixels in width). These clips scroll horizontally to achieve a parallax effect.

One of these movieclips contains other movieclips. (all movieclips not animate and are just graphic).

So I thought to increase performance to convert all the clips of Sprites that I read that the Sprites are better for performance.
I came up with this method:

function castMovieClipToSprite(source:MovieClip,_recursive:Boolean_=_true):void {}

for (var i: int = 0; i < source.numChildren; i ++) {}

var child: DisplayObject = source.getChildAt (i) as DisplayObject;

If (child is MovieClip & & recursive) {}

castMovieClipToSprite (MovieClip (child), recursive);

     }

child = Sprite (child);

     }

}

The performance has improved slightly, but if I run the debugger I see that child objects are always of type MovieClip.

Does anyone know another way to improve performance?

Thank you

Chris.

At the point of several objects, the following code does the same job (looks like) in your demonstration with a single shape:

var angleConvert:Number = Math.PI / 180;
var numSegments:int = 100;
var angleIncrement:Number = angleConvert * (360 / numSegments);
var radius:Number = Math.max(stage.stageWidth, stage.stageHeight);
var currentAngle:Number = 0;
rays = new Shape();
var g:Graphics = rays.graphics;
g.beginFill(0x000000);
g.drawRect( -radius, -radius, radius * 2, radius * 2);
var len:int = numSegments / 2;
for (var i:int = 0; i < len; i++) {
     g.beginFill(0xC0C0C0);
     g.moveTo(0, 0);
     g.lineTo(radius * Math.cos(currentAngle), radius * Math.sin(currentAngle));
     currentAngle += angleIncrement;
     g.lineTo(radius * Math.cos(currentAngle), radius * Math.sin(currentAngle));
     g.endFill();
     currentAngle += angleIncrement;
}
addChild(rays);
rays.x = radius * .5;
rays.y = 100;

addEventListener(Event.ENTER_FRAME, rotate);

function rotate(e:Event):void
{
     rays.rotation += 1;
}

Tags: Adobe Animate

Similar Questions

  • How can you increase/change the font size using window.print

    We use no BI/XML Publisher.
    I have a button with a redirect URL to print.
    JavaScript:Window.Print();

    How can I give the user the possibility to print with a different font or larger or possibly put the same for everyone?

    Thank you

    John

    Hi John,.

    You can add styles that are only used when printing (or print preview). In the frame header HTML on your page (or in the header section of the page template if you want on all pages), add something like:

    <style type="text/css" media="print">
    * {font-size:24px!important;}
    </style>
    

    This will set all the text to 24 px. Obviously, adjust according to your needs.

    Andy

  • How can you increase dedicated video memory

    I have a hp computer office 314-110 and there only 32 of dedicated video memory and I need to buy more than 50 to run some games I have how to add dedicated video mem and what is shared memory?

    Hello

    Suffice it to say: you can not. If you want to play games, you need a better machine current machine upgrade ypur GOLD.

    Kind regards.

  • How can you increase the memory in the VM VCenter?

    I have just ESXi 4.1 Essentials. I have to close the virtual machine to increase memory and if I stopped it, then I can handle is no longer the VMs (which is a).  I had a hand on a part of the installation and configuration of the environment but you can try to provide as much additional information as needed.


    Hello

    Launch a vsphere client directly to the host than US having the vCenter server VM and stop of the VC and increase the memory to the VM and turn on. ?

    Let me know if this does not answer your question.

    Thank you

    Avinash

  • How can you increase or zoom to the size of the points of control/tabs menu bar? They are tiny in HD resolution.

    I have a big screen and I put high resolution. This makes it very small. I bring it to the top with no squint, but it does not work on the superior/tool menu bar/control/tabs or their menus, leaving me squinting again scrolling. There must be no feature squint for this area of the browser

    NoSquint changes only the display of web page, not the user interface of Firefox.

    Try this add-on:

    If this answer solved your problem, please click 'Solved It' next to this response when connected to the forum.

    Not related to your question, but...

    You may need to update some plug-ins. Check your plug-ins and update if necessary:

  • My Inbox cannot receive large attachments, how can I increase the size of my Inbox

    How can you increase my box of RECEPTION received E-mail large attachments?  I use the Windows Mail e-mail.

    How big is "big"? The size of attachments to e-mails usually is limited by your email provider (normally your Internet service provider) and not necessarily the e-mail client (Windows Mail). Most providers have a limit on the size of attachments to email like 1.5 MB or more. Very large files should be transferred using FTP or a service like the whale Mail or similar. Please provide the missing details about your situation and the files involved for further assistance. MS - MVP - Elephant Boy computers - don't panic!

  • How can we increase the free memory space for application requiring more memory on OS 64 - bit Windows 7 Professional?

    How can you increase storage space free for a request that need more than 2 GB of memory on a 64 - bit Windows 7 professional OS?

    I guess it's a 32-bit application; a 64-bit application would have a 8 TB virtual address space.

    A 32-bit application can be given to a 4 GB virtual address space if it is marked with the IMAGE_FILE_LARGE_ADDRESS_AWARE flag. This is usually accomplished in conjunction with the indicator of this option .

    http://msdn.Microsoft.com/en-us/library/Windows/desktop/bb613473 (v = vs. 85) .aspx

    http://msdn.Microsoft.com/en-us/library/Windows/desktop/aa366778 (v = vs. 85) .aspx

  • Graphic performance rating: How can I increase this score?

    original title: graphical performance evaluation?

    When I try to improve my score on performance monitor, all scores are above 3.0 accept graphics. How can I increase this score?

    Hello Curtis19,

    Witht Windows Experience Index the 'weak link' is still the material with the lowest number. The only option you really increase the WEI of the link must replace this piece of hardware with a better version. In a Word, it means buy a better video card. That's fine with a PC that contains a dedicated or has a spare graphics port graphics card, but if you happen to have a PC with an integrated card (one that is permanently attached to the motherboard (as in a laptop for example and some desktop pc), then it is not so easy, or, in some cases even possible.)

    If you have a laptop, then, because of compact space, the graphics card will be integrated and you will be not Basel upgrade - well not without having to buy a new laptop. If you have a desktop computer and has integrated graphics, you'll find dedicated usually there also a spare graphics port that allows you to insert a graphics card in the slot. In this case, you can improve the IFE by simply buying a better graphics card. However, do not expect miracles, a new graphics card can increae still than the IFE by 1 point or two.

    Personally, I think that the WEI is only a tool of "sale". After all, if the seller tells you that this system has a 3 WEI, but for an extra £50 you can have the system B with a WRI to 4.3 then you, psychologically, will say "well I much prefer system B" is however, System B will be able to do more than to A system? The answer is usually no. If a machine does everything you want it to then do a low WEI would be the least of my worries. As long as the machine runs on my apps, play any video, that I want to watch without slowing down or pixellating then it is good for me.

    This forum post is my own opinion and does not necessarily reflect the opinion or the opinion of Microsoft, its employees or other MVPS.

    John Barnett MVP: Windows XP Expert associated with: Windows Expert - consumer: www.winuser.co.uk | vistasupport.mvps.org | xphelpandsupport.mvps.org | www.silversurfer-Guide.com

  • Do you know what does DPI mean? How can I increase the resolution of a TIFF image at 300 DPI for shipment to a Publisher?

    Is anyone here know what DPI?  How can I increase the resolution of a TIFF image at 300 DPI for shipment to a Publisher?

    If the resolution is already less than 300, may not increase to make it higher. You can only do low.

    =====================================
    Yes, you can increase the DPI value.

  • When you print from a website, the font is very small and difficult to read. How can I increase foz

    When you print from a website, the font size is very small and difficult to read.  How can I increase the font size?

    Hello

    You can shrink before sending it to the printer (also enlarge).

    Just use the Print > print preview

    Under retractable small drop to the bottom of the window, simply select the correct % for you.

    Kind regards.

  • How can I increase the sensitivity of the crop tool? Harvest only moves in increments of 1/3 of an inch. Try to crop the image. Thank you

    How can I increase the sensitivity of the crop tool? Harvest only moves in increments of 1/3 of an inch. Try to crop the image. Thank you

    If you drag a rectangle and who knows, you might have to snap to grid turned on:

    Acrobat 11: View > show/hide > leaders & grills > Snap to Grid

    Acrobat 9: view > snap to grid (Ctrl + SHIFT + U)

  • How can I increase the resolution (DPI / PPP) an image scanned on my iMac?

    How can I increase the resolution of a scanned image. I am currently using a new all-in-one Photosmart HP 5512, I installed everything to the natural drivers have a usp cable connecting the PRINTER to my iMac. I'm on OS 10.7.4.

    The HP icon utility allows me only increase the size of the file (image quality) not the PPP/CIO

    Thanks in advance for any help

    Hello

    You can change the resolution using the application from HP as follows:

    Click HP scan at the top and then click on Preferences.

    In the launch windows, select the required resolution.

    Close the preferences window and perform analysis.

    Kind regards

    Shlomi

  • How can I increase virtual memorey

    How can I increase virtual memorey

    Right-click on "My Computer", go to properties, on the Advanced tab, click on 'Settings' in the area of Performance. On the Advanced tab, click "Edit" in the section "virtual memory."  Adjust virtual memory settings as you wish and save your changes in your way out dialog boxes OKing.

  • I need 280 MB of storage on my iPhone. How can I increase the volume of storage of the iPhone?

    I need 280 MB of storage on my iPhone. The capacity is full. How can I increase the capacity of the phone?

    You cannot increase the capacity. You must remove things. Go to settings > general > storage & use iCloud > storage > storage management and see what about space.

  • I have an iPhone 6 and use Verizon as my server. How can I increase the number of rings until it goes to voicemail?

    I have an iPhone 6 and use Verizon as my server. How can I increase the number of rings until it go to voicemail?

    You can not. There is no adjustment to make on a phone. In fact, it is not based on the number of rings, it is a problem of synchronization based on the parameters of the call. You can contact Verizon to see if they can increase at that time here, but even if they can, it won't be much, only a few seconds if they do at all.

Maybe you are looking for