Background info: I am using ActionScript 2.0 and Flash CS5I was working on a game and I used photoshop to save a little gif image. I imported it into flash, "broke it apart", turned it into a movie clip, and put this bit of code on it. It rotates the image when the mouse is moved around it.
Code:
onClipEvent (enterFrame) {
// find x and y differences
I have found 2 different Threads about the topic, which worked fine.[URL]... and it seems that it is close to what I am trying to achieve. However, the codes that they came up with don't seem to work with mine. I attached the FLA.Anybody has a solution so when the stage is scaled down smaller than the original image size, the image stops scaling. And the image doesn't distort. The eagle on the intro scales proportionately and the one when you go to campaign section behaves exactly like I would like to.I've found the website here by the way, which was the starting point of my experimentation.
I have been struggling in Flash to find out if advanced bitmap distortion is possible in flash. I am talking about the same distortion effects that Photoshop generates by going to Filter > distort menu. Especially the spherize, Wave and Twirl effects. The displacement map filter introduced in Flash 8 or 9 has this capability. But I don't think it can actually distort the bitmap in Flash. All they do is create a false image and don't actually convert the image.So I want to imitate Photoshop in Flash so that when I have an image in Flash the user would feel like he's using Photoshop filters and twirling or spherizing the image.
I used the Photo Gallery using xml and Flash tutorial and created a nice gallery with thumbnails I increased the size to accommodate a 800x533px size picture however when the images are imported they are distorted to a size that looks to be around 900x400px I am using flash 8.
I have been trying to convert [URL] into as3. I am am very unfamiliar with flex. I have set the buttons for transform and loading the image but its just not working at all.
Here is the image distortion class Code: package { import flash.display.Shape; import flash.display.MovieClip; import flash.display.Sprite; import flash.display.Bitmap; [Code] .....
I want to do a distortion on a image. Something simple, i searched the web for a tutorial but I couldn't find one. What i need to do is to re-arrange the pixels in a video element or in a bitmap element.
I have a disc I am rotating with the mouse with event.MOUSE_MOVE, like a jog wheel on some audio equipment. Everything almost works as expected, but the problem I am experiencing is that the disc always jumps to the point where the user clicks on the disc. I need the point on the disc that the user clicks on to remain under the mouse while the user spins the disc but I can't seem to come up with the correct math to make it happen. Here's the code i am using:
var xd = (_knob.x - _stageRef.stage.mouseX); var yd = (_knob.y - _stageRef.stage.mouseY); var radAngle = Math.atan2(yd, xd); _knob.rotation = int(radAngle * 360/(Math.PI * 2) - 90);
_knob is a vector circle wrapped in a movieclip, with the circle centered on the movieclip's reg point. _stageRef represents the main stage.
I found this code online and he achieved a particular movement I want to use. Unfortunately, he's using numerical values instead of text. I followed all of his instructions, but I tried to replace the Vector with an array, and received an error. The error I have been receiving is "1199:type parameters with a non-parameterized type." That's because I added an array value instead of an vector, which this guy has done. What he has in his tutorial is correct with numerical values. Also he created a .as class called Item.as. Here is the AS code that is in the main timeline in a new layer called actions of my .fla file called rotate.fla:
//Save the center coordinates of the stage var centerX:Number=stage.stageWidth/2; var centerY:Number=stage.stageHeight/2;
how to rotate an image loaded using CameraRoll on an AIR for iOS app. This code below works fine (displayImage() is called when CameraRolls media event returns completed, and imageArea is the scrollPane where the image is shown.
function displayImage():void { var image:Bitmap = Bitmap(imageLoader.content);
[Code].....
With the second version the image seems to load because the scroll bars expand to the size of the image I choose, but I don't see anything on the stage.
I got an error saying "Attempted access of inaccessible method rotation through a reference with static type flash.display:Sprite.ssd.rotation(90)}" I just want to know how to rotate my image by 90degrees when I double click on it.
var shootingstar:Loader = new Loader(); shootingstar.load(new URLRequest("http://i51.tinypic.com/m8jp7m.png")); shootingstar.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadingComplete); var ssd:Sprite = new Sprite();
I am designing an image gallery to show project screenshots for a portfolio. The horizontally scrolling screenshots technique is nice, but I want to do something similar in 3D space.
When the user clicks on the screenshot buttons for the selected project, I want the appropriate image to rotate around an imaginary center, increase in scale, and fade in to full opacity.
At the same time, the other images need to rotate around the same center point and scale down while the alpha decreases. The Screenshot furthest away from the viewer would have the smallest size and lowest alpha setting. Here's a couple things that might throw a wrench into the works. I need to keep all the images facing forward (instead of rotating as if they were on a cyllinder). Also, not all of my projects have the same number of screenshots. Can I do all this with actionscript?
how to rotate about the center an image loaded dynamically through AS? I've already asked this question, no one answered, I searched, searched some more, looked through my fairly voluminous collection of example flas and have come up with nothing.The following code does rotate a mc about its center, but only (apparently) if the mc contains something when the swf loads.
Code: onClipEvent(load){ this.rotation_speed = 2; function origin(){[code].....
I am designing an image gallery to show project screenshots for a portfolio.The horizontally scrolling screenshots technique is nice, but I want to do something similar in 3D space.When the user clicks on the screenshot buttons for the selected project, I want the appropriate image to rotate around an imaginary center, increase in scale, and fade in to full opacity.At the same time, the other images need to rotate around the same center point and scale down while the alpha decreases. The Screenshot furthest away from the viewer would have the smallest size and lowest alpha setting. Here's a couple things that might throw a wrench into the works. I need to keep all the images facing forward (instead of rotating as if they were on a cyllinder). Also, not all of my projects have the same number of screenshots. Can I do all this with actionscript?
I have 2 images, a base and a top. I want the top to rotate to face an object but the base to remain constant. I can get close but when the top rotates it is rotating around the corner of the rectangle it is placed inside of rather than the center. Here's the AS code for the object.....but the important elements are bolded.
public class Turret extends MovieClip{ private var _root:MovieClip; [Embed(source='mortarbase.png')] private var mortarBase:Class; private var mbase:Bitmap = new mortarBase(); [Code] .....
I am in the midst of finishing up a design application where you can upload images and colors. I use the greensock transform manager. I am taking anything a user does and recording it so I can recreate what they made on larger scale behind the scenes (to be exported for printing purposes)
The problem I am running into is with rotation and moving x and y values. The transform manager does everything relative to a center point, but when i recreate the image object the registration point is at the top left. I have found how to rotate around the center of the object using the transform matrix, but I can't seem to move the x and y correctly because these values change when you rotate. I want to just move the image to the left or right relative to the center. How could I go about doing this.
Here is how I rotate.
private function rotateAroundCenter (ob:*, angleDegrees:Number, ptRotationPoint:Point) { var m:Matrix=ob.transform.matrix; m.tx -= ptRotationPoint.x;
I am having a quality issue when rotating images dynamically loaded into movieclips. I am not resizing them. I am only rotating them. I have tried applying smoothing to the bitmaps, but that has not helped.
It seems that after sometime working on this i have been able to come up with something which works the way i want it too, however there's this small problem. When i hover really fast over my buttons, it feels like flash just has a meltdown and stops running the function i have inside my button onRollOut.
So i got 5 frames with names "marine", "architectural", etc
In the first frame "marine" there is the following code (i've only included 1 of the buttons, but there another 4 with identical code where appropriate):
Code: stop(); //enter current[] and goto[] //current[marine][2] -> next[architectural][3]
I have the 3D rotating cube. Each panel of the cube is an image pulled in through actionscript. When you click on one of the panels, the cube straightens itself to show only the face you've clicked on. This is all great. However, I want to be able to click on that face again and have it link to a URL. This is where I get lost.
I feel like I'm ALMOST there - I've gotten it to work so that I can click the panel and it links to a URL, but right now every panel links to the same link. I haven't figured out how to make each panel link to its own separate URL. Here is the portion of code in my .FLA where I've added the linking action:
Code: setupFaceAction = function (cube) { for (var i = 0; i<cube.faceArray.length; i++) { var face = cube.faceArray[i]; face.onPress = function() { if (!cube.fading) { [Code] .....
This is the line I added to make it link when you click the panel after it's facing forward: Code: cube.getURL("[URL]", "_self");}
So I assume I need to set up some sort of array so I can have multiple links that correlate with the appropriate image. To make it clearer, I've attached all of my files, so you can see all the code. You'll find actionscript in the .FLA and two external actionscript files. I think "cube.as" may be where I need to do the work.
EDIT: It seems that after sometime working on this i have been able to come up with something which works the way i want it too, however there's this small problem. When i hover really fast over my buttons, it feels like flash just has a meltdown and stops running the function i have inside my button onRollOut.
So i got 5 frames with names "marine", "architectural", etc
In the first frame "marine" there is the following code (i've only included 1 of the buttons, but there another 4 with identical code where appropriate):
Code: stop(); //enter current[] and goto[] //current[marine][2] -> next[architectural][3]
I'm making a small Flash game, which is rotating rings in an image to create a coherent picture. Think of the puzzles in Assassins Creed.I have three scenes set up, one with the puzzle, one with a fade to white transition, and one with a congratulatory screen.
I have this code to check if the orientation of the rings match, but I'm really new to actionscript so I'm not sure if it's right or not.
I would like to ask if there is a way to distrort a video in flash cs4. Particularly i want to create a custom player to display flv videos and in the background, around the player area, play a distorted video probably blured or faded , short of like ambient light?
I have a rotating menu that sets the selected button to the 3:00 position once clicked. I need the labels for the buttons to stay in the upright position as they rotate with the button. I have attached an image. Anyone know of an action script that would keep the labels upright?
I want to tween a movieclip so it changes from squared to trapezoid. Just imagine a text paragraph distorted like the scrolling text in the beginning of Star Wars movies.It would be easy to make the shape and then distort it, but what I want is to tween from undistorted to distorted and it seems that normal tweening only allows skewing, rotation and resizing.Since a picture is worth a thousand words, this is what I want to do (the dog is not the movieclip I want to distort, just an example):This is easy in Photoshop (CTRL+T and then pick a corner with SHIFT+CTRL+ALT) and also in edition time in Flash, but I want the distortion to happen in execution time so it looks like the movieclip is standing up and then falls back.
Every time I package an android application and run it from my phone it really distorts images/movieclips.I can see slight transparancies around movieclips that shouldnt be there, images look pixelated, when played on the computer it shows no issues with any of it.Are there any tips or tricks to solving this?Also the performance just is spotty on the devices. Was using flash cs5 and just DL the trial of 5.5.Also is there a place to look at best practices for optimizing adobe air applicatiosn for mobile devices?
I'm making simple 3D transformations in Flash to rotate stuff, but I get distortions. I can rotation left, right, up, down, but not diagonally since it completely distorts my faces (the ones I draw).I think I fail to move the camera somehow, but I'm not experienced enough to understand my error.Here's the file: http:[url]....
Example: when a face is rotated at about 45° around the y axis (vertical to screen) and then rotated around the x axis the perspective doesn't feel right... the faces are too narrow.What I do is multiply the rotation matrices between themselves (the mouse position providing the angles) get the transformed points, project them to screen and draw boxes with them.
I am using Papervision3D Flash 3D engine to render a model. Also I am noob in 3D =D Model is simple, it's a parallelepiped with different textures on its sides. All works just fine except one thing: whenever I change my visual angle to a model from 90° textures on the sides are distorted. I notices that it is common effect in 3D graphics, I saw that effect in games and other 3D renderers (i.e. away3D, three.js) even wth different 3D models. Distorted texture on object (different view angle): Normal texture on object (same object and texture) (view angle == 90°): What is the reason of this effect?
rotating/scaling images is seemingly a no-go in flash at least when i try it.but still seeing sites as this: [URL]walk with me :
shangai : work : december 2007 : WWF
when you select a picture and zoom in, the transition is so darn smooth, the picture isn't even distorted/pixelated they use 2 versions, the original size, and the bigger size once clicked they switch between the two and scale them. Still it doesn't work well for me. i still have pixel distortion. i tried loadBithmapSmoothed classes, etc, all to no avail.