Actionscript 3 :: Wrap A Drawing Around A Cylinder?

May 12, 2011

I have drawings (arrays of points with x and y coordinates) that are rotated in 3d space: [URL]

As it is now, the drawing looks as if wrapped around a cube, with a nasty 90° degree in the corner. Instead it should look as if it were wrapped around a cylinder. Before starting the rotation I call a function (in ActionScript) 'bendDrawing' that for each point sets an initial z-value:

for (var j = 0; j < numPoints; j++ ) {
// drawings are centered - points left of center are < 0
var distFromCenter = Math.abs(shape[i].points[j].x);

[Code]....

View 1 Replies


Similar Posts:


Flex :: Mapping Pictures To A Sphere Or Cylinder?

May 14, 2010

i am developing an application where client can add his photos to appear on a sphere or ball or coffee cup and able to save them and give it for printing using flex. like itasveer.com site. i tried to use away3D but if the image is small it is stretched and added to sphere. i dont want it to strech instead the original image shud appear on the sphere. if it is added to cup it shud cover only the circular part it shud not add this to top and bottom.

View 1 Replies

Actionscript 3 :: Combine A Texture On A Cylinder In Papervision3d?

May 27, 2010

I would like to combine bitmaps to one texture and apply it to a cylindric primitive. The cylinder will be rotating or better: the texture should moving along the cylindric-surface and therefor you should see only one (up to 3 textures at the same time). For better understanding: it's my intention to create somehow a poster-pillow with a undefined number of posters on it. By clicking on the pillow, it should rotate to the next poster but you will see always parts of the previous/next poster.

My question is: How can I load the texture dynamically but also how to combine, load/unload posters on the run ?

View 1 Replies

ActionScript 3.0 :: Papervision Cylinder - Two Different Materials For Each Side?

Dec 12, 2008

I want to create a cylinder, but with different sides (front and back). At the minute I have a mc on the stage and link in that as the material, but it repeats that all over the cylinder?

[Code]...

View 4 Replies

ActionScript 3.0 :: Draw Cylinder And Cone Through Flash?

Feb 7, 2011

How to draw cylinder and cone through flash action script.

View 1 Replies

Actionscript 3 :: Create 3D Cylinder - Sphere And Cone Using Flash 10?

Dec 6, 2010

I want to create a 3D cylinder, sphere, cone using Actionscript for Flash Player 10. Is there any available class? I also want to know how to paint gradient, wrap text and texture around them. It would be nice if these class have these functions. I can't use non DisplayObject in this project so PV3D is not an option

View 2 Replies

ActionScript 3.0 :: Dynamically Displaying Text On A Cylinder Surface?

Jun 20, 2011

Basically I need to have;

- interface where a user can choose a font (from pre determined font sets) and input a text string

- This text is then displayed engraved on a ring (jewellery)

I'm not sure the best way to achieve this or if there is a module somewhere that does similar.

My best guess would be to

- using mathematics (sin, cos) to be able to plot the oval (where the text need to be displayed on the ring) on an imaginary graph.

- From here there will be a centre , start and end point. The text will need to be limited as it will eventually following the curve of the ring until it can't be see as it is masked by the angle of the ring

- If using dynamic font then the width of each letter should be possible to obtain with AS.
Then mathematically it should be possible to determine how far away from the centre point on the oval each letter is.

- Following this, dependant on the letters distance from the centre, transformations can be applied to each letter. IE stretch, skew and an emboss filter via the convolution filter.

- Hence this will provide the illusion that the text is following the curve of the ring and the look like it is engraved via the emboss.

View 6 Replies

ActionScript 2.0 :: Animate Movement Of Cylinder Going Non Stop Up And Down And With Possibility To Change Speed

Apr 8, 2009

I tried with AS2 to animate the movement of a cylinder going non stop up and down and with possibility to change speed. I managed the sliding down and the acceleration of the cylinder but it does not recognize the limit where it has to stop and make the movement backwards to starting position.[code]

View 1 Replies

IDE :: Designed A Cylinder Shape In Flash - The Edges Of Cylinders Are Coming Out And Also They Are Looking Blur?

Sep 10, 2009

I have designed a cylinder shape in flash. The edges of cylinders are coming out and also they are looking blur. But the interesting thing is when I see the cylinder on 300% it is clear and lines are not blurred.

View 3 Replies

ActionScript 3.0 :: Pencil Tool - Drawing Above A Image But The Drawing Is Below The Picture

Nov 9, 2010

i've tried to simulate a pencil tool, for drawing above a imagem, but the drawing is below the picture. How fix it?

[Code]....

View 3 Replies

ActionScript 3.0 :: Generate Drawing API Data From Drawing Object?

Jul 22, 2009

Basically I've got a reasonably complex drawing object in a fla and I want to reproduce it in a class definition using the drawing api. However obviously this is a tedious task, so is there some trick or automated method of doing this?

Last time I needed to do this it was a drawing of an arrow and I ended up writing down x,y,width,height values for everything but this one has curves in it which I don't have experience with drawing anyway.

View 2 Replies

ActionScript 2.0 :: Enabling Drawing Only When Drawing = True

Sep 28, 2009

I cannot get this to work. Without the "var drawing", "var drawing being true or false" and the "if statement", it works fine. But I need to add the "var drawing" so that you can only draw if you turn it on by pressing the "draw_btn" button. Note, I do not get an error, the script "apparently" contains no errors. Here is the code:

ActionScript Code:
var drawing = false
_root.createEmptyMovieClip("myLine", 0);

[Code].....

View 3 Replies

ActionScript 3.0 :: Drawing Over A Movieclip In A Custom Drawing App?

Jan 13, 2012

I've created a drawing tool which allows the user to draw on the canvas, the problem is that if I try to draw over a movieclip nothing happens. Is there a way I can allow for the user to draw over movieclips? For example if I had a background of paper?

Here's the code I'm using for it:

// This code is for drawing the lines on the page
//1.
var drawingLine:MovieClip = new MovieClip();
addChildAt(drawingLine,0);

[code]....

View 8 Replies

ActionScript 3.0 :: Drawing Api Drawing 40,000 Objects

Feb 18, 2009

I need to draw on stage about 40,000 4x4 squares each a different color. The color is determined by an xml file. I have this working in as2 and have converted it to as3 the problem is the amount of time it takes to draw is causing cs4 to time out. I have extended the script time out to 60 seconds. In cs3 as2 it would draw the squares in about 15 seconds. I was hoping as3 cs4 would improve performance but seems to be the opposite. I have tried several methods such as adding children and various drawing variations. the bellow seems to work the best, but is still causing flash to crash.

ActionScript Code:
import flash.display.DisplayObject;
import flash.display.Graphics;
import flash.display.Shape;

[Code]...

View 9 Replies

Flex :: Wrap Components With XML?

Sep 20, 2011

I am trying to wrap some text with a component but can not figure out how to align them correctly. Here is what I am looking for:If you have not entered your credentials, enter your credentials by clicking Set Credentials.

The "If you have not entered your credentials, enter your credentials by clicking" is a string.The "Set Credentials" is a button so it can be clicked by the user.I tried putting the string in a textarea which wrapped the text but could not get the button to horizontally align with the text. I also tried adding them both with Tile, then I do not get proper wrapping.

View 2 Replies

IDE :: Text Wrap Around Image?

Mar 20, 2009

Using CS4 flash. I am loading an external text(txt file) in to flash. That works fine. How do I add pictures to that text and text wrapping around pictures.

View 2 Replies

CS3 :: Make That Border To Wrap Around Any Resolution?

Apr 1, 2009

How did they make that border to wrap around any resolution? make my images from my XML gallery to not become pixelated when it loads in full-screen.

View 3 Replies

ActionScript 3.0 :: Wrap HTML Page Into Swf?

Apr 17, 2010

how to wrap html page into swf?Is there a script or something that can show the html page inside swf file?I need that swf on some certain site(similar to facebook) do show the html page from other site inside of that swf.

View 1 Replies

Professional :: Text Wrap Around Images?

Feb 9, 2010

Something that has always bothered me, wrapping text around images. Now in the past I always just used line breaks to wrap the text around images in a static and dynamic text field.

I haven't really had much experience with using HTML formatted text in dynamic text fields but I am told in can wrap text around image, is this true? And if so I am imagining the image would have to be external to the flash file and inserted using an <img srce> tag.
 
Was looking around for perhaps a simpler way of doing it and came across "Text Layout Framework" from Adobe. After reading into it, seems that it will wrap the text around in dynamic text fields through use of extensions and components (plus a whole stash of other features.) Would this assumption be correct?

And is there any support for text to wrap around images in static text fields

View 1 Replies

ActionScript 3.0 :: Can't Wrap-around Scrolling Slideshow

Aug 23, 2011

I'm trying to make a scrolling slideshow. They are real estate listings read from an XML file which consist of a thumbnail and 3 text fields (Title, address, price). Right now I have it working to the point where all of the data loads into a row of MCs that scroll to the left using the Tweener class.

I just can't achieve a wrap around effect. Here's a link to the swf as it is now: [URL] Knowing that duplicating MCs is a difficult task, I just half-assed it by loading the dame data into a new array of MCs (arrayBox and arrayBox2). The code below does not actually make use of the "duplicated" listing MCs. I thought I could just move a listing MC over to the right after when totally offstage but that does not seem to be working. Here's the offending AS3 source:

[Code]...

View 3 Replies

Actionscript 3 :: Wrap Lists Into Columns?

Nov 12, 2009

How do you make a List control wrap around to a second column (or multiple columns)? let me know if there is a solution for this with the List control or some other Flex control.

For example, if you have one list with 42 items in it, but I want to cap the height of a list to 20 items; then instead of having one list with 42 items all the way down, I would have that list of items look like the equivalent of 3 adjacent lists: the first with 20 items, the second with 20 items, and the third with 2 items (which represent the original list of 42 items). [url]...

View 6 Replies

Flex :: Wrap Text Around Image?

Aug 9, 2010

In flex, I have HBox in which I have loaded an image. I want to wrap text around it. Hence, there would be an image on right and text will be on left. After the image is cleared, text will be displayed 100% of the width. How can I achieve it?

View 1 Replies

HTML :: How To Get DIV Tag To Wrap Inside AdvancedDataGridColumn

Sep 1, 2011

To display HTML formatted text in an AdvancedDataColumn, I'm using a custom renderer which is an mx:Text object. I'm setting myText.htmlText to something like "test text which is really a lot longer than the column width". No matter what properties I set though, the text just runs off the end of the column. I tried wordWrap="true" on the dataGrid and also on each individual column. I also tried messing with css and tried applying it to the text field, but nothing seems to show up. Any Way to wrap htmlText in a text object? Also, but slightly less important, there are extra blank lines after each tag which I would like to get rid of.

Renderer code.
<?xml version="1.0"?>
<!-- itemrenderers/sparkmx/myComponents/SummaryRenderer.mxml -->
<s:MXAdvancedDataGridItemRenderer xmlns:fx="[URL]"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:s="library://ns.adobe.com/flex/spark"
textAlign="center">
[Code] .....

View 2 Replies

ActionScript 3.0 :: Text Wrap Around A Movieclip?

Aug 11, 2010

I was wondering if there is a way to make text wrap around a movie clip? I have a dynamic text box and the text is coming in from an XML file.

View 2 Replies

ActionScript 2.0 :: Wrap Text Around An Image?

Mar 11, 2004

A client has asked me to wrap text around a picture on the top right of the homepage. Can this be done. To be honest, I can't remember ever seeing this in flash. I have done a search for tutorials on google etc but found nothing. I am also including a picture so you can see exactly what I mean.

I use flash mx 6 - NOT flash mx 2004

View 14 Replies

ActionScript 3.0 :: Making Panels Wrap To Two Rows Or More?

Feb 23, 2010

I am using a for loop which creates 4 panels inside a tabnavigator. the problem is the panels all display in a vertical row. I am wanting to have two panels in row one then another 2 panels under that in row two. Not 4 in a vertical line.

View 1 Replies

Data Integration :: Text Wrap In ComboBox?

May 15, 2007

if it's possible to make text wrap in the combobox component, and if so, how? I've searched this and other forums/sites but have had no luck with an answer either way. I'd like to combobox to stay a set width and therefore wrap text lines that are longer than the width. Currently it's just cutting off the text.

View 2 Replies

ActionScript 1/2 :: Set A Word Wrap In The TextInput Component?

Jan 10, 2007

I'm using the TextInput component, but it doesn't seem toallow for a word wrap - when you type your letters just keep goingoff to the right and what you typed on the left isn't visible. Ifigure there's gotta be a way, but I looked around in thefiles and couldn't find it? Does anyone know how to do this?

View 1 Replies

ActionScript 3.0 :: Wrap Text On A Radio Button

Oct 3, 2008

without creating my own component is there any way to have the text on a radiobutton wrap so there is more than one line of text?

View 1 Replies

Professional :: Wrap Label Text In ComboBox?

Jul 5, 2010

I've got some sentences I need to put in a ComboBox as selections. They are much too long for the width of the box on the page. Is there a way to wrap the text in the ComboBox? I'm wondering if I need to put the text into a jpg or something and use that as the label.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved