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




Hittest Problem-how To Ignore The Bound Box



with my car, i am trying to make it so it can pass right through a MC, but just slow down. I type speed -= 5; but the car just bounces on the bound box of the other MC. How can i get it to not hit the bound box and only the actual object, AND make it pass through the object.



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 05-15-2005, 06:57 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Hittest Problem-how To Ignore The Bound Box
with my car, i am trying to make it so it can pass right through a MC, but just slow down. I type speed -= 5; but the car just bounces on the bound box of the other MC. How can i get it to not hit the bound box and only the actual object, AND make it pass through the object.

Movieclip Bound Box Problem
I have this problem where the movieclip within a movieclip seems to overlap any content on the parent movieclip and causes the parent movieclip to call the MouseOut event. It's probably because of the actionscripts within the first frame of the child movieclip. See attachment for what I mean.


Thanks,
GamerFlash

Textfield Won't Show Bound Variable
Hiya, this problem only occurs when I have my AS2 movie loaded into an AS3 holder, which is necessary for this project. I am not accessing the root just an object that exists on the same frame as the text field.

I'm having quite a problem with a textfield that has a variable defined in the properties bar that it is bound to. The variable that is set in the var field is a property of an object like this: ActionScript Code:
object.textProperty



The object is initialized and I can trace the property from the frame that the textField exists on though the teftfield will not display it.
This isn't a text embedding problem as I'm using system fonts and tracing the .text property of the textfield so I know what's in it.
I have tried setting the variable to update every second and also re-initializing the object and adding the property again to try and get the textfield to update but it's not working.

I can't get the textfield to read a variable that is a property of an object that exists on the samne frame so this isn't a targetting issue.

I can get the textfield to show and update a variable that is declared in the normal way: ActionScript Code:
var myVar:String = "my test string";



but once it is inside an object it won't work.

I have inherited this project and so I can't change the way the variables are targeted as it will be too much work (there are over 120 text fields) all I can do is update the variable. The original project worked fine with this technique but now it does not seem to be working at all.

if anyone has any suggestions I would be really glad to hear them as I am very very stuck and have spent hours trying to solve this!

Thanks for your help,
Schm,

Why Does A Combobox Print Outside The Bound Area?
i have had some trouble with the bounding box feature when i try to print. i have figured out that for some reason comboboxes will either print or the space that they take up somewhere on the movie will print blank( ie a space appears outside the bounding box) even though the combobox is clearly outside of the bounding box. I don't know if this is a UI problem or something i did wrong but i could use some help or even if there is a better way to print an area without a bounding box

Time Bound Quiz (source Attached)
I wanted to know how I could I start a timer in the movie and as soons as the timer gets over (after like 5 minutes) the movie automatically goes to the "quizEnd" label and executes "gradeUser()"

please help...

edit: A request, please use Flash 5

dire straits!!

Print.apply(null, [ths.targ, This.bound]);..no Cigar
Allo

Ive been having real fun with the apply funtion..well sort of heh. Ive manged to get it working with my own funtions but the first AS function Ive decided to use it on, namely print() ..it won't work. Stubborn lil thing.

Can anyone help me on this please?

*searches on in the meantime*

Pls Ignore
pls ignore

IGNORE THIS
dont know what happened here.....cant get rid post.....see the one after this.....thx

Please Ignore...
Hello,

Please ignore this message.

Im trying to get familiar with the features of this BB.

Ignore
Posted in wrong forum.

Sorry.

{Dstinct}

Ignore This
Double Post





























Edited: 12/02/2006 at 10:21:36 PM by GTJackets530

Ignore
ignore this post

Ignore
I was able to do a right click with ActionScriprt 2, but I cannot do it.
Below is what I have for both my HTML and AS 3 codes








Attach Code

//---Here is my HTML code

<title>tutorial2</title>
<script language="javascript">
AC_FL_RunContent = 0;
function closewindow (URL,windowname,windowfeatures){
window.close(URL,windowname,windowfeatures);
}

function removeMenu(){
if (event.button == 2){
myMovie.TGotoFrame("pane_mc", 2);
parent.frames.location.replace('javascript: parent.dummy1');
}
}
</script>

//----Here is my AS3 code

