ActionScript 1/2 :: Have Movie Clip Effects Only Operate WHILE The Two Objects Are Colliding With Each-other?

Oct 18, 2009

I've been trying to figure out a way to have movie clip effects only operate WHILE the two objects are colliding with each-other. It seems after they collide, however, They no longer need to be in contact to execute the supposedly conditional command. In an attempt to get around "hit Test" I made a fake hitTest, below:
 
function zone(mc, zquestion){
if(man._y < mc._y +25 && man._y > mc._y -25 && man._x < mc._x +25 && man._x > mc._x -25){            mc.onRelease = function(){                trace(zquestion);            }        }else { null;}        }                    onEnterFrame = function(){    zone(block1, "Insert Important Question here?");                    if(Key.isDown(Key.LEFT)){man._x -= 5;}    if(Key.isDown(Key.RIGHT)){man._x += 5;}    if(Key.isDown(Key.UP)){man._y -= 5;}    if(Key.isDown(Key.DOWN)){man._y += 5;}        }
 
except my attempt at "null/do nothing" if coordinates don't equal all of the above has failed. I really don't understand the "else" command, and would like to know how to create a "if NOT X...then DO NOT do Y".

View 1 Replies


Similar Posts:


ActionScript 2.0 :: [fmx] Specify Random Effects On A Movie Clip?

Nov 14, 2003

I'm working on a variation of the photo gallery tutorial, and I've been trying to specify random effects on a movie clip which is dynamically loading photos. I tried using the idea of the randomly loading backgrounds to specify panning effects, except that flash is running several of them on each photo instead of one case to each time a new photo loads.Here is the script, without the random effects.......

[AS]
var absX = Stage.width/2;
var absY = Stage.height/2;
this.pathToPics = "";

[code]....

View 3 Replies

Flash :: Using Movie Clip Objects?

Sep 16, 2009

I am currently trying to design a small flash movie. I have a "Movie Clip" object (a short animation) that i wish to act like a static object until a certain frame on the main Timeline. Then i want it to play out, at it's own pace, just like normal, until it finishes (no looping).. What do i need to put into, and where do i put it? So in short, frame 30 of the main animation triggers the clip, whilst the main animation still runs.

[Code]...

A lot of solutions suggest a button, but I don't want to use a button, as it's not interactive - just a movie. i just want the damn movie clip to play in the damn movie when it reaches frame 30! it shouldn't be that hard..

View 2 Replies

Professional :: Exporting Masked Objects Into After Effects?

Mar 18, 2010

ive made a project of equalizers playing going up and down as e.q do.when i export the swf file its plays perfect but when i import it into after fx the e.q are static there is no motion.just the objects that are not masked are animating.

View 5 Replies

ActionScript 3.0 :: Referencing Objects In The Level Above The Movie Clip?

Sep 10, 2011

i want to referance objects in the level above the movie clip that i have the AS in.  what i mean is that i have a movie clip on the stage, and that movie clip has some actionscript in it, and that AS needs to refer to an object on the main stage, how would i do that?  i have tried parent and stage 1, but neither seem to work

View 4 Replies

ActionScript 2.0 :: Movie Clip Objects Stored In An Array?

Dec 21, 2006

Anyway, I am having problems with storing movie clip objects in an array because when I try to access them, it kinda loses its properties as a movie clip. Say, i have mc_1 stored in the array,and in the course of the flash movie, a button is triggered to change its visibility to "false".. what i do is, arr[0]._visibility = false.So here's what I'm really trying to do with my school project: I have 24 movieclips, i named them field1, field2, ..., field24. I stored them in an array. Initially, they're invisible. Then, a button is clicked to show one field. If the button is clicked again, the second field is displayed, and so

View 3 Replies

ActionScript 2.0 :: Manipulating Movie Clip Objects At Runtime?

Mar 19, 2007

I am fairly new to Flash and action script as a whole, and would like to know how one can write a script that allows users to rescale/ resize and rotate movie clip objects at runtime.I.e. When a user moves their cursor over an object on the floor plan, I would like for them to be able to either resize the object or rotate it.

