ActionScript 3.0 :: Slicing Image Into Triangles?
Apr 11, 2011I am doing a project in which i need to slice an image into pieces. I could do the square slices easily using copypixel function over bitmapdata.
View 3 RepliesI am doing a project in which i need to slice an image into pieces. I could do the square slices easily using copypixel function over bitmapdata.
View 3 Repliesproviding a tutorial for slicing an image? Or tell me the trick behind it.
View 11 Repliesi'm newbie to flash and cs5.5, i'm trying to understand the matrix class usage and trying to follow an example given in the below site,I'm following the steps given in the site but still getting an error saying"...Flash_SamplesTaglio.as, Line 341120: Access of undefined property image_mc."i've an *.jpg in the library and dragged an instance on the stage, converted into movie clip, named that instance as "image_mc". Also linked "Taglio.as" document class to that movie clip but still showing the same error.
View 5 RepliesI'm looking into doing the following :
I've got this 'map.png' that i'm using as a background image. The map shows a country with all the provinces/states/counties 'outlined' on it.
I'd like to generate the effect when you mouse-over or click on a province you get info on the selected province, maybe highlight it, or its outline.
The best way to do this would be making objects/MC's on top of the image ? Slice out parts of the image ?
I am trying to slice or break a movieclip into multiple random shapes.or MCs. I am playing around with BitmapData and pixels but no luck so far.
View 5 RepliesI'm building a small 3D engine for a game I'm working on. I've got my basics sorted: textured triangles with backface culling. However depth sorting is proving to be a difficult problem.I'm calculating the face Z by averaging out the 3 points that make up the triangular face. The longer faces sometimes overlap the smaller faces since they have a larger Z value and therefore rise up in the depth sorted display list.Is there a way I can use the area of the polygon to influence the depth sorting in any way? Or are there algorithms to accurately detect which triangle is above which triangle?
View 3 RepliesAt first I thought making tringles out of Polys was an easy concept. Considering I start with a quad of ABCD then I could convert this to two triangles of ABC and ADC, which is easy. However an alternate answer is BCD and BAD. The real differnce between the two outputs is exacerbrated when I now calculate the Normals for the two new faces. Also in some cases the edges break against the UV texture map in an undesirable way. Obviously in choosing the output faces I should be choosing the method as well that doesnt produce highly acute angles above all else. Unfortuantely I also have a number of pentagons and hexagons to render as well.
View 1 RepliesThis is a test program to measure the time it takes Flash to draw a triangle 10,000 times. The app (code below) calls runTimeTest() every N seconds which draws the triangle 10,000 times. Now for the "interesting" part: each call takes increasingly more processor until after about the 6th or 7th call it goes to "infinity" (see screen shot of TaskManager) Weird bug or explainable??
[Code]..
I'm trying to get a triangle to spin in place,
View 7 RepliesI am trying to achieve something similar to the flash movie in the below link. [URL]. As we drag the points of the triangle, the coordinates labels, ( A(1,2)) are properly aligned and arrange themselves so that they never collide with each other and never falls inside the triangle.
View 1 RepliesI am looking for useful tips for reducing or removing triangle overlapping in Away3D.I already tried to increas segmentsW and segmentsH but it doesn't solve the problem.Here is a snapshot of my problem (The complex cubes are made of Plane objects, Maybe there is a better way to build the complex cubes ?)
View 1 RepliesI am trying to calculate the top most intersection of an arbitrary number of planes, with no joy! I am using actionscript, but just need find an algorithm that i can implement.
Problem:
consider 3 vertical axis.The user enters 3 points for each triangle/plane such that the points of the triangle lie on one of the axis.The user can enter an arbitrary number of triangles I need to find the topmost layer of these triangles and display it on the screen as well as the coordinates of interection.
Here is a picture to clarify what I mean with 2 triangles:
However, when we allow for more than 2 triangles, I get awkward lines of intersection.
I'm not that familiar with AS3 but I got a script from someone where some objects are drawn.I want to add several triangles so that each triangle can be dragged on the stage.
Code:
package app.simpleShapes {
import flash.events.TUIO;// allows to connect to touchlib/tbeta
[code]......
what's the main idea behind 3D in Flash. I mean, I've seen a lot of scripts to make rotating squares or triangles or whatever, but never managed to understand how they were made.
View 14 RepliesThis is a test program to measure the time it takes Flash to draw a triangle 10,000 times.
The app (code below) calls runTimeTest() every N seconds which draws the triangle 10,000 times.
Now for the "interesting" part: each call takes increasingly more processor until after about the 6th or 7th call it goes to "infinity" (see screen shot of TaskManager)
[Code]...
i want to rotate 3D an Image called img1 in Flex. I want to rotate it around y axis 180 degree. I can do this by using 3D effect already built in Flex but i want to do a bit more different. I want during rotating, there's another image called img2 appear on back of img1 (in default case, the image appear on the back is img1) and when rotating finish, the image will be img2.
View 2 RepliesI am working on an Image manipulation application which will be developed using Flash/ C#.Net. Is this possible to save the image manipulations (not the image) saved from Adobe Lightroom for a specific image & then merge these change sets with an image to make a new image using C#.Net?
Also, the application for image manipulation will be developed in the Flash/ Action Script. Please share some links as to how we can save the image manipulations for an image (not the image) so that it can be merged with an image later on.
I am changing image through flex every time i change it saved into server directory with same name(which i am referring to show). So when i refresh my page my browser didn't send new request to server since it's already in request.so didn't getting new image.Tip:- when i clear browser history it will come with new image
View 2 RepliesI have a Flash CS4 Professional version installed in my machine. Here is my problem.
1st - I'm importing an image to stage and set the width and height to match the image. (everything is good, no problem) 2nd - I am using the FLVPlayback components build-in from Flash CS4. It does load the video and everything. (everything seems good) 3rd - Publish the video to my local drive (everything seems good) 4th - I could play the video from my local pc and it loads fine and fast 5th - Upload everthing from my local folder to the Web server, it does display the background image but not the video. It has a white blank screen. What is going on? I copy the exact folder from local to server. What have I missed? How could I make the video to load?
I am trying to load a colour image and then it is changed to black and white image. Here I am using a mask. But it is not getting worked. The code that i am using for this purpose is attached following: import
[Code]...
I have a gallery where passing over the image a rectangle drops down showing the caption for the image. The informations are read from an XML file and some of my images don't have a caption, for those emails I want to avoid the tween.
[Code]...
I found examples in adobe site only to position the object where the mouse pointer is. But i have to place the image in the position of drag proxy image.
View 1 RepliesI have an image that doesn't fill the <mx:Image> tag because it's not the exact dimensions (it is too short) and I have maintainAspectRatio set to true:
<mx:Image id="theImage"
source="{data.photo_thumb}"
horizontalCenter="0"[code]....
The <mx:Image> tag has a fixed width and height (it's 100% of the tile size--this is in an ItemRenderer). How do I get the image to sit on the bottom of the <mx:Image> tag?
im messing with a movieclip symbol and i want to make a button, what'd i mean on Mouse over display/change this image in this X,Y cords or replace this image, something close to what buttonSymbol does but i want to make it using movieClip symbol...
and i have no idea how to do it.. i started like this:
[Code]....
I developing a site where on the homepage, there are about 6 images that rotate, but if you click on a sub link, a different image loads. But the problem is that, the first image has to cycle through before the second image loads. I want the second image to load immediately.
[Code]....
I'm trying to find out how to make a simple image gallery which changes image upon a mouse click on a button, when a button is pressed I want the image to slide in from the left into the viewable area and then when another image is selected I want the previous image that was viewed to remain in the screen and then the new image slide across over the top to replace the image.
I can get the images to slide across from the left upon a mouse click however I can't change the layer order so if image 6 is viewed and then I click to see image 1, the image will slide into place however it will be below image 6 so therefore not viewable.
I don't have an example of what I'm after but I hope my explanation was good enough, I've seen this been done in javascript but I have to use flash and am unable to replicate the effect I'm after
Some images I load dynamically are too big so I would like to scale them to fit the stage.
[Code]...
this returns 0. Why does it return 0 when the image loaded is obviously much larger then 0 pixels. How do I change the width and height of imgCont to a specified dimension.
I'm trying to create a simple image player that tweens from one image to the next every 5 seconds. The data is being pulled from xml.
So far, I have managed to load the image onto the stage, but am now stuck as to how to get it to remove the child showing, the add the next child every 5 seconds.
My Code:
Code:
var tweenTimer:Timer;
var imageLoader:Loader;
var xml:XML;
[cod]...
I attempting to make a slideshow like the one on this page: [URL] But i was wondering if it is possible to change the code so that if you click on the main image, another image could come up next to it? (I'm making a portfolio site, and i want people to click on one of the main images to then see a detail image next to
it).
I'm fairly new to ActionScript 3.0 so forgive me if this question is easy, but I'm having issues with my portfolio slideshow. I have a few thumbnails and when you click on one the image slides in from the right. That part is fine. What I really want is for the user to click on a different random thumbnail and have the current image slide out as the new image slides in. My code so far:
[Code]...