//----- right click function ----------------
function rClick(myevent:MouseEvent):void{
if (this.pane_mc.hitTestPoint(root.mouseX, root.mouseY, true) != true) {
this.pane_mc.gotoAndStop(2);
}
}
pane_mc.addEventListener(MouseEvent.CLICK,rClick);

Ignore The TAB Key?
hello.

how do i make flash ignore the TAB key so that a user doesn't try TABing through Form items (like you can in a browser) and end up highlighting another flash Button rather than the next Form Cell

ORRR

how can I control the order in which items are TABed in my movie?

any thoughts?

thanks.

-mikey

Ignore
test

last time it did not work after all my typing

Ignore// Test
http://website.lineone.net/~dj_desig...ens/3_eyes.gif

Ignore Objects Help
I want to have my movie play at a certain point after mouse release, but to ignore certain objects. Here is the code I'm working with:

on (release) {
if (_currentframe == 46) {
play ();
} else if (_currentframe == 75) {
gotoAndPlay (46);
} else if (_currentframe == 95) {
gotoAndPlay (46);
} else if (_currentframe == 115) {
gotoAndPlay (46);
} else if (_currentframe == 135) {
gotoAndPlay (46);
}
}

On release at frame 46 I want the movie to play with everything on screen, but on release at frames 75, 95, 115, and 135 I want four objects to be ignored. I have not assigned them instance names.

How do I do this?

Test Please Ignore
test test test

How Ignore Script ?
hi, check this out:
--On the movieclip (the NavigationMenu) i got this script:

Code:
onClipEvent (enterFrame){
if (this.hitTest(_root._xmouse, _root._ymouse, true)){
nextFrame();
} else {
prevFrame();
}
}
--On the buttons in the menu i got this script:

Code:
on (release) {
if (_root.menu.hitTest(_root._xmouse, _root._ymouse, true)){
_root.menu.prevFrame();
}
}

