ActionScript 3.0 :: Carry Out HitTest With Two Child?

Sep 3, 2011

I've been trying to carry out hitTest with the two child.They are namely enemy and weapon. However,it seems not working.I had been attempting to sort it out myself and searched the Internet but I got no idea of how to solve it.

stage.addEventListener(Event.ENTER_FRAME, enterFrameHandler);
function enterFrameHandler(event:Event)
{[code]...........

View 10 Replies


Similar Posts:


ActionScript 3.0 :: Hittest Only Working With 1 Added Child

Mar 29, 2011

Ive got this piece of script where i place objects on the stage, to hittest eachother.Ive got two seperate addchilds: one child must hittest another child.[code]only one instance of the hitte_mc will hittest with the instances of Ring.

View 5 Replies

ActionScript 2.0 :: HitTest In Child/nested Movieclips?

Jun 8, 2006

i searched everywhere, i was not able to find a solutionmy xml menu implementation use a "main" Menu class. This class parse the xml file and create an aeeay of MenuItem class.MenuItem costructor is (stripped down version) something like this:Code:function MenuItem(name: String, url: String, parent_mc: MovieClip)parent_mc is a reference to the "container" MovieClip for Items (generally an emptymovieclip made by Menu class)

View 3 Replies

ActionScript 3.0 :: Adding Child To An Array And Applying Hittest Object?

Mar 20, 2012

regarding adding multiple childs to an array these childs are added using timer after a time interval.actually there two classes and child of both classes are added to stage one through timer as i described and other through keyboard event. now is it possible to do this if yes than how?? and is it possible to apply hittest object between these two array.

View 6 Replies

IDE :: How To Carry Through A Banner Tag

Jul 21, 2009

im looking for a way to carry through an affiliate banner tag within a download link with my flash MC. the initial php script is

<a href="http://download.site.com/download.asp?file_name=site.exe&ul=<?php echo $_SESSION['language']; ?>〈=<?php echo $_SESSION['language']; ?>&banner_tag=<?php echo $_SESSION['btag']; ?>"><img src="images/download.gif" width="410" height="89" border="0" alt="Download site" /></a>

I would need to add some variable I guess to the flash?

View 2 Replies

ActionScript 2.0 :: Button Does Not Carry Out Two Functions?

Apr 26, 2011

i have a button which should generate two different variables, but it only carries out 1 function and not the other. If i put another button calling the second function it just overwrites the mc generated from the first function.

Also, I need the functions to be on the main timeline as i also need to remove the mcs when needed.

View 1 Replies

ActionScript 3.0 :: Variables Won't Carry Over To Loaded Mc

Jul 5, 2010

in my script, when a button is clicked it loads a movie clip from the library onto the stage

but what that movie clip does is supposed to be dependant on what button is being pressed. however that movie clip being loaded onto the stage doesn't seem to recognize or load any of the variables from the stage.

its as if, since the movie clip does not exist when the fla is initially run, the movie clip doesnt recognize previously existing variables.. or doesnt recognize any variables outside of itself

View 6 Replies

ActionScript 2.0 :: CS3 XML Variable Doesn't Carry Into Second Bit Of Code

Nov 23, 2009

Flash CS3, AS 2.0 so I have an XML file containing the number 72, and this script:

Code:
var imageNumber = new XML();
imageNumber.load("imageNumber.xml");

Then later, this script:

[Code]...

The problem is, the variable doesn't carry into my second bit of code. I can add a button and use trace to display the correct variable in the output box, so I know it's getting into Flash. The problem is that it's not applying itself to the second piece of script. Triple checked that the code with by putting in the number manually and using a normal variable, only when I use the XML file as a variable does it refuse to work. I'm very new to Flash so sorry if I've left any important information out, but can anybody shed some light on this?

View 6 Replies

ActionScript 1/2 :: Make Background Carry On Outside Of Stage?

May 15, 2009

I want a black box to fade out the rest of my site when a user clicks on a section in my portfolio, but I want it to go outside of my stage, for when people have larger screen.
 
If you click on Web/Interactive on the post it you can see what I mean:

[Code]....

View 11 Replies

ActionScript 2.0 :: Movieclip To Carry On Playing Even When Not On Stage?

Aug 10, 2007

I have a movieclip called MC1 and within that 2 frames each containing movieclips called MC2 and MC3. The user can change between the two movieclips and MC3 has a animation within it. Once MC3 is activated, its animation plays but when the user changes to MC2 and then to MC3, the animation is back at the beginning, I want it to keep going even when the user changes to MC2 so when he switches back, the animation is still carrying on.

So basically, I need to know if there is way to have the movieclip playing even if it is not on stage.

View 2 Replies

ActionScript 2.0 :: Mute Button To Carry Over To Other HTML Pages

Aug 19, 2009

I've found an example of this [URl] If you click on the mute button at the top, then navigate to another page, the mute button stays clicked. I have a decompiler, and pulled the code out of it. See below:

[Code]...

View 1 Replies

ActionScript 3.0 :: Duplicate MCs Wont Carry Code From Original?

Aug 30, 2009

I've made a button that presents a movie clip (a window) on the screen, you can move this window by grabbing the tab on the top of the window. But when you exit this window and open another (duplicate is made), you cannot move the window at all.My guess is that the code is lost when the duplicate is made, can someone tell me how to transfer my code to all my duplicates? For more info, visit I sent this about a year ago, and still havent got a responce.

View 1 Replies

ActionScript 2.0 :: Visual Studio.net - Carry Out A Check On The Array

Dec 16, 2003

I know im a pain asking you all questions about c++ but we all know your all good enough to do anything so thought id give it a shot. I'm creating a naughts and crosses game (tic tac toe for you americans!!) for uni and am getting a little stuck! The game runs and a winner can be decided but when the game ends i want it to ask whether another game wants to be played.

Then i want it to carry on as a new game and loop until the players dont want to play again. i've included the source file in notepad form also could anyone tell me how to carry out a check on the array so that once a value has been entered into that co-ordinate (O or X) another value cannot overwrite it???

View 2 Replies

ActionScript 2.0 :: Carry Out Check On Two Integers So That Only Number Can Be Input

Nov 20, 2003

ive got a c++ program that im writing, its a simple calculator, the way it runs is by the user entering a number then another number, then the operand..what i need to know is how to carry out a check on the two integers so that only a number can be input, if anything else is then the program returns to the "insert first integer" code.

View 1 Replies

ActionScript 1/2 :: Buttons To Carry Out Actions On Externally Loaded Movie?

Jan 29, 2007

I have a player which I have created with play/pause, rewind,forward buttons, and a progress bar on it. How can I link these buttons to carry out actions on an externally loaded movie?I have searched on the forum and can only find answers for buttons for embedded movies.

View 4 Replies

ActionScript 2.0 :: Make A Ball Bounce Of A Wall And Stll Carry On?

Apr 26, 2011

i want to make a ball move at a constant speed into a wall and bounce of, initially it should move back but then It should carry on moving towards the wall.

I managed to make it bounce but once it hits the wall it carries on in the opposite direction!

View 4 Replies

ActionScript 2.0 :: Mute Button In Flash To Carry Over To Other Html Pages

Aug 19, 2009

I've found an example of this [URL] If you click on the mute button at the top, then navigate to another page, the mute button stays clicked. I have a decompiler, and pulled the code out of it. See below:

[Code]...

View 3 Replies

ActionScript 2.0 :: Go Back Into The Original Function At The Point At Where Left And Carry On Executing?

Sep 8, 2005

I have a function which contains some code and about half way through calls another function. Only problem is it stops the main function from running so the code following it snt executed. What I want to know is is there anyway to go back into the original function at the point at where I left and carry on executing? I've thought of one solution but its a bit long winded and I just wanted to know if there was a quick and easy method, before anyone asks the code needs to be in its current order.

View 3 Replies

ActionScript 2.0 :: Create An "hitTest" Script Inside A Movieclip That Is Actually Part Of That HitTest Code?

Jan 15, 2009

i just would like to know how to create an "hitTest" script inside a movieclip that is actually part of that hitTest code?I mean... I have mc A, and mc B. and the current hitTest code im using (that is on the timeline) makes mc A, destroy mc B when collide with it... but there are many mc B on the stage (with the same instance name) so, when mc A collide with one mc B, it destroys ALL mc's B... but i want it to destroy only the mc B that he collides, not all the others... maybe an hitTest script inside a movieclip B would work (somethig like "if MC A hitTest ME = i die" (not all the others)).

View 1 Replies

ActionScript 3.0 :: Multiple Buttons To Open Child Swfs Then Be Able To Close The Child From Within The Child?

Mar 25, 2009

I have a picture on the stage that has multiple items that have hotspots/links over them that should open a child swf on top of the background and show details about the items. then have a button in the child swf itself that removes the child from over the background so the user can click on another item etc.I found this code in someone's post and I am trying to modify it so that works for multiple swf files...it currently works for a single swf.I wan to pass the name of the button in front of the .swf in the URLRequest to have the same name as the instance name of the referring button. But I can't figure it out. Here is the code I am using on the stage

View 2 Replies

ActionScript 3.0 :: Do Something After Hittest " Remove Hittest After First Collsion"?

Feb 8, 2010

i am controlling a tractor mc with right and left keyboard keys and let the user move the tractor till it reach a certain point where it touch a mc i want to go to a certain frame and stop the keyboard event listener and also the hit test listenerso finally the tractor is moved by user till it touches the mc then we will jump to a certain framethis certain frame will not have both of the tractor and the mcPHP Code:

import fl.transitions.Tween;
import fl.transitions.easing.*;
import flash.display.MovieClip;

[code].....

View 1 Replies

Flash ::making A Class Like "CustomEvent", That Can Carry Parameters?

Nov 13, 2011

My friend recently said, that you should find some way without "CustomEvent" if you wanna follow OOPs strictly. Is this true ? Is this the reason, that such class is not provided by Adobe natively ? In many of my projects, i find it impossible to communicate without being able to send information via parameters. Is using "CustomEvent" like thing, a breach into OOP rules.

View 2 Replies

ActionScript 2.0 :: Variable Array Doesn't Carry Through To The "mySubMenus[i].alphaTo (100,1);" Line?

Oct 1, 2007

why my i variable in the script below doesn't carry through to the "mySubMenus[i].alphaTo (100,1);" line. When I trace, it returns a value of 3, but it's working for myButtons[i]. There must be a way to pass that [i] value someplace else,BTW, this is a variation of one of the mc_tween samples.

var myButtons = [this.servicesBtn, this.portfolioBtn, this.peopleBtn];
var mySubMenus = [this.servicesLevel2, this.portLevel2, this.peopleLevel2];
Loops on all buttons from the first to the last one[code]....

View 4 Replies

ActionScript 2.0 :: Creating Variables That Carry Over From Scene To Scene?

Sep 24, 2010

I'm working on a project that requires a numeric value to be stored in one scene and called in another- is this possible in ActionScript.

For example, I need to create a timer that times how long it takes for the user to preform the action, and save the value. In the next scene, I need that same value from before to be called in that scene.

View 1 Replies

Flex :: SWFLoader - Child Apps Couldn't Access Certain Objects That Were Instantiated By Another Child App?

Aug 23, 2010

i have problem with swfLoader in flex, when i close following code in click method i can easly add many swf to main application

<mx:VBox id="content" width="100%" height="100%" ></mx:VBox>
public function doIT():void
{[code]....

when i close adding those swfs in loop i have the same error, it looks like child apps couldn't access certain objects that were instantiated by another child app, so what can i do?

View 1 Replies

ActionScript 3.0 :: Can't Swap Child For New Class Instance IF Child Is Exported For Action Script?

Aug 18, 2010

I have a movieClip with one frame on the timeline containing one child whose instance name is "myContent"I am using this function to swap "myContent" with any number of possible class instances.

Code:
function setContentAsClass(c:Class)
{

[code].....

View 2 Replies

ActionScript 3.0 :: Flash Selecting A Specific Child By Mouseclick, Turning Off A Child Within All Non Selected?

Mar 19, 2011

I've used this site as a resource leading up to this, not particularly sure if I worded this correctly I have a class "Block" which is just a square (will be something else later on in the process) I want each block to have controls to add an additional block in either direction so I have another class BlockButtons which has my buttons for each direction.

And another class GlobalVar where I keep all my variables for funsies

[Code]...

View 1 Replies

Flex :: ViewStack.addChild Adding Multiple Child And Only The Last Child Is Visible?

Mar 10, 2010

var viewStack:ViewStack = new ViewStack();
viewStack.percentWidth = 100;
viewStack.percentHeight = 100;

[Code]....

Its only displaying canVas3 contents not canVas1 and canVas2

View 1 Replies

Flex :: Viewstack - Navigate To The Second Child During Onclick Of A Button Present In The Second Child?

May 10, 2010

I have a component mxml file in which i have a view stack, on click of a button i navigate to the first child, now i need to navigate to the second child during onclick of a button present in the second child. All the childs are component files included within the view stack. How could this be done, Sample code is present below,

[code]...

Now in my offering.mxml file if i try to access navigationViewStack i am getting an error stating 'Access of undefined property navigationViewStack.

View 3 Replies

ActionScript 3.0 :: Access Child Vars/functions Without Adding Code To Child?

Mar 11, 2010

I've seen some discussion on how to load a child swf using swfLoader and accessing it's variables but I am wondering if it is possible to do this without adding any code to the child swf.Either accessing public vars or listening for funciton calls would work fine

View 2 Replies







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