After trawling the web, I am still yet to find an existing API that I can use to build my floor planner in Flash. However, I did stumble across the 'Space planner' created by Icovia for architects and interior designers alike. If you visit the icovia web site at http:[url].....and click on 'Test Drive' under Interior design and Home renovations section, you will see what I envisage for my project. However, all I would like to know for now is how I can manipulate objects on the floorplan using action script.

View 2 Replies

ActionScript 2.0 :: Manipulating The Individual Objects In A Movie Clip?

Sep 17, 2002

I know there is a way to manipulate the objects that are within a movie clip, but what's the syntax for it? For example, if i have a movie clip that consists of 4 squares, how would move just one of those at a time, separate from the other 3?

View 7 Replies

ActionScript 1/2 :: Draggable Objects Don't Register On The Droptarget As They Are Within Another Movie Clip

Apr 9, 2010

Unfortunatly im having to extend to more draggable objects. So they will be within another movie clip so i can have them scrolling. After making the scroll, the draggable objects dont register on the droptarget as they are within another movie clip. Below is i think the part of the code that needs to be changed so the draggable objects know where to find the drop target.

View 1 Replies

ActionScript 3.0 :: Movie Clip That Gets Bigger - Slider At The Bottom And Objects Fall From The Top

Jan 23, 2009

I am trying to design a very basic flash game. The basis of which is that there is a slider at the bottom and objects fall from the top and you have to avoid them. However, if the object lands on the slider, it also has to become part of the slider and so the area of the slider increases. I am unsure of how to code this last bit as the properties of the slider must change.

View 1 Replies

ActionScript 2.0 :: Changing Objects - When Move Mouse Over A Colored Box The Movie Clip Changes To The Corresponding Color?

Dec 7, 2004

I have been playing about with the "Changing colors with Actionscript" FLA found on this site. Basically, when you move your mouse over a coloured box the movie clip changes to the corresponding color. This is the AS

[Code]...

View 1 Replies

Flash :: Get The Object Colliding?

Jan 21, 2011

Is there a way to know which object an object is colliding with?... I want to create a 'box object' in flash that can identify any other object(Movieclips) that collides with it. For example, if I drop the box on the 'field' (engine or world), and i put anything inside it, I would like the box to tell me what kind of object it is colliding with. I can't use hitTestObject because I don't know which object the box will collide with in advance.

A rough pesudocode to what I want to achieve is as follows:

if ( Movieclip(parent). UNKNOWN_OBJECT .hitTestObject(this) )
trace(UNKNOWN_OBJECT.name);

UNKNOWN_OBJECT in the above example doesn't necessarily have the same data type.

View 1 Replies

ActionScript 3.0 :: Create An Colliding Items?

May 13, 2011

How can I create the objects which push eachother?

View 2 Replies

ActionScript 2.0 :: Can't Get Url Links To Operate

Oct 27, 2010

I am having a major problem trying to insert links in to a swf file.The file has three animated pictures that need to link to different sections of a website.

View 2 Replies

XML :: How To Operate Element Using ActionScript

Feb 7, 2012

<fpdl:StartNode Id="Goods_Deliver_Process.START_NODE" Name="START_NODE" DisplayName="">
<fpdl:ExtendedAttributes>
<fpdl:ExtendedAttribute Name="FIRE_FLOW.bounds.height" Value="20"/>
<fpdl:ExtendedAttribute Name="FIRE_FLOW.bounds.width" Value="20"/>
<fpdl:ExtendedAttribute Name="FIRE_FLOW.bounds.x" Value="11"/>
<fpdl:ExtendedAttribute Name="FIRE_FLOW.bounds.y" Value="117"/>
</fpdl:ExtendedAttributes>
</fpdl:StartNode>

fpdl is the namespace of xml, how can I operate the element of the xml by using the actionscript. I try to use example.["fpdl:ExtendedAttribute"] to visit the element, but it doesn't work.

View 3 Replies

