Actionscript 3.0 :: Event Propagation In PV3D?

May 18, 2009

how event propagation works in PV3D its definitely not like the conventional Flash style. On a quick search i have been able to find out that its possible using the InteractiveSceneManager Class, but unfortunately

View 1 Replies


Similar Posts:


Flex :: Why Need To Use Event Propagation

Feb 25, 2010

Why we need to use event Propagation?

View 1 Replies

ActionScript 3.0 :: Any Way To Prevent Event Propagation?

Feb 5, 2009

I have a movieclip containg several containers with other objects attached to them. Those containers have different levels of nesting. Now I want to add an EventListener to the top-level MovieClip and the called function uses attributes of this MovieClip. Because
of that I cannot just retrieve the MovieClip by saying e.target.parent but have to stop the propagation. I know there is a stopPropagation() method but I don't really get how (and when) to use it.

If I have sth like this:
function myResponse(e:Event):void {
//Things happening
} myMC.addEventListener(MouseEvent.CLICK, myResponse);

Where do I have to stop the propagation?

View 1 Replies

ActionScript 3.0 :: Timers And Event Propagation?

Feb 8, 2010

I have a container named circleHolder_mc. Inside I have four circles named circ0_mc circ4_mc. My goal is to have each circle blink on mouseover. The closest I've got is the following code which causes all of the circles to blink at the same time.

circleHolder_mc.addEventListener(MouseEvent.MOUSE_OVER, onBlink)circleHolder_mc.addEventListener(MouseEvent.MOUSE_OUT, unBlink)
var timer:Timer = new Timer(1);timer.addEventListener(TimerEvent.TIMER, onTimer);
function onTimer(evt:TimerEvent):void{    alpha +=7;}
function onBlink(evt:MouseEvent):void{    timer.start();}    function unBlink(evt:MouseEvent):void{    timer.stop();    alpha = 100;}

View 16 Replies

ActionScript 3.0 :: Reach All The Children When Using Event Propagation?

Feb 24, 2010

I'm using Event Propagation in order to change the alpha of each Child on MOUSE_OVER, MOUSE_OUT, and MOUSE_DOWN using... evt.target.alpha On OVER the Child's alpha increases from 0 - 0.5. On OUT it goes from 0.5 - 0. On DOWN it goes to 0.5 and stays there even with a MOUSE_OUT. What I'd like to do is then add a button to the main stage which takes the visibility of all Children back to 0, a basic type of Clear button.

I have one way to do it where I list each Child in a function (all 9!). But can I re-write this so that all Children are effected writing so much code? Ideally I'd like to send a request to find the number of Children (9) and then use this variable to write a function which says (where 'n' is the Instance name of each Child) that n(0-numChildren).alpha = 0

[Code]...

View 3 Replies

ActionScript 3 :: Event Bubbling And Stop Propagation

Oct 18, 2011

What is the difference between event.bubbles to false for any event, And Setting event.stopPropagaion() or stopImmidiatePropagation() while handling event? I am using flex4 with as3.

View 3 Replies

ActionScript 3.0 :: Event Propagation With Masked Objects?

Sep 23, 2009

I have just learnt about event propagation and have made a few successful tests. However, I have encountered a problem when trying to use event propagation with several MovieClips that are masked and nested in a movieclip. The display list like so:
hd_cont > cndMask > cndThumbs > 9 movieclips with instance names box0, box1, etc etc.
I am attempting to scale the 9 movieclips at the bottom.