What i want is: When the buttons are clicked, the menu should slide back to each preveous frame (prevFrame(). But because the mouse doesn't have the time to slide of the menu-clip, the Menu gets the action nextFrame();.
Is there any way to ignore that Menu-script. Or if anyone has a better way to enable this action. please tell me ... :S

Regards Thomas D

Test/View My Movie

Ignore Actions Unless
i have a animation of a plane landing being worked on then taking off
one long timeline. i need it to play on a continues loop unless a button is pressed to go to "pressintation mode" then i need it to use frame lables and actions that are on the timeline.

i am including a simple ani to help understand (hopfully)

Ignore Nested Mc's
Hi
I have a mc that contains several nested mc's. One of these is a close button that closes the top-level movie. This is the script ....

on (release) {
_root.chart_top.GotoandStop(1);
}

My problem is that the nested mc's are also returned to frame 1. How can I order the top level mc to a frame without it affecting the children?

Thanks
Mark

I'm A Spammer, Ignore Me Please.
Hi,
I want to ask all of you to have a look on my site <spam> to see if everything is working all right. The thing is, that when I check my statistic of my page, I can see by almost all the visitors which have seen it, it shows up the time how long they've been on the website. Actually always shows up 0 minutes and seconds. It's very wierd, so I just wanted some of you to look, what could be wrong. Anyway, is there any software which is able to check the function the sites, by the way? Thank you a lot for every help.

[MX] How Do I Ignore Actionscript
i need to ignore a piece of code in my actionscipt but not all the time, pretty much only when i press a certain button on the screen. What is the best way to do this?

How To Ignore Enter Key?
I had an application nicely set up where the input is done mostly by mouse.
Now it appears that pressing Enter will skip to the next frame, no matter what.
How do I prevent that from happening?

Getting URLLoader To Ignore
Is there a way to get the URLLoader object to ignor
in a text file? I want to use a text file as a configuration file...something like this...

gamename=gameone&gamelevel=2

this works but I have lots of variables and want to format my text file with a variable on its own line like this...

gamename=gameone&
gamelevel=2

The problem is URLloader doesn't know how to handle the new line.
is there a way around this???
Thanks
T

Repeat, Ignore
.





























Edited: 12/11/2008 at 05:15:42 PM by drumzit

Don't Ignore This Question
hi,
i have been posting questions up and never get an answer, I am wondering it its because of the design suffix i have next to my name. Anyways, I have this page that works wonderfully on my computer, but when I load to the server it acts wacky. http://www.omarsharif.tv/flashintro/.../portmain.html
the main movie keeps on reloading when i load external files. HOw can i fix this..
ur answers are most appreciated

omar

How To Ignore Escape Key?
Hi to all,

I used the fscommand("fullscreen",true) in my application to make it fullscreen. However when the user presses the Escape key, the window goes into the normal view. Is there any way of disabling the Escape key to make my movie in fullscreen all the time? and the only way to quit the movie is my clicking the label I created 'Exit' with the AS command fscommand("quit");

Thanks for all the help


regards,

Casper

AS 2.0 - If Swf Is Already Loaded, Ignore
See attached diagram for clarity. Sorry for the long msg.

Hello - I am creating a site where there is a portfolio section with icons for each piece of artwork.

Regardless of which icon 1-10 is clicked, for the first time ONLY, I want to load a swf which "draws in" a portfolio "background", and another swf on a higher level which corresponds to the icon clicked (lets say a sample artwork).

However, if the user has previously clicked another portfolio icon and is currently viewing one of the portfolio pages, there is no need to load the "background" swf again (it would be tedious watching the drawing in animation over again).

I've designated a target container movieclip for each.

The icons swf file with the buttons is another swf on the timeline.

Is there some code which can check to see if the background swf is already loaded into its container? And in which swf would I attach the code? Any help appreciated.

Testing (ignore)
Code:
// Starting x & y values
var xPos:Number = 150;
var yPos:Number = 400;

// Maximum number of buttons allowed
var btnMax:Number = 20;

for (i = 0; i < gallery.length; i++) {
attachMovie("btn_mc", "btn"+i, this.getNextHighestDepth(), {_x:xPos, _y:yPos});
xPos += this["btn"+i]._width+5;

// Add the information
this["btn"+i].num.text = number[i][0];

Don't Ignore This Question
hi,
i have been posting questions up and never get an answer, I am wondering it its because of the design suffix i have next to my name. Anyways, I have this page that works wonderfully on my computer, but when I load to the server it acts wacky. http://www.omarsharif.tv/flashintro/.../portmain.html
the main movie keeps on reloading when i load external files. HOw can i fix this..
ur answers are most appreciated

omar

Ignore The Previous One
Hi,
I have created a dynamic menu by using nesting a button template in a movie clip & calling duplicateMovie() in the ActionScript involved. The button labels were created by passing values from an array that was declared in the ActionScript itself. Now if i want to create submenu for certain menu buttons, how can i go on doing that ?
I'm including the .fla file for reference.

How Can I Ignore Stops?
Hi

I have developed an animation of a procedure for a machine. There are fifteen steps to the procedure. I have a menu of numbered buttons for each step in the procedure. when a button is pressed it goes to the relative frame and plays until that step is finidhed and the stops. Now I want to create a play entire animation button as well. How do I get flash to ignore the 15 stops when that button is pressed?

How To Ignore Case?
Hi

Is there any way in ActionScript to make caseINSENSITIVE comparisons? If yes, please let me know 'how'.

Thanks
Daisy

Ignore The Previous Post...please
Never mind....thanks for trying though

Ignore MouseEvent.CLICK
Hey Guys,

I have a hard time catching the mouse click on the movieclips that I want to act on. I have 2 layers on the main timeline: 1) text label (wrapped in a MC) and 2) 2 movieclips that I want to catch the click event from.



In actionscript 2.0, it is really easy. I only need to set the onRelease function for the 2 movieclips. I can just ignore the text. This way, I can catch the click action on the movieclips that i set onRelease for with my mouse over text. But, now, I can't. Because if I click with my mouse over the text, the returned target is the text.

My question is how can I do to ignore the mouse click event for my labels?

I have attached the fla

Thanks,

Justin

CS3 - Ignore MouseOut After CLICK?
I am new to CS3 and having a problem with an animated menu. I want to ignore a MouseOut event after a mouseCLICK event so my button displays a down state. Here is the code i have:

import flash.display.MovieClip;
stop();