Professional :: Operate Two Gallery On Same Site?

Nov 12, 2010

I'm editing a template built using Flash, which already have a page that is a photo gallery. I created two others. Edict everything right in the xml file. However, when I open the page properly direct the gallery just small pictures, directing the big (it should just be a small extension of) the original gallery.

View 6 Replies

Converting Symbols : Could Not Complete Operate Due To An Unknown Error

Jun 20, 2011

I have a scene where one of the Layers is an 8 framed animation. Thing is I just can't seem to convert it to a movie symbol. When I select the layer and press F8 it just makes a movie symbol with just one frame in it. If I try another way where I copy all the frames, select 'New Symbol' and paste all the frames into it I get an error message that says 'Could not complete operate due to an unknown error'. Im running Flash 5.

View 7 Replies

ActionScript 1/2 :: Targeting A Movie Clip Inside A Movie Clip Inside Another Movie Clip With A Twist?

May 9, 2010

Im able to link to a movieclip inside a movieclipUnfortunately one of the movieclips now are a scrollbar and scroll. Now the actionscript isnt working?cal.onPress = function() {gotoAndPlay(2);message1.contentMain.message.total = unit1;

View 17 Replies

ActionScript 3.0 :: Flash - Movie Clip To Play Unless The Person's Mouse Curser Is On The Movie Clip For More Than A Second

Jun 24, 2010

I am pretty new to ActionScript 3 and Flash. I don't want my movie clip to play unless the person's mouse curser is on the movie clip for more than a second. If the person just runs their curser over the movie clips really quickly, then it should do nothing. It must be more than a second. How do I code that?

[Code]...

View 17 Replies

ActionScript 2.0 :: DropTest - Check And See If The Dragged Movie Clip Is Completely Within The Bounds Of Another Movie Clip

Jan 11, 2010

I'm creating a small drag & drop activity, and I want to be able to check and see if the dragged movie clip is completely within the bounds of another movie clip (or at least in the bounds of a certain x/y zone on the main stage. I can't use dropTest because it returns true if any tiny bit of the movie clip overlaps with the dropTest movie clip.

I also thought of something that just checks the x/y coordinates of the dragged movie clip, but I'd need this to reflect a range of values rather than one coordinate. For instance, I'd want to return true if the movie clip's x is between 50-60 AND the y is between 50-60. I'm attaching a small graphic to illustrate in case my explanation isn't clear enough [URL]

View 3 Replies

ActionScript 2.0 :: On Button Release Clear Current Movie Clip And Bring In New Movie Clip

Feb 21, 2010

I have created a flash website, each button is a movie clip with an invisible button over it containing the following script

on (rollOver) {
_root.mouse_over_profile_btn = true;
}
on (rollOut) {

[Code]....

each page is also a movie clip and on release of a button its played. the problem is that when i press another button to play another movie clip 'page' the old content is still there.

Is there a way of reversing the page transition i have used to bring out the movie clip and then bring in the next movie clip.

View 0 Replies

ActionScript 2.0 :: Collision Detection - Goto A Certain Scence When A Movie Clip Collides With Another Movie Clip

Jun 22, 2005

i am making a pacman game, and i need to know how to make it go to a certain scence when a movie clip collides with another movie clip.

View 2 Replies

ActionScript 3.0 :: MCs Classes - Can't Send An Event From The Eagle Movie Clip Or The T2D Movie Clip To Tell The Other To Fade Out

Nov 5, 2010

There is a bad gap in my knowledge with Event Dispatch and Event architecture, and this problem proves it. I've been getting nowhere on this problem for two days, I've posted everything to my Flash site. Go here, please: [URL] Click on "Flash Banners" The two thumbnails represent two different classes. Each class is identical. Both are "extends Movie Clip" classes. Tweeners of various types control the hover and click methods. URL Loaders load the thumnails which I then wrap in MC's and make them buttonMode = true, etc. Hover and click to load the Banners on the thumbnails.

I can't send an event from the Eagle movie clip or the T2D movie clip to tell the other to fade out. Both Banner classes are instantiated through a separate Base class. I'm sure this has to be an Event Dispatch from one MC to another and that it can't be done by the Base class. how I can send an Event or Event Dispatch and what the code structure is so one movie clip can in one class can tell the other movie clip in the other class to disappear while it's neighbour is playing. I'm happy to post code or explain / clarify anything that's not clear.

View 1 Replies

ActionScript 3.0 :: Movie Clip On Main Timeline Receiving Input From Nested Movie Clip

Feb 23, 2011

I've got a main timeline .swf file called "blank.swf" which contains nothing but two blank movie clips one called called "pproduct", the other called "ppalette". In the script frame of this main timeline I use the simple "Loader = new Loader();" method to load a URL of an .swf file into the "ppalette" movie clip. The "ppalette" movie clip contains several color chip buttons, each of which use the same Loader method above to load an external .swf into a clip. Here's what I want to do: let those color chip buttons, when the "blank.swf" file loads, be used to load an .swf movie into the "pproduct" clip on the main timeline. I'm wanting to be able to swap depths with various movie clips which will take out the movie which has the palette, but I want whatever that palette has loaded in the original "pproduct" clip to stay there.

[Code]...

View 3 Replies

Media Server :: When Using RTMFP Protocol FMS Doesn't Operate In Channels

Nov 26, 2010

I'm developing an online meeting system with audio/video sharing, using Adobe Flex 4 and Flash Media Server 4. I'm using the RTMFP protocol to make the transmission of audio/video which increases considerably the performance. The trouble now is that i must record the audio/video transmitted, but i figured out that when using the RTMFP protocol the FMS doesn't operate in the channels. So, how could i make FMS record this channels?

View 1 Replies

ActionScript 2.0 :: Use A Timer Or Time Interval To Operate Automatic Switch?

Mar 11, 2004

I would like to load a movie .swf by clicking a button located in scene 1 so i use [code]Then I want once this loaded movie in scene 1 is finished to play to automatically switch to scene 2. and do the same again.Do i need to use a timer or time interval to operate the automatic switch? if yes how can i do that? or is there something simpler, I use flash MX.

View 5 Replies

ActionScript 2.0 :: Get A Movie Clip To Slowly Move To The Coordinates Of Another Existing Movie Clip

Oct 23, 2010

it seems simple enough but i have no idea on how i could get a movie clip to slowly move to the coordinates of another existing movie clip

View 5 Replies

Professional :: Create A Smooth Transition From End Of A Movie Clip To Beginning Of A Movie Clip?

Apr 8, 2012

I created a movie clip which plays ok. But when it ends there is a slight jump, if you will, when it goes back to frame 1 to begin playing again. Does anyone know how to make the transition unnoticeable from the last frame of a movie clip to the first frame of a movie clip?

View 4 Replies

ActionScript 3.0 :: Make A Movie Clip Follows Anther Movie-clip That Could Be Moved By User?

Sep 7, 2010

iam tring to make a new project , i just wants to know how to make a movie clip ( constant speed ) follows anther movie clip <--- "which can be moved by the user "

<<<>>>> i believe that this idea is good , that i records the X and Y postion of the User's movie clip and just make the other movie clip points at this postion and move toward it ,

how to make the other Movie clip (( which is a car ! .. so it have acceleration , speed , steering , etc )) go to this position or let us say try to??

View 9 Replies

ActionScript 2.0 :: Find The X-y Coordinates Of The Attached Movie Clip Within The Created Movie Clip?

Mar 26, 2006

Q1) The registration point of a created clip is top left - my question is how can I dynamically change it's registration point - say to center center?

(I am trying to attach a movie clip to a created clip and I wanted it to be centered inside the container - a related sub-question, how can I find the x-y coordinates of the attached movie clip within the created movie clip?)

Q2)When I tried to create two different movie clips, I found I had to create them at different depths, else the first would load and the second would not. Why would that be so? I'm on MX 2004 Pro.

View 4 Replies







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