So I have tried:
Code:
hd_cont.addEventListener(MouseEvent.MOUSE_OVER, boxGrow);
hd_cont.addEventListener(MouseEvent.MOUSE_OUT, boxShrink);
function boxGrow(e:MouseEvent):void {
TweenLite.to(e.target, 1.5, {scaleX:1.5, scaleY:1.5, ease:Strong.easeOut});
e.target.alpha = .5;
[Code] .....

But when I reference the cndMask I get a
Code:
TypeError: Error #1010: A term is undefined and has no properties.
at gallery_fla::MainTimeline/gallery_fla::frame3()
message in the output panel.

View 3 Replies

Flex :: Debugging Focus And Keyboard Event Propagation In AS3

Dec 18, 2009

I have a custom TitleWindow component that is registered to listen for keyboard events from the user (so that esc closes the window, enter saves, etc.). However, in my testing I've found a couple cases where my keyboard event handlers don't fire. My best guess as to why this is happening is that there is some child component somewhere that has stolen focus and is stopping the keyboard events from propagating.

Unfortunately, due to the large number of components in my TitleWindow, I have no good way of knowing who has stolen the focus. My question then is, are there any good tips / techniques / tools for debugging focus issues and event propagation in Flex? Basically, I need something that will tell me who has the focus at any given time and who's handling an event at any given time... is that possible?

View 1 Replies

Flex :: Event Propagation Whilst Container Is Not Initialized

Jun 16, 2010

I have a Canvas (lets call it the Drop Box) which users can drag and drop external files onto. Next to this I have a ViewStack, of which one of the layers is a Canvas with a TileList. I have successfully managed to code it so that the items dropped onto the Drop Box appear in the TileList. I simply capture the darg drop event (lets call this event A) and dispatch a new one that the TileList is listening for (lets call this event B).

However, this only works if the ViewStack selectedIndex is set to that of the Canvas with the TileList. If the Canvas with the TileList isn't selected then the event listener which is added to the TileList at CreationComplete level (event B), won't be called until after the drag drop event has dispatched (event B). This means that something is firing before something even has a chance to listen for it!

I've tried looping until the Canvas with the TileList is completely drawn, but this causes the app to hang.

I've also tried passing the event to the Canvas and storing it locally, but when I attempt to access the clipboad of the event I get an error (dead clipboard).

Effectively I want to only dispatch the event to the Canvas after it's had a chance to load, and add the event listener to the TileList.

View 1 Replies

Actionscript 3 :: Flex 3 Event Propagation On A Composite Custom Component?

Jul 24, 2009

I have a custom component made up of a selectable control (radio button)and a text input. I want to perform some logic in response to the change events from both of those controls, but after that I want anything that is registered on the composite component's change handler to have a change to handle the events as well. The problem is, when I re-dispatch the events the event target has changed to my custom component, losing the originating event's target.

Here's my custom component:

<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml" label="{listItem.@text}" data="{listItem.@level.toString()}">
<mx:Script>

[code].....

In the event handler that receives change events from this component, I see that event.target is an instance of SpecifyRadioButton, not the TextInput or RadioButton, as I'd expect. How should I propagate the event to get what I want here?

Getting event [Event type="change" bubbles=false cancelable=false eventPhase=2]
from question0.tabSurvey.questionForm.questionContainer.Single94.VBox95.SpecifyRadioButton111

View 2 Replies

ActionScript 3.0 :: Propagation - Single Event Handler To Handle The Double Click

Jan 20, 2011

I have a couple of Sprites on my screen and I want to write a single event handler to handle the double click on any of those Sprites. The following approach works for every event type except DOUBLE_CLICK:

[Code]...

To make it work, because in my application I will have lots of Sprites. In my opinion, a single event and the target property are more efficient than hundreds of event listeners. Am I right or should add event listeners to every Sprite?

View 4 Replies

Flex :: Double Click Event Propagation On Datagrid Dependent On Component Order?

Mar 21, 2010

I'd like to have a double click event on a datagrid in Flex3. The following example only works if the Accordion (id = "mustBeSecond") container comes after the DataGrid. Why is the order of the components important and what can I do to prevent this behavior? (The example does not work. If you change the order of "mustBeSecond" and gridReportConversions" the example works fine)

<mx:Script>
<![CDATA[
import mx.controls.Alert;

[code].....

View 1 Replies

ActionScript 3.0 :: Mouse Event Propagation - Capture Independent Mouse Clicks On Both Of These Two Movie Clips?

Jan 22, 2009

I have a "large" movie clip and "small" movie inside a "large" movie clip but on it's let's say upper right corner:

Code:
largeMc.addChild(smallMc);[

If i try to catch Mouse.DOWN events on them the following way:


Code:
largeMc.addEventListener(MouseEvent.MOUSE_DOWN, largeClicked);
smallMc.addEventListener(MouseEvent.MOUSE_DOWN, smallClicked);

Then of course both event are captured no matter where i click.Is it possible to capture independent mouse clicks on both of these two movie clips and if so, how can i do that?

View 3 Replies

ActionScript 3.0 :: Mouse Event Propagation - Capture Independent Mouse Clicks On Both Of Two Movie Clips?

Jan 22, 2009

i have a following situation: I have a "large" movie clip and "small" movie inside a "large" movie clip but on it's let's say upper right corner:

Code:
largeMc.addChild(smallMc);

If i try to catch Mouse.DOWN events on them the following way:

Code:
largeMc.addEventListener(MouseEvent.MOUSE_DOWN, largeClicked);
smallMc.addEventListener(MouseEvent.MOUSE_DOWN, smallClicked);

Then of course both event are captured no matter where i click.Is it possible to capture independent mouse clicks on both of these two movie clips and if so, how can i do that?

View 5 Replies

ActionScript 3.0 :: Events - Propagation Equivalent For Siblings?

Aug 4, 2009

So I've got a project that loads some bitmaps and plonks each one on the display list with some events to allow me to drag them and click-to-front. It works fine by and large but if the bitmap is a PNG with transparency then normally clicking on a transparent bit will still trigger the events. I can get round that with a quick check of the pixel's alpha using hitTest no problem.

The issue I have is if there is a bitmap behind the front one showing through then I can't click on that. From Flash's POV I'm still clicking on the front-most clip as there is still something there, even if it is technically invisible, so the event is triggered 'properly'. From my point of view I want to click through that clip on the one behind it, like they were paper cutouts on a table.

I can't disable the top layer's mouseEnabled property because it still needs to listen for events. Either I need something like event propogation only with siblings on the display list or I'm going to have to maintain a list of all the relevant clips and keep checking they're under the mouse pointer. Obviously I'd rather the former at the latter is a kludge.

View 2 Replies

ActionScript 3.0 :: Integration Of 2d Elements With PV3D

Jul 26, 2010

how I might go about integrating a 2D layer on top of a Papervison layer.

my goal: attach some 2D elements to a 3d object that is shifting rotation in 3dspace. Specifically, I want to draw a 2d line - x/y origin is the bottom right corner of the plane.

1. Height? Width? I can obtain the screen coordinates of a given displayObject3D with the screen property, but this gives me the coordinates of the center of the object. I simply haven't found a method to return the value of a related coordinate (the bottom right corner...) Since pv3d is projecting the object as a flattened 2d image at render time, you would think there would be a built in method to get such a thing. I've played around with papervisions built in drawing api, and it does a fine job of replicating the 2d api - so that might be an option if I can't find the coords in a predictable way.

2. translating zoom and focus of the camera into a predictable pixel values. If I have a plane that I know the 3d location of, and, hypothetically, the camera is viewing it squarely, how would I take into account the zoom and focus to translate the initial dimensions of the plane into pixel perfect height/width values? (for example, to place a 2d rectangle over the 3d content.) I can do a scale hack where I've applied a manual multiplier (just through trial and error), but its not exactly pixel perfect...

View 0 Replies

Actionscript 3.0 :: PV3D: Collada Not Visible?

May 19, 2010

having a weird issue with a loaded Collada model. I'm not getting any errors as such, and I can trace out the collada's position etc, I just can't see it! Am I missing something stupid? Or is it a bad collada model, and if so how do I test for it? I thought it might be a texture issue, but I tried other collada models without textures and they show up as wireframes straight away.Here's the code:

Code: Select allpackage
{
import flash.display.Sprite;

[code]......

View 3 Replies

ActionScript 3.0 :: Do A Drag And Drop In 3d Like PV3D

May 19, 2011

I'm wondering if its possible to use for example Papervision or something similar to make a drag and drop action in 3d space. But when I say drag and drop I mean, you drag the object and then place it in its correct spot, if you do not, then you receive an incorrect message for example.

View 1 Replies

ActionScript 3.0 :: PV3D ShadedMaterial On A Collada File

Jan 20, 2009

i'm doing a materialtest with papervision, using some collada-objects that i load with the DAE-class. one thing that i didnt get to work is creating a shadedmaterial, not a shader as a material but combining a shader and my original material (loaded with the collada-file) into a new material. i dont get any errors, and when i look at examples i think i'm doing the right things, although the examples always create a new object from scratch (and add the ShadedMaterial to the fresh materialslist).What i do is load the objects, store their materials in an array (i clone them once they're loaded), and use this object-loop to create the shadedmaterial and replace it with its original.[code]The original materials are actually Bitmap FileMaterials, but since that's a subclass of BitmapMaterial i think that should work just fine. You can see my test here, every material works except for the flatshaded+bitmap, when i use that one my framerate drops dramatically but i dont see any change.URL...

View 1 Replies

ActionScript 3.0 :: Sphere Planes Rotation In PV3D

Oct 21, 2009

The effect I would like to achieve is when the plane around the sphere is clicked, the sphere rotates so that the plane is in the middle of the stage. but there always some problems when i clicked the plane the sphere seems like never rotate to it's back.[code]

View 3 Replies

ActionScript 3.0 :: PV3D Causes Movieclip To Spin Uncontrollably?

Feb 6, 2010

I have this script that creates a Tiltviewer effect and it works perfectly as long as you're on the page. However, if you switch focus to another browser window or tab, it begins to spin wildly and even takes a while to recover when the user comes back to the page.

ActionScript Code:
/* ----------  PV3D  ---------- */
import org.papervision3d.events.InteractiveScene3DEvent;
import org.papervision3d.materials.BitmapMaterial;

[Code].....

View 0 Replies

ActionScript 3.0 :: PV3D Gallery - Add Hyperlinks To The Images

May 26, 2011

I've been playing with this PV3D gallery that I found and dissecting and trying to learn everything I can, but I want to see if its possible to add hyperlinks to the images. Basically when the image resizes, I want it also to load a hyperlink after you click it again to remove the Image. I've included all the SourceCode in a zip file. If anyone can take a look and give me some pointers it would be awesome! edit*all the images are XML driven, I've tried making hyperlinks in the XML itself, but the way these gallery is setup is to load(img) not load(url)

View 1 Replies

Actionscript 3.0 :: PV3D Active HTML Links?

Apr 30, 2008

As part of a papervision project I need to render html text on to a plane. I've done this using a MovieMaterial and the html text renders perfectly as one would expect, except that any Code: Select all<a href=""> tags used in the html aren't working? Has anybody else experienced this problem? I've set the material to Code: Select allinteractive=true and that's working because buttons on the same material are working, just the html links aren't.

View 5 Replies

Actionscript 3.0 :: PV3D - MovieAssetMaterial Play And Stop

Jul 15, 2009

I have managed to create a Plane with a material that is a running movieClip with 8 frames. The thing is that I want to be able to play and stop that movieClip that's acting as the material of the Plane but can't seem to get to it... That movieClip called "walkingTest" that I'm using as the material, has another movieClip inside it called animatedDoll that is the one I need to play and stop.

[Code]...

View 2 Replies

Actionscript 3.0 :: PV3D - MovieAssetMaterial Play And Stop?

Aug 8, 2009

I have managed to create a Plane with a material that is a running movieClip with 8 frames. The thing is that I want to be able to play and stop that movieClip that's acting as the material of the Plane but can't seem to get to it...That movieClip called "walkingTest" that I'm using as the material, has another movieClip inside it called animatedDoll that is the one I need to play and stop. If I use:

walkingTest.animatedDoll.stop();

I get this error:

1119: Access to a possibly undefined property animatedDoll through a reference with static type flash.display:DisplayObject

But the weird thing is that this:

trace(movieAssetMaterial.movie);

Is working perfect. Here's the code...

Code: Select allpackage{
///
import flash.display.Sprite;

[code]...

View 1 Replies

Actionscript 3.0 :: Creating PV3D Textures With A Loop

Apr 28, 2010

I'm trying to create multiple objects in Papervision using Flash Builder, each one with it's own texture that I'm getting from an imported SWC.My code works perfectly if I apply one texture to all shapes, but when I try to put it into a loop I can't seem to get it to work. I think this is more of a syntax problem, I'm just not sure how to tell Flex what I want.Here's a chunk of the code that works fine, applying an "img1" texture to everything: [code]Does that make sense? I want each iteration of the loop to add a number to the end of "img" and apply that to the shape.

View 8 Replies

ActionScript 3.0 :: Adding Video Player To PV3D Cube

Sep 29, 2008

With some great tutorials on the web, I have created an interactive cube in PV3d with a movieAssetMaterial for one the faces. I would like to add a fully functional video player to this face. I have code for an AS3 video player that I placed in the main fla on the movie clip that acts as the material. The video streams in fine, but the interface does not work. I'm wondering if this is a scope issue, a problem with adding events to a movie asset material, or some other problem. The video player code is attached. I have the video player code inside the movieAssetMaterial.

View 1 Replies

Flash :: Port Away3d Scene With Animation Into PV3d?

Jul 25, 2010

How to port Away3d scene with animation into PV3d? Are there any tutorials on how to do that?

View 1 Replies

Actionscript 3.0 :: PV3D - MouseEvent.CLICK On Object Instead Of Face

Feb 10, 2009

I've created 4 cubes, which turn on Rollover and Rollout, and on Click they should move to new x y coordinates.The Rollover and out on the faces (workfront,workback) work fine, but i don't get it right to put the Click on the whole cube.if tried to address it with workcube.addEventListener(MouseEvent.CLICK, workclick); but that doesn't work.if i address it with this or without workcube all my cubes react to the click

Code: Select allvar workcube:Cube = new Cube(new MaterialsList({front:mat2, back:mat3, top:mat0, bottom:mat0, left:mat1, right:mat1}), 60,60,60,10,10,10);
scene.addChild(workcube);

[code]....

View 4 Replies

ActionScript 3.0 :: [PV3D] 'MaterialObject3D: TransformUV() Material.bitmap Not Found!?

Nov 14, 2009

I was recently trying to import some collada models from 3d studio max into flash. verything looks fine, but I have some kind of error which rather shouldn't appear: Quote:'MaterialObject3D: transformUV() material.bitmap not found!'I've found some answers by googling it, but I'm not sur

View 0 Replies







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