btn1_mc.buttonMode = true;
btn2_mc.buttonMode = true;
btn3_mc.buttonMode = true;
btn4_mc.buttonMode = true;
btn5_mc.buttonMode = true;
btn6_mc.buttonMode = true;
btn1_mc.addEventListener(MouseEvent.ROLL_OVER, onButtonOver);
btn1_mc.addEventListener(MouseEvent.ROLL_OUT,onBut tonOut);
btn1_mc.addEventListener(MouseEvent.CLICK,onButton CLICK);
btn2_mc.addEventListener(MouseEvent.ROLL_OVER,onBu ttonOver);
btn2_mc.addEventListener(MouseEvent.ROLL_OUT, onButtonOut);
btn2_mc.addEventListener(MouseEvent.CLICK, onButtonCLICK);
btn3_mc.addEventListener(MouseEvent.ROLL_OVER,onBu ttonOver);
btn3_mc.addEventListener(MouseEvent.ROLL_OUT, onButtonOut);
btn3_mc.addEventListener(MouseEvent.CLICK, onButtonCLICK);
btn4_mc.addEventListener(MouseEvent.ROLL_OVER, onButtonOver);
btn4_mc.addEventListener(MouseEvent.ROLL_OUT, onButtonOut);
btn4_mc.addEventListener(MouseEvent.CLICK, onButtonCLICK);
btn5_mc.addEventListener(MouseEvent.ROLL_OVER, onButtonOver);
btn5_mc.addEventListener(MouseEvent.ROLL_OUT, onButtonOut);
btn5_mc.addEventListener(MouseEvent.CLICK, onButtonCLICK);
btn6_mc.addEventListener(MouseEvent.ROLL_OVER, onButtonOver);
btn6_mc.addEventListener(MouseEvent.ROLL_OUT, onButtonOut);
btn6_mc.addEventListener(MouseEvent.CLICK, onButtonCLICK);

function onButtonOver(e:MouseEvent):void
{
e.currentTarget.gotoAndPlay("over");
}

function onButtonOut(e:MouseEvent):void
{
e.currentTarget.gotoAndPlay("out");
}

function onButtonCLICK(e:MouseEvent):void
{
e.currentTarget.gotoAndPlay("down");
}

Thanks in advance for any help.

Ignore MouseEvent.CLICK
Hey Guys,

I have a hard time catching the mouse click on the movieclips that I want to act on. I have 2 layers on the main timeline: 1) text label (wrapped in a MC) and 2) 2 movieclips that I want to catch the click event from.



In actionscript 2.0, it is really easy. I only need to set the onRelease function for the 2 movieclips. I can just ignore the text. This way, I can catch the click action on the movieclips that i set onRelease for with my mouse over text. But, now, I can't. Because if I click with my mouse over the text, the returned target is the text.

My question is how can I do to ignore the mouse click event for my labels?

I have attached the fla

Thanks,

Justin

Ignore Nested Xml Nodes
I've got a xml document with nodes (items) that have several nested nodes (title, location, etc.). Some of the items have nested nodes that others do not have. Here's an example of the xml document:


Code:
<item>
<title>Item 1</title>
<location1>Suite 200</location1>
<varname>item1</varname>
</item>

<item>
<title>Item 2</title>
<location1>Suite 400</location1>
<location2>Suite 500</location2>
<varname>item2</varname>
</item>
My problem is when I load the xml, in this example, Flash seems to apply the the location2 node to the first <item> tag since that tag lacks that particular node.

Here's the code I'm using to bring in this xml data into a list box component:


Code:
function mylist_onLoaded(e:Event):void
{
xml = new XML(e.target.data);
var il_mylist:XMLList = xml.item;
for(var i:uint=0; i<il_mylist.length(); i++)
{
mylist_lb.addItem({
data:il_airlines.description.text()[i],
location1:il_mylist.location1.text()[i],
location2:il_mylist.location2.text()[i],
varnamedata:il_mylist.varname.text()[i],
label:il_mylist.title.text()[i]});
}
}
I realize that I could just add the location2 node to the first item and leave it blank, but that would be very hard to ensure that this xml document is mantained properly. I tried using an if statement to skip the missing node if it doesn't exist, but it didn't work either:


Code:
function mylist_onLoaded(e:Event):void
{
xml = new XML(e.target.data);
var il_mylist:XMLList = xml.item;
for(var i:uint=0; i<il_mylist.length(); i++)
{
mylist_lb.addItem({
data:il_airlines.description.text()[i],
location1:il_mylist.location1.text()[i],
if (il_mylist.location2.text != null){
location2:il_mylist.location2.text()[i],
}
varnamedata:il_mylist.varname.text()[i],
label:il_mylist.title.text()[i]});
}
}
Any ideas on what I'm not grasping? Thanks!

