IDE :: 3D Rotation By Code?
Apr 4, 2009
How can I control the center of rotation when manipulating CS4's 3D properties? --I mean in code, that is. I've set the 3D Center Point in the Transform Panel, and if I rotate the MovieClip in the IDE, it rotates correctly... but when I manipulate rotationY via code, that 3D Center Point is not used.
View 3 Replies
Similar Posts:
Jan 7, 2010
I have a movieclip and when I do 3D rotation from Transform panel, It rotates perfect, center is in the middle of image, and when I apply mc.rotationY, rotation center is in left of the image, aren't 3D rotation from Transform panel and mc.rotationY from AS same? what's up?
View 2 Replies
Mar 23, 2011
I'm trying to do some augmented reality projects with flartoolkit . I can now put simple 3d objects on my marker and it works fine , but I wanna give my project some events that the user can interact with. I'm trying to trace the rotation of the marker. there's a container:DisplayObject3D which my application uses to add the 3d objects , I traced this :"trace(container.rotationZ)" but it's just returning 0 . I studied another AR application's source code and it was using the rotation of it's container object without problem .and I think I should mention that I'm using the exercise file of seb lee delisle papervision3d course from [URL]. anyone has any experience with flartoolkit? the main functions of my my code is as below:
[Code]...
View 1 Replies
Aug 11, 2010
Is it possible to have the child movieclip rotate separate of the rotation properties assigned to the parent? so ultimately giving the child element it's own axis?I've customized Lee Brimelows (gotoandlearn.com) 3D carousel to spin on the x axis to make it a vertical carousel. I've also rotated that by 45 degrees on the y axis to see all the items, and wrote a snippet of code to hide the left portion of the carousel. The entire carousel is contained within the 'container' movieclip, and inside of that are my carousel items (as seen below), with the larger item being the item in focus.
On rollover of the item in focus, I want to rotate it so it faces the viewer (as seen below),basically removing the 45 degree rotation applied to the container.The problem i'm running into is when you rotate the container (changing the rotationX of the container), the axis basically rotates with it, so when i rollover the next item 'in focus', the following happens..(in the example where it appears how it want it to, the carousel is at a rotationX of 0, so it works fine)
View 2 Replies
Apr 21, 2009
Program A has a cannon that aims to line up with where-ever the mouse is pointing, in 360 degrees, and fires when the mouse is is clicked. Program B has an eye instead of a cannon that should in theory do similar functions when the capslock key is toggled, but instead only has a 90 degree range of motion from the Right of the eye toward the bottom (quadrant 4 only). Where did the ther 270 degrees of rotation disappear to?
[Code]...
View 4 Replies
Aug 11, 2006
i.m trying to create a 3d rotation much like the widely used carousel only the rotation i desire consist of four upright(90 degrees) movieclips resting on a slanted, 30 degree plane which rotate onEnterFrame or following a tween on a oval like path - then pause for a given number of seconds at the four movieclips positions equal in distance on the plane
function around() {
this._x = Math.cos(this.angle) * radiusX + centerX;
this._y = Math.sin(this.angle) * radiusY + centerY;
var s = this._y /(centerY+radiusY);
[code]....
View 7 Replies
Feb 23, 2009
Why isn't there the Z, rotation X and rotation Y fields in my motion editor panel?
View 1 Replies
Oct 8, 2009
I am watching the tutorial on the motion editor and when he opens the motion editor to edit the Rotation X and Rotation Y values I'm in trouble.My motion editor now only shows Rotation Z but, no Rotation X or Rotation Y. What am I doing wrong?
View 1 Replies
Dec 2, 2008
I am trying to do a simple "pseudo 3D" rotation of a movie clip. The clip would "flip" on to the screen. I have created the effect using PaperVision3D, however, the final SWF is about 64k and my project requires a smaller file size. I tried to create the flip effect manually by creating skewed versions of the clip and tweening between them, except this doesn't work because the shape is not tweaked along the vanishing point as it should be. It looks like perhaps I could accomplish what I want to do using the MatrixTransformer but I've not had much luck so far.
View 3 Replies
Oct 3, 2006
I'm trying to pause my rotation on rollover of a movieclip and restart rotation on rollout of the movieclip. Here is my current code,
[Code]...
View 1 Replies
Jan 12, 2011
As stupid as my question might sound, i have spent the last 2 weeks reading oop books; but could use some guidance. I have a flash project that is basically a supped up slide show. On the stage i have the following: main_mc (instance name = images_mc) = movieclip which holds "pictures" ui1 (instance name = ui1_mc) = user interface that allows user to draw on picture (when drawing is enabled) ui2 (instance name = ui2_mc) = activates invisible hit areas (buttons) on select pics, when hit area is clicked, we jump to another pic in the main_mc.
I accomplished all of this on the timeline, but am updating the code to OOP. I am having A HELL OF A TIME trying to figure out how to store references to the instances (images_mc etc..), so i can control them from varying class files. I have found it is easy to control the instances from the documentclass, but not from unrelated class files. Example: images_mc.stop(); works in document class; but ovieclip(Parent).images_mc.stop() doesn't seem to work from any class file.(ui2 class file for example);
[Code]...
View 2 Replies
Nov 20, 2010
here's a part of my code:
player_mc.onEnterFrame = function() {
if (enemy0.hitTest(this)) {
enemy0.speed = 0;
} else {
[code]...
Note the red code, I need to repeat this an unknown amount yet multiple times but with the number on the end of enemy incremented by 1 each time. It starts with 0 as you can see the code just above the red. I heard about for loops using 'i' but im unsure about how to use it.
edit: ah, this forum isnt letting me highlight red. Everything in this editor is also failing. well, when I say code in red i mean this code:
if (enemy1.hitTest(this)) {
enemy1.speed = 0;
} else {
enemy1.speed = 1;
}
View 3 Replies
Jan 29, 2012
I'm looking for a way to have my main timeline code interact with code inside of a symbol.I'm tying to get my timeline inside the symbol to gotoAndPlay(10) when something happens in my main timeline code.
View 3 Replies
Jan 22, 2011
I'm looking for a workaround to the "AdSense does not let you choose only images but no flash" issue. I'm rather a newbie to JS, but is there any way for one script to prevent other scripts embedded in a site from detecting the presence of the flash plugin? Even if it doesn't work with AdSense, it would be nice to know if there's a hack to do this that might work in other settings.By the way, I suppose I wouldn't care if it failed to work on IE or obsolete browser versions.
View 1 Replies
Jul 10, 2003
I have attached a simple test fla.I am trying to centralize my code in all my movies using dot notation instead of spreading my code all over the place. It never works, I must be doing something wrong.The test .fla has a movieclip with a timeline animation. I used the linkage identifier to name it 'reload' AND named the instance 'reload'.
_root.reload.onRollOver = function() {
this.gotoAndPlay(2);
}
The pointer doesnt even change to a hand.
View 4 Replies
Mar 27, 2011
Got to the point where the hole in my AS3 knowledge is getting large!Realising I have confusion about the relationship of:Body of code on first frame of AS3 file.(Which I have so far used to create instances of library objects using addchild and make calls to class code).Is this code called the document code? What do people call it?Numerous classes linked together by extending each other etc.Library objects (usually graphical objects)Should it be done differently? have the following problems due to lack of understanding:Addchild complicated from a class but straight forward in main body code.Cant call functions on the main body code from classes, because class code does not know the main body code exists?
View 1 Replies
Feb 4, 2010
I have 2 tables,a main table with a field code as primary key, and other table detail, named p.e. DetailTable, with 3 fiels as primary key.What I want to do, it's a delete a row in MainTable, all the rows in DetailTable,where field code is the same as field code in MainTable should be deleted too.Here is the SQL to create the tables.
var sql2:String = "CREATE TABLE IF NOT EXISTS MainTable [code]....
when tables are created, insert data. I connect without problems, delete a row in MainTable (see the code), for example delete row with code=4, but in the DetailTable, all the rows with code=4 are NOT deleted Why?
[CODE]// Inside a class
private var conn:SQLConnection;
public function constructorClass(){conn = new SQLConnection();ConexionBD();}[code]...
View 3 Replies
Jun 9, 2011
I've literally been staring at this for 7 hours. I'm missing something.I have two movie clips on the stage. The instance name of the first is puzzleAK. The instance name of the second is pieceAK.The first is linked to a custom class called GeoPuzzle. The second is linked to a custom class called GeoPiece.The code compiles but throws an error (as explained).The code in the main timeline:
puzzleAK.fullName = "Alaska";puzzleAK.abbrev = "AK";puzzleAK.isLocked = false;trace ("made it through puzzle definitions: " + puzzleAK.fullName + " " + puzzleAK.abbrev + " " + puzzleAK.isLocked);
[code].....
View 7 Replies
Dec 27, 2010
Is there a way to make code on the timeline and code in a separate AS file communicate with each other?I have two buttons, a yes button and a no button.I have a confirm box which is a movie clip. In the movie clip I have the two buttons on it and code so that every time one of the buttons is clicked it runs a function.I have the rest of my code for the movie (so the code to make the confirm box appear) on a separate AS file.Is there a way I can define the functions on the movie clip and run the functions with the separate AS file?
View 7 Replies
Aug 25, 2004
What library/API or even a program for converting flash code into html 5 code automatically do you recommend me?
View 2 Replies
Mar 19, 2009
converting the following code (i got from some site, i can't remember which) to on-frame code:
Code:
onClipEvent (enterFrame) {
with (_root.player) {
// Controls Player Speed
[Code].....
Basically its a movement and hittest script for a maze. It works great but I need it running within an onEnterFrame in the frame code.
Currently the code is on a clip which contains the clip "walls". and player is on the _root timeline.
View 1 Replies
Oct 22, 2011
I had a 2 frame setup with some actionscript for each frame. Tried to move it all into one class file and a
1. frame .fla. ; Hiding and showing the resp. moviclips when i virtually move from frame 1 to frame
2. Now I get these ...Error #1069: Property edit_panel_mc not found on flash.display and there is no default value. errors or..
when i thought beeing clever adding the stage. prefix ReferenceError: Error #1069: Property edit_panel_mc not found on flash.display.Stage and there is no default value. The mc's are on the stage... i have a single .as classfile. Why cant I reference them? or how should i do it/ what should i do to change it from beeing .fla script to class script.
View 9 Replies
Nov 17, 2011
I'm working on an app for iOS where I want to load content dynamically from the library that contains text and graphics inside different MovieClip's.However, I have a problem, the code I have is for bitmap!How can I change it so it works for MovieClip instead?I want to use the MovieClip instead of bitmap?Also want to use the MovieClip class instead of Sprite class?[code]
View 5 Replies
Jul 9, 2010
I'm looking for some help converting as3 code to pixelbender code in an attempt to improve the performance of my application. This as3 code goes as follows. I scan through the Number values of a bytearray in chunks. Lets say this chunk lenght was 100 numbers I read 2 numbers (left and right) and try find the maximum values. The numbers in my bytearray are PCM data so there is millions of them and this code can often take a long time to execute, especially on a low spec machine.
The whole aim of this is to render a waveform as quickly as possible. I know very little about pixel bender. I can basically make a new file and create a shaderJob of it in flash but I'm really uncertain how to approach this...
[Code]...
View 1 Replies
Oct 1, 2009
I see a lot of tutorials about coding actionscript 3 when they use all the code in a Class.I keep thinking every time why they use it in a class, instead of using actionscript on the stage.why it is more functional to code a class instead of putting code in the stage actionscript?
View 3 Replies
Jun 5, 2007
I have a button with the following code attached to it:
[Code]....
I want to use this code on a frame. Is it onLoad I need to use??
View 1 Replies
Jul 3, 2010
I have a small slideshow loading 3 different images with XML in an animated loader.My problem is that the first round, when the images are not cached in the browser, it starts playing before the images are finished loading.Is there a way to add a sort of preloading code to my code below without having to re-write everything? I tried to add an eventListener COMPLETE to the loading images but somehow it wont work?[code]
View 1 Replies
Jun 10, 2009
I am trying to replace some code which loaded an external image and triggered and function once completed with code that uses and embedded image. The relevant code looks like this.
Code:
[Embed(source='globe.png')]
public function Globe()
{
var imageLoader:Loader = new Loader();
[code]....
The commented out section is where it used to take the loaded image and apply it to a texturemap.I need to replace the lines of code in the first function with something that calls the second function correctly.
I have tried using function imageLoadComplete (e:Event = null)and calling it with imageLoadComplete(); in the first function but although it compile and runs without error, the program does not work properly. I suspect this is to do with the dispatchEvent(); line which I do not understand.
View 4 Replies
Sep 21, 2009
I have the code which is written in C++ I will like to convert the same in to Action Script 3 code can anyone help me how to coveter is available this is any converter is available for the same?
View 3 Replies
Mar 28, 2011
I was wondering how you can make variable code within code, for example, normally, you can use this["blabla"+variable]; to make the code say blablavariable. But now i want to make new variables by using this code, within a for loop [using teller1 as the increasing value] this["var ringsegment_mc:Ring_"+teller1+"=new [Ring_"+teller1+"]()"]; which i basically want to have say:var ringsegment_mc:Ring_1=new Ring_1();
but this doesnt work, it doesnt make a variable called ringsegment_mc. why I want to do this, is because i need to make an add child which makes 16 parts, from 16 different movieclips.
[Code]...
View 16 Replies