Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








Peeling Object Effect


I need to animate an object to give the appearance that the skin is being shaved or peeled off.
Imagine an apple, and a knife. The knife starts to peel the skin of the apple in a line, and slowly revolves around the whole apple in a spiral removing the skin. (Sorta like those machines that peel potatoes). Anyway, i need the animation to look like this, without the knife. I have no idea where to start, beside designing the apple symbol.

Any suggestions would be greatly appreciated




Adobe > Flash General Discussion
Posted on: 10/31/2007 01:02:44 PM


View Complete Forum Thread with Replies

Sponsored Links:

Can Someone Help Me Create A Peeling Effect?
Can someone please help me crete a peeling effect, like a sticker??? I am relatively new to flash but need to know for a uni project. I want to create a look as though you are peeling a sticker off a page to reveal something underneath.

Thanks a lot guys,

Bec

View Replies !    View Related
[F8] Peeling Sticker Effect
HI!

Does anyone know of a good tut/source/fla to create something similar to http://flash-stickers.com/index.php?p=samples

I have been searching high and low for something that does the same as that mxp - I have seen a few examples where the peel is tweened - but I would like to incorporate the way that any of the four corners can rolled/clicked/dragged to peel the sticker.

I also tried to tweak some code that i have for the page flip effect but the only works on one side and not the other two corners - anyone created something like this before?

View Replies !    View Related
Peeling Page Effect
I want to display photographs where it looks like you are reading a book and then you peel the page over to reveal the next photo. Any ideas on getting started? Any samples of this that work? I'm sure this is not a new idea. Cheers

View Replies !    View Related
Looking For A Fla - Masking Effect Like Peeling Paper
I am trying to achive an effect where transitions between movie clips involve the background peeling away like a piece of paper, and the next clip pasting down (basically the opposite of the peeling anim)

Has anyone seen a fla like this, I have seen that book one, but need it as a transition. I guess its some kind of scripted masking??

Thanks

View Replies !    View Related
Looking For A Fla - Masking Effect Like Peeling Paper
I am trying to achive an effect where transitions between movie clips involve the background peeling away like a piece of paper, and the next clip pasting down (basically the opposite of the peeling anim)

Has anyone seen a fla like this, I have seen that book one, but need it as a transition. I guess its some kind of scripted masking??

Thanks

View Replies !    View Related
How Is This Effect Created Of An HTML Page Peeling?
I am familiar with the page Flip effect now quite popular to create flash-based virtual magazines but its the first time I see a page pull on an html page. Can anyone explain how its done please?

http://www.anapharm.com/

View Replies !    View Related
Peeling Page
Does anyone know where I can get the actionscripting code to make a page peel.
I am making a slide show and am looking for this effect when changing from one slide to the next.

View Replies !    View Related
Peeling Page
Does anyone know where I can get the actionscripting code to make a page peel.
I am making a slide show and am looking for this effect when changing from one slide to the next.

View Replies !    View Related
How To.....simple Peeling Animation...
i want to make an animation showing a surface peeling up from one corner (imagine lifting carpet up from a corner)

i cant figure out how to do it in flash, ive tried shape tween but the whole thing messes up....

attched is a v simple version of what i want, how would you do it in flash?

thanks

View Replies !    View Related
How To.....simple Peeling Animation...
i want to make an animation showing a surface peeling up from one corner (imagine lifting carpet up from a corner)

i cant figure out how to do it in flash, ive tried shape tween but the whole thing messes up....

attched is a v simple version of what i want, how would you do it in flash?

thanks

View Replies !    View Related
Moving Clouds/Object Outline Effect/Buttons Effect - Please Help Me Help My Friend
I've neglected flash for years, mainly because it seems extremely confusing. I've tried to get into it, but it's confusing with 50 different objects in the flash project going on at once, how do you work with all that?

Anyway, I'm doing a website for a friend of mine, and I had this really cool idea that I've seen around and would like to add on to this and give him a nice surprise.

Basically I would like to add a moving clouds loop in the background, similar to this: http://www.templatemonster.com/websi...ates/9630.html

then have an outline effect of the house like this: http://www.templatemonster.com/websi...ates/5488.html