Get Objects To Ignore Mouse?
i have this window class i've been working on all day

http://fall-time.com/bryan_test/moon...est/index.html

everything works great, except!!! the click area to move the window (the bar) is only clickable where there are no objects, including the title.

i have complicated code inside doing the spacing on the objects on the title bar, so it's not as easy as just putting the text underneath the sprite that you are clicking on to drag the window.

is there a way to set the text for the title to ignore the mouse events somehow? so that the mouse events reach teh drag bar.

this is a Window class written from the ground up, so don't confuse it with the Window class already in flash.

it's in com.package.packge.package etc,custom class

ActionScript Code:
//initW,iniH,resizable,maxW,maxH,minW,minH
test = new Window(350,300, true, 1500, 1600, 250, 50);


//create close btn
var closeBtn:Sprite = new Sprite();
closeBtn.graphics.beginFill(0x000000);
closeBtn.graphics.drawRect(0,0,14,14);
closeBtn.graphics.endFill();
closeBtn.y = 2;
closeBtn.addEventListener(MouseEvent.CLICK, p_onClose);
closeBtn.buttonMode = true;

//create randomsize button
var minBtn:Sprite = new Sprite();
minBtn.graphics.beginFill(0xff0000);
minBtn.graphics.drawRect(0,0,14,14);
minBtn.graphics.endFill();
minBtn.y = 2;
minBtn.addEventListener(MouseEvent.CLICK, p_onRandomSize);
minBtn.buttonMode = true;

//this line defines the title, and then how to align the elemnents inside, and then append extra objets that go into the title bar
test.setTitleBar('View Image', [Window.TITLE_BAR_ALIGN_LEFT, Window.TITLE_BAR_ALIGN_RIGHT, Window.TITLE_BAR_ALIGN_RIGHT], [minBtn, closeBtn]);
//the class automatically spaces out the objects and places them and repositions them on resizing the window, VERY handy!
test.x = 100;
test.y = 100;
addChild(test);

//load content into the window
var t:Loader = new Loader();
t.load(new URLRequest('http://www.healthline.com/blogs/outdoor_health/uploaded_images/Bear-Grandfather-Mtn-Tim-Floyd-779608.jpg'));
test.addContent(t);

Check If Loaded Then Ignore?
I have the following code that is inside an MC that loads when a nav button is clicked. This same code will be on all 4 nav buttons but I don't want it to re-load each time. Is there a way I can add code to it so that whichever nav button initially loads it, if another nav button is clicked it will check to see if it's loaded and if not will only then load it. I only want to load it once.

Help me Obi Wan Kenobi your my only hope!

Thank you!


loadMovieNum("QUOTES.swf", 5);
stop();

How To Ignore Escape Characters?
Hi,
When I receive a string from an external source, I want to be sure that for example "C:
ew folder" the
is NOT read as "new line". ("new folder" is just an example, it can be anything else though).
When I use escape("C:
ew folder") I get the following:
C%3A%0Aew%20folder
and it should be
C%3A%5Cnew%20folder

How can I ignore the escape characters?

Ignore - Double Post Here...
Oops.





























Edited: 09/20/2007 at 08:24:45 PM by Calbruc

Repeated Message Please Ignore
repeated message please ignore





























Edited: 01/14/2007 at 04:28:19 AM by lajettee

Duplicate Question Please Ignore
I've attached my code. I'm trying to move the a new frame based on a randomly generated number.

For example currentframe + a dice roll value.

I need this soon so any help would be greatly appreciated.







Attach Code

stop()

// In our case here, the function rollDice is called when the button is pressed and the roll onClick parameter is set to true.

// showResult is called when the dice has finished moving
function showResult(de_instance){

// result represents the text field variable that will receive the value of rollValue
_root.result = de_instance.rollValue;
}

// rollDice is called when the Roll button is pressed roll() is the method use to roll a dice
function rollDice(){
de.roll();
}

// the function below is triggered as soon as the “Roll” button is pressed
myRollButton.onPress = function(){
rollDice();
}

Ignore Extended Class
Hello, I have this movieClip that has a class linked to it.
Class:'mc_ex1'
Base Class:'com.template.ExClass'
Is there a way to call them onto the display and ignore the base class or switch it out with the default 'flash.display.MovieClip'? Thanks, -Jake

Copyright 2005-08 www.BigResource.com, All rights reserved