Go Back   kirupaForum > Flash > Flash CS4

Reply
 
Thread Tools Display Modes
Old 11-27-2009, 03:59 AM   #1
Torq
Registered User
Vector

I know I probably won't have much luck with this (nothing to be found on Google). I'm asking around anyway.

When I copy over an image with setPixels and getPixels, everything works great, same with iterating, and copyPixels. But with getVector and setVector something weird happens. It renders only the top of the image. Even something as simple as this:

this.screen.setVector(this.screen.rect,
this.screen.getVector(this.screen.rect));

Checking Redraw regions, and it shows a completely different rectangle. In this image, that top red box is suppose to extend all the way to the bottom (it's 1000px width/height, rect object confirms). But the moment I call setVector, it resizes and screws it up (rect object still says 1000px/1000px).




Any help would be greatly appreciated!

__________________
MMO Game Masters - If they make it, we will come...

Last edited by Torq; 11-27-2009 at 04:03 AM..
Torq is offline   Reply With Quote

Sponsored Links (Guests Only) - Register | Need Help?
 

Old 11-29-2009, 01:48 PM   #2
Torq
Registered User
Figured this out, incase anybody wanted to know.

It came to me.. setVector doesn't tell Flash to redraw! At least for me, but BitmapData.unlock() does! All I had to do was lock it, setVector, and unlock it. Unfortunately it seems to be about the same speed as copyPixels (but copyPixels is goofing up in Firefox for me when running at too high FPS, so it's all good anyway).

__________________
MMO Game Masters - If they make it, we will come...
Torq is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:20 PM.

SUPPORTERS:

kirupa.com's fast and reliable hosting provided by Media Temple. flash components
Creative web apps. Make your own free flash banners and photo slideshows.
Check out the great, high-quality flash extensions. Buy or sell stock flash, video, audio and fonts for as little as 50 cents at FlashDen.

Flash Transition Effects

Flash Effect Tutorials

Digicrafts Components
Flash effects. Art without coding. Upload, publish, deliver. Secure hosting for your professional or academic video, presentations & more. Screencast.com
Streamsolutions Content Delivery Networks Flipping Book - page flip flash component.
Flash-Gallery.com - Get your flash photo gallery (flash component or swf gallery Learn how to advertise on kirupa.com
 

cdn
content delivery network (cdn)

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd. Copyright 2010 - kirupa.com Copyright 2010 - kirupa.com