and finally add an effect to the buttons like this: http://www.templatemonster.com/websi...ates/6361.html
(actually I'd be fine with any button effect )

And I'd be happy with just the cloud effect lol. I looked around for tutorials but none of them seem to be what I'm looking for.

This is the header I'm working with, it is layered in Photoshop: http://tecmosuperbowl.net/header.jpg

I would like the clouds to blend in with the blue background gradient, but I don't know how to do this, in Photoshop it's Overlay. I've tried Alpha in flash, but all that does is change the opacity.

I'm not sure where to start, I doubt I could get this in for him in time, but it'd be great. (Sunday is when the site goes live ) Thanks for helping!

View Replies !    View Related
Cursor Effect To Object Effect
Hi
in a nut shell I have found this wicked piece of open source actionscript.

It responds to the cursor and was wondering if it is posible to modify the x_position and y_position actions and make the action respond to a moving object???? (a movieclip with a variable name)


is this to complicated to attempt or is it doable??


THANKS FOR ANY COMMENTS




ACTIONSCRIPT

Code:
//
var rows, colm:Number;
//
function setQuality(thisSpeed:Number):Void {
if (thisSpeed == 1) {
rows = 9;
colm = 18;
} else if (thisSpeed == 2) {
rows = 13;
colm = 22;
} else {
rows = 17;
colm = 28;
}
}
setQuality(_global.speed);
//
// p = point :: t = target :: d = distance :: c = constant :: v = velocity :: f = friction
function flex(p:Number, t:Number, d:Number, c:Number, v:Number, f:Number):Object {
var obj:Object = {d:(((t-p)/c)*v)+(d*f), p:p+d};
return (obj);
}
//
function createBackground():Void {
// start depth
var dep:Number = 1;
// create a background
this.createEmptyMovieClip("bk", dep++);
var bk:MovieClip = this["bk"];
var colors:Array = [0x297396, 0x0B1F28];
var alphas:Array = [100, 100];
var ratios:Array = [0, 255];
var matrix:Object = {matrixType:"box", x:left, y:top-90, w:right-left, h:bottom-top, r:Math.PI/2};
bk.beginGradientFill("linear", colors, alphas, ratios, matrix);
bk.moveTo(left, top);
bk.lineTo(right, top);
bk.lineTo(right, bottom);
bk.lineTo(left, bottom);
bk.lineTo(left, top);
bk.endFill();
// create mask for background
this.createEmptyMovieClip("ele", dep++);
var ele:MovieClip = this["ele"];
this.createEmptyMovieClip("mask", dep++);
var mask:MovieClip = this["mask"];
mask.beginFill(0x000000, 100);
mask.moveTo(left, top);
mask.lineTo(right, top);
mask.lineTo(right, bottom);
mask.lineTo(left, bottom);
mask.lineTo(left, top);
mask.endFill();
ele.setMask(mask);
ele.createEmptyMovieClip("dot", 10000);
}
//
function clearAll():Void {
removeMovieClip("ele");
removeMovieClip("bk");
removeMovieClip("mask");
}
//
function createForce(rws:Number, clms:Number):Void {
createBackground();
var ele:MovieClip = this["ele"];
ele.obj_array = new Array();
var maxn:Number = rws*clms;
var cnt:Number = 0;
// find the distance between the objects
var tween_w:Number = (right-left-100)/clms;
var tween_h:Number = (bottom-top-100)/rws;
// set the starting position for the first object
var start_x:Number = left+(tween_w/2)+50;
var start_y:Number = top+(tween_h/2)+50;
var pos_x:Number = start_x;
var pos_y:Number = start_y;
for (var i:Number = 0; i<rws; i++) {
for (var j:Number = 0; j<clms; j++) {
var obj:Object = {x:pos_x, y:pos_y, baseX:pos_x, baseY:pos_y, speedX:1, speedY:1};
ele.obj_array.push(obj);
/////////////////////////// increment x
pos_x += tween_w;
cnt++;
}
/////////////////////////// increment y
pos_x = start_x;
pos_y += tween_h;
}
///////////////////////////////////////set up force
// motion variables
ele.maxD = 100;
ele.power = 7;
ele.friction = .8;
ele.ratio = .25;
ele.maxD2 = ele.maxD*ele.maxD;
ele.a = ele.power/ele.maxD2;
ele.targx = _xmouse;
ele.targy = _ymouse;
ele.dx = 0;
ele.dy = 0;
////////////////////////////////////// extra forces
ele.onMouseDown = function():Void {
this.power = this.power*3;
this.maxD = this.maxD*1.5;
this.maxD2 = this.maxD*this.maxD;
this.a = this.power/this.maxD2;
};
ele.onMouseUp = function():Void {
this.power = this.power/3;
this.maxD = this.maxD/1.5;
this.maxD2 = this.maxD*this.maxD;
this.a = this.power/this.maxD2;
};
////////////////////////////////////////
ele.onEnterFrame = function():Void {
this.clear();
var objx:Object = flex(this.targx, _xmouse, this.dx, 9, 0.8, 0.85);
this.targx = objx.p;
this.dx = objx.d;
var objy:Object = flex(this.targy, _ymouse, this.dy, 12, 0.8, 0.85);
this.targy = objy.p;
this.dy = objy.d;
// force field
for (var i:Number = 0; i<maxn; i++) {
var obj:MovieClip = this.obj_array[i];
var disX:Number = this.targx-obj.x;
var disY:Number = this.targy-obj.y;
if (disX>0) {
var signX:Number = -1;
} else {
var signX:Number = 1;
}
if (disY>0) {
var signY:Number = -1;
} else {
var signY:Number = 1;
}
var forceX:Number = 0;
var forceY:Number = 0;
var dis:Number = (disX*disX)+(disY*disY);
if (dis<this.maxD2) {
var force:Number = (-1*this.a*dis)+this.power;
forceX = (disX*disX)/dis*signX*force;
forceY = (disY*disY)/dis*signY*force;
}
obj.speedX = (obj.speedX*this.friction)+((obj.baseX-obj.x)*this.ratio)-forceX;
obj.speedY = (obj.speedY*this.friction)+((obj.baseY-obj.y)*this.ratio)-forceY;
var nx:Number = obj.x+obj.speedX;
var ny:Number = obj.y+obj.speedY;
if (nx<left) {
obj.x = left;
} else if (nx>right) {
obj.x = right;
} else {
obj.x = nx;
}
if (ny<top) {
obj.y = top;
} else if (ny>bottom) {
obj.y = bottom;
} else {
obj.y = ny;
}
this.lineStyle(0, 0xCCFFFF, 40);
this.moveTo(obj.baseX, obj.baseY);
this.lineTo(obj.x, obj.y);
}
};
}
//
createForce(rows, colm);
//
stop();

View Replies !    View Related
How To Add Effect To An Object
when i add some text to the stage i can see the effects dropdown in the properties panel, but as soon as i select the text it disappears! (i've also tried making hte text into a symbol)

i want to add a motion effect to the text

any help is appreciated

View Replies !    View Related
Object Dock Effect
Guys,

Hey! IIIIIII'M BACK!

Does anyone have any ideas on how to do a similar effect as ObjectDock (default)?

Basically, what I want to do is have 10 icons, and when you mouseover them they enlarge and on mouseout go back to normal. That is easy enough, but I want same effect like ObjectDock, where the icons move towards the cursor when you roll near them...

View Replies !    View Related
Object Decomposition Effect
For example, i have an object (like square or something) and i need to animate it's decomposition and motion tween parts away. What would be the best approach to do that? My initial idea was something like: if this object is an image, maybe there is a BitmapData method that allows me to cut off a certain part of it so that i can save that part as movie clip and then tween it away?

thanks

View Replies !    View Related
Object Decomposition Effect
For example, i have an object (like square or something) and i need to animate it's decomposition and motion tween parts away. What would be the best approach to do that? If this object is an image, is there a BitmapData method that allows me to cut off a certain part of it so that i can save that part as movie clip and then tween it away?

thanks

View Replies !    View Related
Object Following Cursor Effect ?
Does any know of a good tut/action script for building a cursor effect. What I'm trying to do is make an object follow a cursor.If I can learn the Action Script for this type of project It will open doors for all kinds of cool stuff.I'm sure the fourm community can benefit from this style.Hey Thanx. <e>

View Replies !    View Related
Apply The Light Effect On A 3D Object
I've learned from the tutorials in making a 3D ring, however, the author didn't mention the light effect on the moving 3D object. Anyone know how to apply it to the 3D object without using 3rd party software.

thx for your help

View Replies !    View Related
Effect Of Passing Something Through A Solid Object
I need some help with figuring out how to do an effect like someone is climbing in or out of a solid object like a wall. I guess it is a masking like effect, but not sure how to go about it. Any ideas or examples?

thanks very much!

View Replies !    View Related
Object Gets Invisible After Applying The Effect
i would like to know that as i put the effect to an object, and get back to the workspace, so it shows that effected object invisible
in the flash working space .

like if i add alhpa (0%) effect to an name " waqas " so it invisible the "waqas" object from the main window, mean to discribe that it shows the fisrt frame, would you please tell me that is there any
way to show the last frame that could help me to view the object in
origal condition while i'm working on the main work space .

thank you very much



Reply as soon as possible

View Replies !    View Related
How Do You Make A Lighting Effect For A 3d Object?
Hi
I just wanted to know like if there was a 3d hexagon, how can you make it so that you can make it look like light or sunlight is hitting that side.
If you don't understand what i mean, please reply me and ask your question.
if you understand, please reply me and please help me

Thanks

View Replies !    View Related
Masking Draw Object Effect... With AS...
i have a simple .fla here which by using masks appears to "draw" a wavy box... (kinda choppy, just made it fast for example), what i am wondering is if there is a same way to achieve this effect through actionscript (not just draw a box, but to reveal any picture or shape, for a "drawing effect")

http://a2webdesign.com/jarvis/maskthing.fla for the fla

hope someone can help me, i'm kinda newish to AS, not much more then basics.

View Replies !    View Related
Masking Draw Object Effect... With AS...
i have a simple .fla here which by using masks appears to "draw" a wavy box... (kinda choppy, just made it fast for example), what i am wondering is if there is a same way to achieve this effect through actionscript (not just draw a box, but to reveal any picture or shape, for a "drawing effect")

http://a2webdesign.com/jarvis/maskthing.fla for the fla

hope someone can help me, i'm kinda newish to AS, not much more then basics.

View Replies !    View Related
Cool Effect, Grab Object And Spin It
HI guys,

Im trying to learn a new effect that cell phone companies usually utilize. This is when a viewer can grab the phone and spin it to view it from all angles. Can this be done with Flash? Thanks guys!!

linky link

View Replies !    View Related
Effect Of Outline Drawn Around Bitmap Object
I'm wondering if anyone can give me any input on how to create the effect of an outline being drawn dynamically around a bitmap object. Does this involve a mask, actionscript? It's a fairly common effect on car web sites now...Ford has used it a lot. An outline draws around the edges of a car image when the interface loads.

Any help would be greatly appreciated.

View Replies !    View Related
Making An Object Spin (spinning Globe Effect)?
I have this drill bit (it looks like this http://www.glossary.oilfield.slb.com/files/OGL99049.jpg ). I have drawn the first frame with all the gradients, etc., and it looks nice. I have another picture from a different angle for the next frame which I will do the same thing. I have all the angles I need, and I'm doing it every 5th frame. I want to create it so that it is spinning on the Y-axis, so it is as though you are seeing every angle of the drill bit as it spins.

If I'm not making sense, just think that I want to create a spinning globe.

Can anybody help, or at least direct me towards a tutorial or post that will help? Thanks.

View Replies !    View Related
PV3D Great White - DOF/different Effect Layer For Each Object
Hi!
I'm trying to create a simple dof effect, where an object is in focus when its z = 0. Kind of like: http://tom.drastic.net/archives/24#more-24.

I have two questions:
1. How can you update a layereffect value onEnterFrame?
the only way I have succeeded is by recreating the layereffect and effectlayer on each enter_frame, but I'm sure this isn't the most effective, nor the correct way to do it.

2. How can I apply this effect to any object individually?

The tutorials I've seen all apply the effect to the viewport only and the effect settings are static. I am quite new at PV3D and it's probably somthing obvious I'm missing.

I apologize if this has been covered, but I couldn't find it in the forums.

Any help or pointers would be greatly appreciated!

View Replies !    View Related
Setting BlendMode To Only Effect Object Inside Of A DisplayObjectContainer
I have a couple object inside of a DisplayObjectContainer (Sprite). Of these object, 1 is at the top of the display list and I want it to create a blendMode of OVERLAY on all the other objects inside of this DisplayObjectContainer... BUT I don't want it to effect anything outside of the DisplayObjectContainer. As is just setting it's blendmode effects everything on the stage that is below it in the DisplayList.

Does anyone know of a way to do this?

View Replies !    View Related
Object Position Effect The Panning Of Attached Sound
hey guys from one of the tutorials found on action script or flaskit i have started to create and adapt my own thing...... for now i have used the sound files from the tutorial... but they will change once i have them......

right then....... urm!lol

i have made it so that the volume of the sound attached to each duplicate movie clip is contolled by its possition on -y. i have also tried to make each MC do the same but for the panning control, with its left right possition...... but somethings gone wrong......

i have tried to addapt several tutorials to try and complete this task......

each Mc has to be started from the current position other wise all the location points will be out, after working this problem out i want to experiment with putting behaviours on each block so that they can be thrwn accross the stage and bounce and colide with oneanother... with all this i think that the sounds produced could be cool and interesting, with a variation on user and computer control....... hmmmm what do you think????

ok just zipped my file and it was 26.1mb from 32.....so i shal type the code i have used.actually its not letting me attach anything....*cries
too confusing so i took some screen shots...... this will confuse everyone........

no worries if no one replies cos it weell past my bed time aand have not done this very welll

View Replies !    View Related
How To Create A Springly Effect On An Object Attached To A String
Yeah really in need of help. I've look into the tutorial on how to create a springly effect on an object but it applies only in Flash 5 and not in MX. The problem is i manage to get 1 object to have a springly effect but the other objects just cant seem to move due to the startDrag function or the OnClipEvent. help me....

Secondly , i have an object attach on a curve line and when this object is pull i want one end of the line to stretch and follow the object while the other point stays at its original position. This create an extended straight linehow?

View Replies !    View Related
How To Create A Springly Effect On An Object Attached To A String
Yeah really in need of help. I've look into the tutorial on how to create a springly effect on an object but it applies only in Flash 5 and not in MX. The problem is i manage to get 1 object to have a springly effect but the other objects just cant seem to move due to the startDrag function or the OnClipEvent. help me....

Secondly , i have an object attach on a curve line and when this object is pull i want one end of the line to stretch and follow the object while the other point stays at its original position. This create an extended straight linehow?

View Replies !    View Related
Create A Perimeter Around An Object That Detects The Mouse And Triggers An Effect
I have my main movie called "base.fla". On "base" I have my logo at the upper right corner. It was a graphic symbol, I converted it to a movie clip called "tri".

What I want to happen is when the mouse pointer enters the perimeter of "tri" I want the _alpha action to take affect. The closer the mouse is to "tri" the lower the percentage of _alpha there will be on "tri". Kind of like a motion sensor. If the mouse pointer is X amount of distance from "tri", then "tri" will be X amount _alpha (higher or lower percentage) depending on the mouse's distance from "tri".

Say the mouse pointer is 200pt from "tri", then "tri" would be at 100% _alpha, meaning that 200pt marks the edge of the perimeter. If the mouse pointer was at 100pt from "tri", then "tri" would be at 50% _alpha.


-Thanks

View Replies !    View Related
Create A Perimeter Around An Object That Detects The Mouse And Triggers An Effect
I have my main movie called "base.fla" in Flash MX. On "base" I have my logo at the upper right corner. It was a graphic symbol, I converted it to a movie clip called "tri".

What I want to happen is when the mouse pointer enters the perimeter of "tri" I want the _alpha action to take affect. The closer the mouse is to "tri" the lower the percentage of _alpha there will be on "tri". Kind of like a motion sensor. If the mouse pointer is X amount of distance from "tri", then "tri" will be X amount _alpha (higher or lower percentage) depending on the mouse's distance from "tri".

Say the mouse pointer is 200pt from "tri", then "tri" would be at 100% _alpha, meaning that 200pt marks the edge of the perimeter. If the mouse pointer was at 100pt from "tri", then "tri" would be at 50% _alpha.


I was given this code to work with, it seems to be on the right track, but I do not know how to alter the code so that it is localized on "tri". This code makes it so that "tri" _alpha is affected by mouse movement, but not within the perimeter of "tri". The mouse is in the wrong location when it affects "tri" _alpha.
Anyway here is the code:
code:
MovieClip.prototype.distance = function(x, y) {
xm = _root._xmouse;
ym = _root._ymouse;
return Math.sqrt(((x-xm)*(x-xm))+((y-ym)*(y-ym)));
}

tri.onEnterFrame = function(){
if(distance(this._x,this._y)<=200){ //200 is optional
this._alpha = distance(this._x,this._y)*.5 //.5 is optional
}else{
this._alpha = 100;
}
}


If you know how to do what I am talking about please lend a hand.

-Thanks

View Replies !    View Related
"crazy Bright Object" Effect...
hi!
i'm stuck on this effect...

http://www.mupromo.ru/news.html
(top banner - bright moving object)

how would you do such thing? i'm not actionscript-guy, so maybe AfterEffects could help, don't know...
any suggestions would be helpful

View Replies !    View Related
How Is This Done (Drag Object Anywhere Return To Origin), Object Follow Mouse On Lock
Both on same site,

1/. how did he do the dragable discs to the left of the introduction text?

2/. how did he make it so when you roll over a menu link, an object follows it underneath, but also stays there until you roll over the next?

Thanks

View Replies !    View Related
Making An Object Dissapear Once A Moving Object Makes Contact With It
Hello there,

Im in need of some help. Basically I need a code which will make an object disappear once another moving object hits it (MovieClips controlled by AS)

For example, a bullet comes out of the gun and hits a can which makes the can disappear as soon as the bullet hits it.

Is it something to do with the "intersects" function? I've been trying to solve it all day and cant do it

Please help.

View Replies !    View Related
Whats It Called When You Drag An Object And Want The Object To Continue Moving
i am trying to work out how to make a draggable movie clip/button continue to move in the same direction as the drag guides it...hmmmm does this make sense???? what is this function / behaviour called.... i have looked at many many drag tutorials but at present have only managed to find drag and drop type onces with target positions.... also does any one know if it is possible assign multiple drag points.

regards....

View Replies !    View Related
Video Object - Call To Load And Listener Object Not Working
i've got a video object within a movieclip who's full path i put in a var called 'video'. here's my code, it appears that the video object is not loading my stream and/or i'm not getting the listener object to work properly... everything does trace out good as far as vars, rtmp address, etc... grrr!!!


Code:
//function to load the stream in the vid object
_global.loadVid=function(vidFile){
trace("this is path to vidObj: "+video);
trace("loadVid function var passed: "+vidFile);
var listenerObject:Object = new Object();
listenerObject.ready=function(eventObject:Object):Void{
//video loaded, do this
video.removeEventListener("ready", listenerObject);
_root.container.vidPanel.gotoAndPlay("tovideo");
trace("video is loaded, proceeding to video play state");
};
video.addEventListener("ready", listenerObject);
var nV:String=rtmpURL+vidFile;
video.load(nV, true);
trace("video: "+rtmpURL+vidFile+" should be loading");
}

View Replies !    View Related
How'd U Make An Object Snap 2 Its Original Pos On An Object Thats Moved?
I'm working on a school project using Flash mx that needs a scrolling inventory. I know how to get an object to snap back to its original position from a drag, but how would you get it to snap back to its original position on an object that has moved? ie. On a scrolling menu?

//script to have a spanner remove a head and snap back to position if it doesn’t touch the head on release:

//attach to object

onClipEvent (load) {
spanx = _root.spanner._x;
spany = _root.spanner._y;
}


//action inside clip

on (press) {
startDrag(this,true);
}

on (release, releaseOutside) {

if (this.hitTest(_root.dismantle.head) & _root.head_switch=="hollow") {
_root.spanner.gotoAndPlay(2);
_root.dismantle.head.gotoAndPlay(2);
this._y = 185;
_root.airbrush._x= _root.airbrush.airbx;
_root.airbrush._y= _root.airbrush.airby;
}

else {
_root.spanner.gotoAndStop(1);
this._x = spanx;
this._y = spany;
this.gotoAndStop(2);

}

stopDrag();

}

how would i script a scrolling inventory from which I can drag and drop objects that snap back to the same pos in the inventory even tho its moved? You can see the inventory on the right of the attached jpeg.

View Replies !    View Related
Papervision Acsess Individual Object Within .dae File/Object
Hello,

The following code loads a .dae file into a new DAE() Object i am trying to acsess a specific child within de Object called "Loja1" (one of many) with var storeisplayObject3D = holder.getChildByName("Loja1"); to individually rotate it etc... but with no sucsess.

Does anyone know how this is acomplished ?

Thanks in Advance.

files at : http://www.kiyoshii.com/transfer/src.zip


Code:
package {

import flash.display.Sprite;
import flash.display.Stage;
import flash.events.Event;

import org.papervision3d.cameras.Camera3D;
import org.papervision3d.materials.ColorMaterial;
import org.papervision3d.materials.utils.MaterialsList;
import org.papervision3d.objects.DisplayObject3D;
import org.papervision3d.objects.parsers.DAE;
import org.papervision3d.render.BasicRenderEngine;
import org.papervision3d.scenes.Scene3D;
import org.papervision3d.view.Viewport3D;

public class Pulitzer3d extends Sprite {
public var viewport:Viewport3D;
public var renderer:BasicRenderEngine;
public var scene:Scene3D;
public var camera:Camera3D;
public var dae:DAE;
public var cm:ColorMaterial;
public var holder:DisplayObject3D;
public var cameraBtn:BtnCamera;

public function Pulitzer3d() {
init();
}
private function init() {
//basic scene stuff
viewport = new Viewport3D(1024, 768, true,true);

addChild(viewport);

renderer = new BasicRenderEngine();

scene = new Scene3D();

camera = new Camera3D(holder, 15, 100);

camera.zoom = 500;

camera.z = -50;

//COLOR MATERIAL
cm = new ColorMaterial(0xFF0099, .85, true);

//DAE
dae = new DAE();

dae.load("floor_rename.dae", new MaterialsList( { all:cm } ));

holder = new DisplayObject3D();
holder.addChild(dae);

holder.rotationX = 90;
holder.rotationY = 45;

scene.addChild(holder);

var store:DisplayObject3D = holder.getChildByName("Loja1");

trace("DAE : " + store);

stage.addEventListener(Event.ENTER_FRAME, renderStuff);

}
private function renderStuff(e:Event) {
renderer.renderScene(scene,camera,viewport,true);
//camera.x += (((stage.mouseX-(stage.stageWidth * .5))*2)-camera.x )*.05;
//camera.y += (((stage.mouseY-(stage.stageHeight*.5))*2)-camera.y )*.05;
}
}
}

View Replies !    View Related
Web Service Param Is An Object Inside And Array Which Is An Object
Howdy. This is my first time on this forum, and I hope I get more help here than some of the other forums. I'll try to explain my dillema as simply as possible.

I have a webservice. I am calling a method 'InsertSlide'. That method requires and object as the paramater.
the object shcema looks like this:

Object
-SlideID (integer)
-Name (integer)
-SlideTypeID (integer)
-Hits (integer)
-LocationID (integer)
-SwfFileName (integer)
-SlideDataCollection (Array)
- -N (Object)
- - -Label
- - -Value

I hope that makes sense, all I'm trying to get at, is there is an object with an array as a property, that array is populated with an object and it has properties.

I recieve that same ojbect from the webservice fine, but when I send that object like that to the Webservice it does not fully populate my databases, unfortunatly I did not write the webservice.

Is it possible that the problem is the webservice? or flash?

Thanks for any help!
- Kiwi

View Replies !    View Related
Targeting Object Properties Inside PopUp Object
In my project I am creating a window using the PopUpManager. The symbol used to create that window has several objects.

For the sake of discussion we'll discuss the object message_txt inside myWindow.

How do I reference message_txt.text from actionscript after the object is dynamically created?

View Replies !    View Related
Gravity Issue? Object Slides Through Another Object Instead Of Sitting On Top Of It
Hello!

I have a file where two objects fall from the top of the stage and bounce and then eventually stop (using gravity and hit test).

You can grab the objects (a ball and a box --- each has a button symbol n the movie clip) and toss them and they bounce off each other and off the 4 sides of the stage.

The issue is when one of the objects is dropped directly on top of the other object, after it stops bouncing, it slides down until it hits the bottom of the stage (in this case, the box slides down in front of the ball, and the ball slides down in back of the box).

Is this because the gravity is pulling the object down to the bottom of the stage even though there's another object in its way?

How can I fix this so that the objects will still bounce off each other, and when dropped directly on top of each other object will stop instead of oozing through it (sorry, this is the best way I can describe it ?

I've attached 2 files (Fla 8 and Fla mx 2004).

-------- here is the gravity code on the first frame:


PHP Code:



var gravity:Number = 1.2;
var restitution:Number = 0.6;
var friction:Number = 0.9;

stop(); 




-------- here is the code on the ball


PHP Code:



onClipEvent(load) {
    var dragging:Boolean = false;
    var vel:Object = { x: 0, y: 0 };
    var pos:Object = { x: _x, y: _y };
    var old:Object = { x: _x, y: _y };
    var radius:Number = this._width / 2;
    var movie:Object = { width: 400, height: 300 };
}

onClipEvent(enterFrame){    
    if( !dragging ) {
        vel.y += _root.gravity;
        
        pos.x += vel.x;
        pos.y += vel.y;

        if( pos.y + radius > movie.height ) {
            pos.y = movie.height - radius;
            vel.y *= -_root.restitution;
            vel.x *= _root.friction;
        }
        
        if( pos.x + radius > movie.width ) {
            pos.x = movie.width - radius;
            vel.x *= -_root.restitution;
        }
        
        if( pos.x < radius ) {
            pos.x = radius;
            vel.x *= -_root.restitution;
        }
        
        _x = pos.x;
        _y = pos.y;
        
    } else {
        old.x = pos.x;
        old.y = pos.y;
        pos.x = _x;
        pos.y = _y;
        
        vel.x = ( pos.x - old.x ) / 2;
        vel.y = ( pos.y - old.y ) / 2;        
    }    

    
if(this.hitTest(_root.box)) {
        trace("hit");
        // ball and box are colliding, so lets reverse their movements.
        vel.x *= -1;
        vel.y *= -1;
        _root.box.vel.x*=-1;
        _root.box.vel.y*=-1;
        
        /*  these actions could be made more realistic by determining the precise
        position of the ball relative to the box during the collision, for instance,
        determine if the right side is colliding with the left side, so only reverse
        the x velocity, instead of both.  */
    }
    
    //this prevents the ball from leaving the upper extreme of the stage
    if (this._y < 0) {
            vel.y*=-1;
    }  





-------- here is the code on the button inside the ball (so you can drag and release the ball)


PHP Code:



on(press){
    startDrag(this,false,16,16,384,284);
    dragging = true;
}
on(release, releaseOutside){
    stopDrag();
    dragging = false;





-------- here is the code on the box


PHP Code:



onClipEvent(load) {
    var dragging:Boolean = false;
    var vel:Object = { x: 0, y: 0 };
    var pos:Object = { x: _x, y: _y };
    var old:Object = { x: _x, y: _y };
    var radius:Number = this._width / 2;
    var movie:Object = { width: 400, height: 300 };
}

onClipEvent(enterFrame){    
    if( !dragging ) {
        vel.y += _root.gravity;
        
        pos.x += vel.x;
        pos.y += vel.y;

        if( pos.y + radius > movie.height ) {
            pos.y = movie.height - radius;
            vel.y *= -_root.restitution;
            vel.x *= _root.friction;
        }
        
        if( pos.x + radius > movie.width ) {
            pos.x = movie.width - radius;
            vel.x *= -_root.restitution;
        }
        
        if( pos.x < radius ) {
            pos.x = radius;
            vel.x *= -_root.restitution;
        }
        
        _x = pos.x;
        _y = pos.y;
        
    } else {
        old.x = pos.x;
        old.y = pos.y;
        pos.x = _x;
        pos.y = _y;
        
        vel.x = ( pos.x - old.x ) / 2;
        vel.y = ( pos.y - old.y ) / 2;        
    }    





-------- here is the code on the button inside the box (so you can drag and release the box)


PHP Code:



on(press){
    startDrag(this,false,16,16,384,284);
    dragging = true;
}
on(release, releaseOutside){
    stopDrag();
    dragging = false;






I appreciate any help anyone can give me to fix this issue, I don't understand enough yet about how these objects are interacting to fix this --- but I hope to learn from you brilliant Kirupians!) Thanks!

Hondo311

View Replies !    View Related
Tween Class To Move An Object Called From Within The Object
I have a custom class that I want to move with the Tween Class
I am calling the Tween constructor from within that class but when I pass the keyword "this" as the object of that constructor , it doesnt move at all the code is as follow


PHP Code:



package{import fl.transitions.Tween;import flash.display.MovieClip;public class PortViewer extends MovieClip{var _twn:Tween;public function PortViewer(){    _twn = new Tween(this, "y", None.easeNone, 0, 100, 2, true);}}} 




how do I reference the object from within itself is there another keyword?
There are no errors it just doesnt move

Thank you Kirupa forums

View Replies !    View Related
AS3 - Papervision Acsess Individual Object Within .dae File/Object
Hello,

The following code loads a .dae file into a new DAE() Object i am trying to acsess a specific child within de Object called "Loja1" (one of many) with var store: DisplayObject3D = holder.getChildByName("Loja1"); to individually rotate it etc... but with no sucsess.

Does anyone know how this is acomplished ?

Thanks in Advance.

files at : http://www.kiyoshii.com/transfer/src.zip


Code:
package {

import flash.display.Sprite;
import flash.display.Stage;
import flash.events.Event;

import org.papervision3d.cameras.Camera3D;
import org.papervision3d.materials.ColorMaterial;
import org.papervision3d.materials.utils.MaterialsList;
import org.papervision3d.objects.DisplayObject3D;
import org.papervision3d.objects.parsers.DAE;
import org.papervision3d.render.BasicRenderEngine;
import org.papervision3d.scenes.Scene3D;
import org.papervision3d.view.Viewport3D;

public class Pulitzer3d extends Sprite {
public var viewport:Viewport3D;
public var renderer:BasicRenderEngine;
public var scene:Scene3D;
public var camera:Camera3D;
public var dae:DAE;
public var cm:ColorMaterial;
public var holder:DisplayObject3D;
public var cameraBtn:BtnCamera;

public function Pulitzer3d() {
init();
}
private function init() {
//basic scene stuff
viewport = new Viewport3D(1024, 768, true,true);

addChild(viewport);

renderer = new BasicRenderEngine();

scene = new Scene3D();

camera = new Camera3D(holder, 15, 100);

camera.zoom = 500;

camera.z = -50;

//COLOR MATERIAL
cm = new ColorMaterial(0xFF0099, .85, true);

//DAE
dae = new DAE();

dae.load("floor_rename.dae", new MaterialsList( { all:cm } ));

holder = new DisplayObject3D();
holder.addChild(dae);

holder.rotationX = 90;
holder.rotationY = 45;

scene.addChild(holder);

var store:DisplayObject3D = holder.getChildByName("Loja1");

trace("DAE : " + store);

stage.addEventListener(Event.ENTER_FRAME, renderStuff);

}
private function renderStuff(e:Event) {
renderer.renderScene(scene,camera,viewport,true);
//camera.x += (((stage.mouseX-(stage.stageWidth * .5))*2)-camera.x )*.05;
//camera.y += (((stage.mouseY-(stage.stageHeight*.5))*2)-camera.y )*.05;
}
}
}

View Replies !    View Related
Papervision Acsess Individual Object Within .dae File/Object
Hello,

The following code loads a .dae file into a new DAE() Object i am trying to acsess a specific child within de Object called "Loja1" (one of many) with var store:DisplayObject3D = holder.getChildByName("Loja1"); to individually rotate it etc... but with no sucsess.

Does anyone know how this is acomplished ?

Thanks in Advance.

files at : http://www.kiyoshii.com/transfer/src.zip

Code:

package {

import flash.display.Sprite;
import flash.display.Stage;
import flash.events.Event;

import org.papervision3d.cameras.Camera3D;
import org.papervision3d.materials.ColorMaterial;
import org.papervision3d.materials.utils.MaterialsList;
import org.papervision3d.objects.DisplayObject3D;
import org.papervision3d.objects.parsers.DAE;
import org.papervision3d.render.BasicRenderEngine;
import org.papervision3d.scenes.Scene3D;
import org.papervision3d.view.Viewport3D;

public class Pulitzer3d extends Sprite {
public var viewport:Viewport3D;
public var renderer:BasicRenderEngine;
public var scene:Scene3D;
public var camera:Camera3D;
public var dae:DAE;
public var cm:ColorMaterial;
public var holder:DisplayObject3D;
public var cameraBtn:BtnCamera;

public function Pulitzer3d() {
init();
}
private function init() {
//basic scene stuff
viewport = new Viewport3D(1024, 768, true,true);

addChild(viewport);

renderer = new BasicRenderEngine();

scene = new Scene3D();

camera = new Camera3D(holder, 15, 100);

camera.zoom = 500;

camera.z = -50;

//COLOR MATERIAL
cm = new ColorMaterial(0xFF0099, .85, true);

//DAE
dae = new DAE();

dae.load("floor_rename.dae", new MaterialsList( { all:cm } ));

holder = new DisplayObject3D();
holder.addChild(dae);

holder.rotationX = 90;
holder.rotationY = 45;

scene.addChild(holder);

var store:DisplayObject3D = holder.getChildByName("Loja1");

trace("DAE : " + store);

stage.addEventListener(Event.ENTER_FRAME, renderStuff);

}
private function renderStuff(e:Event) {
renderer.renderScene(scene,camera,viewport,true);
//camera.x += (((stage.mouseX-(stage.stageWidth * .5))*2)-camera.x )*.05;
//camera.y += (((stage.mouseY-(stage.stageHeight*.5))*2)-camera.y )*.05;
}
}
}

View Replies !    View Related
Position Object By Center Of Other Object And Stage Left...?
lol! :lol:

what i mean is i have an object (mc = main_logo) that centers itself upon load:

main_logo._x = Stage.width / 2;
main_logo._y = Stage.height / 2;

and i want another object (mc = helmet) to always load up 2/3rds to the left (x axis) of main_logo's center (counting left to right, 2/3rds between main_logos center and stage left border) and 200 pixels above (y axis) main_logo's center.

i know i keep asking these things and i'm not trying to have you all do every little thing for me, i am trying to learn this! it's just that my brain operates differently and i have to assimalate information by what i'm trying to accomplish...

thanks!

View Replies !    View Related
How Do I Move An Object In The Opposite Direction Of Another Object?
Hello,

This seems like it should be easy but for some reason I'm having trouble making it happen... any help would be greatly appreciated.

I know how to set the Y position and get the Y position of objects, but what I'm trying to do is have one object move exactly opposite to another.

The first object is draggable. If it is dragged up 10 pixels, then I want the other object to move down 10 pixels.

Any suggestions?

Thank you!!

Janet

View Replies !    View Related
Uploading A Flash Object -- Speed Of Object
If I insert an object into a plain web page -- nothing else on it, in order for that flash object to function, Q: the only thing I upload to the web (besides the page of course) is just the flash object file???

When I saved the file, I see I have two: a Shockwave Flash Object, and a Swish Movie.

So I'm confused on how I saved these files and why I ended up with two?

Are there different methods of saving them? a correct way and an incorrect way?

And how do you take one of these objects/movies and condense it so it still works the same but loads quickly?

pj

View Replies !    View Related
Problem Controlling Object From Another Object (scroll Bar)
First time posting here so hope I don't screw up here

Hope I can exlpain my problem and make sense. What I am trying to do control an object from another object. It's a scroll bar moving a block of text. Each line is going to be a button trigering a loadmovie() in a main flash movie. I have a working version of the scroller in a different movie, but in this case the scroller is within another instance. I'm guessing that my instance references are messed up but I can't figure out which ones. I used this tutorial to create this scroller: http://www.flashcircle.com/display.php?storyid=40

Here's a link to the fla:
http://www.httpworkshop.com/navigation.fla

Any help will be greatly appreciated.

View Replies !    View Related
Problem Rotating An Object Relating To Another Object...
Hi everyone...

I'm pretty much a newbie, and, naturally, stumped. If anyone can help me out, i would really appreciate it...

I have a lollipop-type object; (it has line/stem that attaches to a circle, fixed to the top of one end).

I want to rotate the object 180 degrees and have it pivot on the end opposite the circle (so the end with the circle appears to swing in an arc). At all times, the circle and the stem must seem to be joined as if they were one solid object. So far, no problem.

However, durning the arc, the stem must shrink in size an x amount. The stems' rotation point must remain fixed; it can't appear to move. The circle must remain it's original size, but still be attached to the stem, thus, the circle's position should gradually be closing up the space left by the shrinking stem at the same time the circle is moving through the arc. And i cannot figure out how to make this work!

To make the rotation work so far, I set the registration pt for the stem at the base of the stem (the pivot pt for it's rotation), set the registration pt for the circle also at the base of the stem (so they would share the same pivot point) and moved the circle to where it would set in relation to the stem. Then for both, i made _rotation = x, and on the stems' enterframe, i added 1 to x for both mcs.

(Also, to complicate the issue, at the beginning of the animation, the stem needs _xscale from 0 to 100, at which point it attaches the circle to it's tip; thus, the necessity of creating two movie clips: one for the stem, one for the circle.)

Thanks again for the help...

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved