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




[F8] Character Colision - Doesn't Work



Well, hello to you all and happy new year!

I'm creating a little game for a learning center. And the game consist of a character walking to other characters to learn more about them. Its a little village and everybody is there to learn. Ok, enough of that...

EDIT: THE GAME IS NOT TILE BASED, ITS VECTOR BASED, SO I HAVE BIG AND SMALL SPRITES ON SCREEN. WHAT MAKES THE COLLISION IS A BOX INSIDE THE SPRITES, BOX NAMED COLISION FOR ALL THE SPRITES ON STAGE.

ALSO, THE SPRITES ON STAGE ARE NAMED "Sprite1, Sprite2, Sprite3, etc" EXEPT FOR THE "player".

So far, I made the character move and go everywhere... by using this code.
I have a controller that calls a function()

Code:
onClipEvent (enterFrame) {
_root.detectKeys();
}


Now, after that happens, my detectkeys(); is as follow


Code:
function detectKeys() {
//---------------------------- Colision start
for (var i in _root.MainScrollerMC) {
if (typeof (_root.MainScrollerMC[i]) == "movieclip") {

if(i == "player"){
//trace("Do Nothing its the player! - " + i);
}else{
if(_root.MainScrollerMC.player.colision.hitTest(_root.MainScrollerMC[i].colision)){
//trace("colision with: " + i);
PlayerColision = 1;
break;
}else{
//trace("Not Colided you can move");
PlayerColision = 0;
break;

}
}
}
}
//------------------------------ Colision ends
// Send the parameters to move the character
var ob = _root.MainScrollerMC.player;
var keyPressed = false;

if (Key.isDown(Key.RIGHT)) {
keyPressed = _root.moveChar(ob, 1, 0);
} else if (Key.isDown(Key.LEFT)) {
keyPressed = _root.moveChar(ob, -1, 0);
} else if (Key.isDown(Key.UP)) {
keyPressed = _root.moveChar(ob, 0, -1);
} else if (Key.isDown(Key.DOWN)) {
keyPressed = _root.moveChar(ob, 0, 1);
}

// walk animation
if (!keyPressed) {
ob.clip.char.gotoAndStop(1);
} else {
ob.clip.char.play();

}
}


Ok, so far everything is working! So the characters is asking to the function named moveChar(characterMC, dirX, dirY) if it can move it. and the function is as follow:


Code:
function moveChar(ob, dirx, diry) {
// Variables used in this function
var MainScroller = _root.MainScrollerMC;
var CharPlayer = _root.MainScrollerMC.player;
var Speed = _root.Speed;

// going up
if (diry == -1) {
// Player Face Direction
CharPlayer.gotoAndStop("back");
// no wall in the way, move on
CharPlayer._y = CharPlayer._y-Speed;
// scroll the map
MainScroller._y = MainScroller._y+Speed;
}
// if going down
if (diry == 1) {
// Player Face Direction
CharPlayer.gotoAndStop("front");
// no wall in the way, move on
CharPlayer._y = CharPlayer._y+Speed;
// scroll the map
MainScroller._y = MainScroller._y-Speed;
}
// if going left
if (dirx == -1) {
// Player Face Direction
CharPlayer.gotoAndStop("left");
// no wall in the way, move on
CharPlayer._x = CharPlayer._x-Speed;
// scroll the map
MainScroller._x = MainScroller._x+Speed;
}
// if going right
if (dirx == 1) {
// Player Face Direction
CharPlayer.gotoAndStop("right");
// no wall in the way, move on
CharPlayer._x = CharPlayer._x+Speed;
// scroll the map
MainScroller._x = MainScroller._x-Speed;
}


// Refresh the screen
_root.UpdateScreen();

// End Function
return (true);
}


Ok, at this point the character moved and everything is working. My problem is that I don't know how to make him stop, when the colision boxes inside each spriteoverlap each other.

I have managed to crash the computer several times and I have also stopped permanently the character. I mean, after it touches a colision box... it will stick to it for good. Is like because it is touching, doesn't le go.

A little help here.. Thanks!

- Alex



FlashKit > Flash Help > Flash Newbies
Posted on: 01-02-2007, 09:57 PM


View Complete Forum Thread with Replies

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

Drop Menu : Rollovers/GetURL In A Movie Don't Work...and The SWF Doesn't Work In FF
My links/rollovers don't work in Mozilla and the dropdown menu part don't work (the rollovers and the getURLs) in any browser.

What's wrong with this??? I think it's something simple.
I've already tried:

Code:
this._lockroot = true;
I also tried writing the AS as:

Code:
one.title.text = "The Text";
one.onRollOver = over;
one.onRollOut = out;
function over () {
this.gotoAndPlay(2);
}
function out () {
this.gotoAndPlay(11);
}
one.onRelease = function(){
getURL("http://www.thelink.com");
}
...didn't work...

I hope someone can help!

Download the: Source File


(Lately I've gotten no help off this site and it's been very depressing because this site people used to be very helpful...I hope someone can change my mind)

This._lockroot Doesn't Work (combobox Components Won't Work)
I have a preloader (preloader.swf) which loads a form (offerte.swf).

I've put the this._lockroot on the "application" timeline on the first frame of the "Flash form application" (offerte.swf).
But the combobox components still won't work.

I had it working before, but suddenly it seemed to stop! Now I can't get it get to work again.

Preview: www.blaak.nl/flash/

This._lockroot Doesn't Work (combobox Components Won't Work)
I have a preloader (preloader.swf) which loads a form (offerte.swf).

I've put the this._lockroot on the "application" timeline on the first frame of the "Flash form application" (offerte.swf).
But the combobox components still won't work.

I had it working before, but suddenly it seemed to stop! Now I can't get it get to work again.

Preview: www.blaak.nl/flash/

Smoothing Doesn't Work It Oughta Work
Hello!

I am trying to develope this website:

http://anarchy.primalinsanity.com/~villain/nma.rar

Its smoothing effect, however, has mysteriously disappeared. It is only enabled in authoring mode, not if I export the movie. I've tried everything to re-enable it:

1) Changed formats from JPG to PNG
2) Library > Bitmap Properties > Allow smoothing
3) File > Publish Settings > Smooth

But nothing seems to work

Thanks everyone,
Johann

Copyright Character Wont Work With
trying to get the(c) character to work with URL Encoding without success! the + character works fine.

i got the code from http://www.macromedia.com/cfusion/kn...fm?id=tn_14143

$caption=str_replace("©","%26%23169;",$caption);
$caption=str_replace("+","%2B",$caption);


anyone had this before?

thanks.

D.

Character Movement Animations Wont Work
here's my problem - I've created a stick character that'd i'd like the user to move to try to get a handle on interactivity. I've created a buncha movie clips within movie clips - pretty sure this is how you do it, - but when I export it as a movie only one of my animations works when you press a key. The spacebar jump won't work... the left walk won't work... but the right walk does, as well as the idle animation.

when i remove the 'else' statement that holds the key to the idle character animation all my animations work... but then the character never goes idle, and the other animations loop.

if anyone could please help it'd be greatly appreciated

thanks in advance



(flash mx)

Colision
I am new on this forum and kind of new to action script to.
Here is my problem: I made a map wich zooms in, out and resets to the original position. I also made a drag function so you can drag the map. The map is an mc. wich is includen in another mc who acts like a frame. I want that when the margins of the map hit the margins of the frame mc to stop the drag so the map wont go outside the frame.
I was thinking that this can be done with a colision test or something but i have no idea how. i own you one if you can help me
Thanx for your help!

Colision?
I made a little car game but it will go through nething!

what is the actionscript to make it stop???

I tried some hittest thing, but it didn't work rite.

Calculating Colision
Hi again!
I´m trying to do this:
One clip that moves free across the screen must "bounce" when it hits an other clip surface, but this second one is not a simple square, it is an isometric draw of a square.
Any suggestion on how to "solve" this??
Thanks a lot!!!

Colision Detection ....
hi..
i want a script for colision detection

i have 4 bojects flying...
i want to whenever the user shoot an object..to display message ( action occurs )


please help

thanks

Colision Help Needed PLEASE
I have 2 movie clips with the instance names guy and door. When guy runs into door I want to go to scen 3 frame 1. How do I do this?

Help With Colision Detection
hi pll,
im in the middle of making a flash game, and i was wondering if any of u ppl, would have any code for this:

wen a movie clips touches another movie clips i want the scene to change to another scene or frame.
help is appreciated
-thanks in advance-

Surface Colision
I make this simple system to simulate a colision of a block in "walls" and bounce like a pong ball. To use drag the orange square and release to start the movement. But i have a problem, sometimes the colision not happen and the block go through the walls, i try less the time of setInterval that verify the colisions but not solve my problem.
colision system

I need help to solve this problem.

tkz.

Surface Colision
I make this simple system to simulate a colision of a block in "walls" and bounce like a pong ball. To use drag the orange square and release to start the movement. But i have a problem, sometimes the colision not happen and the block go through the walls, i try less the time of setInterval that verify the colisions but not solve my problem.
colision system -> http://yuri.cotekstudios.com/expz.swf
I need help to solve this problem.

tkz.

Surface Colision
I make this simple system to simulate a colision of a block in "walls" and bounce like a pong ball. To use drag the orange square and release to start the movement. But i have a problem, sometimes the colision not happen and the block go through the walls, i try less the time of setInterval that verify the colisions but not solve my problem.
colision system -> http://yuri.cotekstudios.com/expz.swf
I need help to solve this problem.

tkz.

Colision Detector Problem
I have a small animated ball (3px) that roll around the stage. Also, I have a wall (thin line 1px) on the stage. I am trying to detect colision between the ball and the wall. Every EnterFrame I am checking for hitTest. The problem is that the ball is very small and the wall is very thin so sometimes the ball doesnt colide with the wall. it just skip it. Any solution???

Complex Colision Detection With Two 'non Squares'
Hi, I have been researching complex collision detection.

The complex detection that I have seen involves a movie clip, whose shape is used to detect a collision with a co-ordinate, be it a mouse or a center point.

I, however would like to use two curvy shapes, and detect if they touch.

Has anyone heard of this, or am I going to have to plot all the points around my shape and do a detection loop....

M@

[F8] Flash 8 Scripting Help (colision To Next Level)
I'm making a game and i need help with this one part. http://img153.imageshack.us/my.php?i...breach1kj4.swf How would you code it so that when the char hits the exit(the green box) it goes to the next frame? I tried

Code:
if (_root.exit.hitTest(_x, _y, true)) {
gotoAndStop(2);
}

and that didn't work. Any help would be greatly appreciated. Thanks in advance.

Colision Detection AS2.0 Ball Rebound Help NEW
Ok not really part 2 but it seems like it to me because my part one wasnt relly able to be answered fully. So I am going to pose a new and improved question. I have a animation of a golf ball that needs to rebound off the lvl walls but the lvl walls are irregulare shapes so it is a little more tricky then usual. so, since the usual

if (this._x > 400)
{
this.dx *= -1;
}
if (this._x < 10)
{
this.dx *= -1;
}
if (this._y > 300)
{
this.dy *= -1;
}
if (this._y < 10)
{
this.dy *= -1;
}

will not work since the boundrie is not a box, would it be posible to test the left right top and bottom hitTest for the ball bouncing be cause if it can then maby i can figure out how to get this dang ball to rebound so that its angle changes and make it stop coming back to were it was hit from in the first place.

Complex Colision Detection With Two 'non Squares'
Hi, I have been researching complex collision detection.

The complex detection that I have seen involves a movie clip, whose shape is used to detect a collision with a co-ordinate, be it a mouse or a center point.

I, however would like to use two curvy shapes, and detect if they touch.

Has anyone heard of this, or am I going to have to plot all the points around my shape and do a detection loop....

M@

Help Pls....need Colision For Draged Item Hitting Duplicated Mc
can any 1 help........ im using an xml file to load in user names and positions on the x and y axis of the screen....now that i have the users names loading in from xml and duplicated for each name and position ..... i now want to have a marker which can be dragged and droped on screen but i want a collision to not allow the user to drop the marker on the already duplicated mc's

here is the code for xml file::2 users
<?xml version="1.0"?>
<namePosition>
<id name="davross" pass="dav1234" xpos="162.15" ypos="207.3" details="test.swf" />
<id name="becks" pass="bk1234" xpos="162.15" ypos="238.05" details="test2.swf" />
</namePosition>

here is the flash script
var depthCount = 1;
placerMc.onPress = function(){
startDrag(this);
}
////////////////this is a simple collision so u cant drop out side the the window
iv set up//////////////////////////////////
placerMc.onRelease = function(){
stopDrag();
if (this.hitTest(dropZone)) {
trace("Dropped in zone");
} else {
trace("Dropped outside zone");
resetPosition()
}


}
///////////////////////////////load xml file/////////////////////////
var markerXML = new XML();
markerXML.ignoreWhite = true;
markerXML.load("memWriteXML.xml");
markerXML.onLoad = checkLoading;
/////////////////////////check xml/////////////////////////////////////////////
function checkLoading(success) {
if (success == true) {
var rootNode = markerXML.firstChild
var total = rootNode.childNodes.length;
var tLink = rootNode.firstChild;
//var myNode = memXML.childNodes[0].childNodes[0]
//trace (myNode)
for (i=0;i<total;i++) {
dupePosition("tLink" + i, tLink);
trace(tLink)
tLink = tLink.nextSibling;

}
}
}
//////////////////////duplicate mc ////////////////////////////////////////
function dupePosition(newObj, aNode){
duplicateMovieClip (_root.marker, newObj, depthCount++);
var dupe = eval(newObj);
dupe.aLink = aNode.attributes.details;
trace(dupe.aLink)
var memName = aNode.attributes.name;
var memXpos = aNode.attributes.xpos;
var memYpos = aNode.attributes.ypos;
setName(dupe, aNode.attributes.name, 1);
setProperty(dupe, _x, memXpos);
setProperty(dupe, _y, memYpos);

dupe.onRollOver = function(){
uName = memName
trace("rollover"+uName)
}
if (aNode.nodeName == "id"){
trace("id found " +aNode.attributes.name);
//trace("x coord found " +aNode.attributes.xpos);
//trace("y coord found " +aNode.attributes.ypos);
//trace("pass found " +aNode.attributes.pass);
}
}
//////////////////////set name of duplicate mc//////////////////////////////////
function setName(obj, theName, Size){
//obj._height = obj._height*Size;
//obj._width = obj._width*Size;
obj.BoxName.text = theName;
//obj.TextLink.BoxName.filters = filterArray;
//obj.embedFonts = textStyle//true;
//obj.TextLinkShadow._alpha = 70;

}
////////////////////////////////////////////////////////
resetPosition = function() {
hitting = ""
placerMc._y = 199.8
placerMc._x = 616.7
trackerDrop.xPosition.text = "";
trackerDrop.yPosition.text = "";
//////////////////////////////////////////////////////////


if any 1 knows a script for duplicate mc collision detection when dragged item hits duplicated item any help would be greatly appreceated thanx

New Instance Button Doesn't Work, No Apps Listed, But Apps Work
In my admin panel if I click on the New Instance button it doesn't do anything. I've seen other posts about this and they all end up being caused by people having no applications to load, but that's not the case here. My apps are installed and they work fine, but the new instance button doesn't list them and they don't show up in the applications list of the admin panel, even when they're running.

This has to be something pretty simple, but I'm not having any luck figuring it out. Any ideas?

Loader.close Doesn't Work In Flash But Does Work In Flash Player
When testing a movie in flash with simulate download the Loader.close() function doesn't seem to work when trying to cancel a load but it does work in a browser! You'll need to try to load a movie that has sound. The loader looks as if it stops but then the sound that's in the loaded movie will play, proving it hasn't stopped loading

add a button with instance name btnCancel









Attach Code

function onClickbtnCancel(e) {
// damn thing doesn't work in Flash but works online
ldr.close();
/* this stuff isn't even needed
ldr.contentLoaderInfo.removeEventListener(Event.COMPLETE, onCompleteHandler);

for (var i:uint=0; i < container.numChildren; i++) {
if (container.getChildAt(i) is DisplayObjectContainer && container.getChildAt(i).name == "movieclip loader") {
container.removeChildAt(i);
}
}
*/
}
btnCancel.addEventListener(MouseEvent.CLICK, onClickbtnCancel);

var container = new Sprite();
var ldr = new Loader();
ldr.name = "movieclip loader";
container.addChild(ldr);
var urlReq = new URLRequest("file.swf");

function onCompleteHandler(e) {
addChild(e.currentTarget.content);
}
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);

ldr.load(urlReq);

stop();

//--------------------On another note. Anyone know why I can't add text format styles to List components?

import fl.managers.StyleManager;

// set style for all components such as the List
var tf = new TextFormat();
tf.color = 0x000000;
tf.font = "Verdana";
tf.size = 14;
//StyleManager.setStyle("textFormat", tf); // <- this works but that's not the point
StyleManager.setComponentStyle(List, "textFormat", tf); // this works fine for a TextArea, just not a List??

























Edited: 07/11/2008 at 10:08:19 AM by Cine-Med

I Know This Should Work, But It Doesn't
in a game i'm making i've put this scrip in a movie clip:

onClipEvent (enterFrame) {
for (i=1; i<6; i += 1) {
if (this.hitTest(_root["shot"+i])) {
removeMovieClip (_root["shot"+i]);
this.play();
}
}
}

its just a for loop see if a shot hit the movie clip the shot is removed and the movie clip plays, the clip plays fine but the shot isn't removed (the shot is a duplicated movie clip)

i also tryed to remove the movie clip the shot hit (it was also duplicated) by after the explosion takes place it is removed with this script:

removeMovieClip (this);

but that doesn't work either. can any one help? or has my copy of flash lost the ability to use the "removeMovieClip" command?

With () -- Doesn't Seem To Work
Here is the structure:

movie Clip _level0.ColorBoxX.Highlight (where X is an integer)

and there is a button on the _level0.ColorBoxX

from the 'on (release)' action of a ColorBoxY I want to modify the _visibility of the Hightlight mc on ColorBoxX

so here is my with statement.
Note: _parent.currentColor = the X of the ColorBoxX

with ("_parent.ColorBox" + _parent.currentColor){
Highlight._visible = false;
}

I know that "_parent.ColorBox" + _parent.currentColor evaluates to the proper mc name via doing a trace but the mc visible doesn't go to false (i.e. the mc still shows up)

what am I doing wrong?

Still Doesn't Work
i want to load extra swf file to a defined location of my flash movie, I made an empty MC with instance name "location" and put it into location i want my extra swf to be at. my swf file outside named "introduction.swf", so i did as a friend told me:
on (release) {
loadMovieNum (introduction.swf, _root.location);
}
i put my main movie file and the extra file in the same folder,but it doesn't work, when i press the button , it just open another IE window with "http://introduction.swf/" in the address blank and get " The page cannot be displayed". So strange, could anybody tell me where is the mistake? Thanks!

Why Doesn't This Work?
I want to launch an .exe file from a flashmovie:


Why doesn't this work:

on (release) {
fscommand ("exec", "start.exe");
}


(I have the .exe application in the same directory as te my swf...I've tried it with an .exe projector (instead of a .swf) too...)

Can anybody help me ..please!!!

It Has To Work, But Doesn't...
hi,
I have a movie with two scenes.First scene has just one frame with lots of layers.And there is a mc on top layer which contains 200 frames in.I have 6 special frames in that 200 framed mc.When playhead goes any of them 6 times totally,I want the main movie go to next scene.
So what did I do:

I put an empty mc in 200 framed mc(call it mc A).and add that script to it;

onClipEvent (enterFrame) {
hit = 0;
}

then I add this a/s to empty mc in those special frames;

onClipEvent (enterFrame) {
_root.hit++;
if (_root.hit == 6) {
_root.gotoAndPlay(2, 1);
}
}


BUT IT DOESN'T WORK,what is wrong ,can anyone help me about it?You can offer some other way also.

Thanks for your time.

#%@&* Why - Doesn't - This - WORK ?
i have a chat room that works using php and flash5

note the "that works" bit of that last statement and replace it with "doesn't work". doesn't work that is if you load it in on a seperate level or target. (hummpph!!!)

i need, need, n-EEED! this to work on a seperate level.

why won't it???

tnx

Why It Doesn't WORK
Ok this script should giveme a progresive resize of the x and y Scales. Instead it resizes the movie instantly to 100 =(

onClipEvent (enterFrame) {
this.onRollOver = function() {
while (this._xscale<100) {
this._xscale += 1;
this._yscale += 1;
}
};

Still Doesn't Work
I NEED THE POPUP WINDOW TO "POPUP" IN THE CENTER OF THE SCREEN AND NOT THE FAR LEFT HAND CORNER.

Why Doesn't This Work?
i have this code in my main movie for a preloader that works just great...

onClipEvent (enterFrame) {
t = _root.getBytesTotal();
l = _root.getBytesLoaded();
percent = int ( (l/t)*100)+"% loaded";
if (percent=="100% loaded") {
tellTarget ("_root") {
gotoAndStop (5);
}
}
}


inside this movieclip is just a textfield that displays the percentage loaded. now, i am loading seperate swfs into this main movie into a movieclip called "loadClip1" using a slightly modified version of this script and the percentage loaded script will not display but the movie loads when it is complete. why can't i see the percentage loaded information???



onClipEvent (enterFrame) {
t = _root.loadClip1.getBytesTotal();
l = _root.loadClip1.getBytesLoaded();
percent = int ( (l/t)*100)+"% loaded";
if (percent=="100% loaded") {
tellTarget (this) {
gotoAndStop (5);
}
}
}

Why Doesn't This Work? Please Help
I have this script attached to a button. On the Main timeline it works fine:

-----------------------------
on (release) {
_root.next = "about";

if (current != "") {
if (next != current) {
this[current].play();
}
} else {
this[_root.next].play();
}
}
-----------------------------

But when I place this button INSIDE a Movieclip, it doesn't work. On the debug, it sets var 'next' equal to 'about' (another MC), but it never is able to get _root.next to play.

Does anyone know if I'm usoing the wrong syntax here?

Still Doesn't Work
If I export the file as a swf I still get it without spinning logo. What I do when I see it spinning is go to the menu under test movie and it spins but when I export as swf or avi it doesn't spin. any more suggestions.

Thanks
Jamie

Why Doesn't This Work ?
Hi, I'm just trying to dynamically generate my menu with an array but it doesn't seem to work:


myMenus = new Array("accessories","view", "print");


for (i=0; i<=myMenus.length; i++) {
_root.myMenus[i].onRollOver = function (){
trace("hello");
}
}

Can anyone tell me why assigning this rollover doesn't work?

My instances are named "accessories","view", "print"

Thanks

Php Doesn't Work
I have a Dynamic text box that is supposed to connect to a php page. It works when I run the Flash page from my computer (locally), but the same Flash page when running at our ISP (live) can't find the php. Does anyone have any ideas about why this would happen?

Doesn't Work
yes i know, but it doesn't

OS X Work But OS9 Doesn't
Please, someone help me!!!

I had a website publised by flash MX then it works perfect on OSX or
Explore5.2 but some script doesn't work at all when you see it by OS9 or Explore 5. I published them as flash 5 but maybe 5 doesn't support script of flash MX?
But then again if I publish it as flash 6, a lot of OS 9 users won't be able to see the site, right?


please take a look
@ www.kistudio.info
by both osx and os9.
portfolio page is the one the script doesn't work...

thanks,

tototo

Why Doesn't This Work? Please Help
I have a banner that will repeatedly flash across the screen in a loop of about 15 frames, and at the beginning of this loop, frame 77, I have this code: (This is the title screen for a corny little RPG thingy)

;
stop();
random = random(3);
if (random=0) {
banner = "Press ENTER to start";
gotoAndPlay(78);
}
if (random=1) {
banner = "Forget the princess, Get the gold!";
gotoAndPlay(78);
}
if (random=2) {
banner = "Level up by killing bad guys!";
gotoAndPlay(78);
}
if (random=3) {
banner = "What are you waiting for? START!!";
gotoAndPlay(78);
}


The problem is, the banner always assumes the value of the last condition, even if I had random=random(2), it would still be the value of "What are you waiting for? START!!"

My goal is to have the value of the banner be a different string every time it goes by the screen, but for it to be random.

And THEN, in frame 78, I have this code:

if (Key.isDown(key.ENTER)) {
gotoAndStop(108);
}


But THAT doesnt work, either.

It just keeps on looping with the same banner text.


And one more question:

How would I ultimately create a graphic that moves around the screen in response to directional key presses??

(I have Flash MX 6.0)

It Doesn't Work (?)
For everyone:
take a look at this and, please, tell me why the clipmovie "Produzione_struttura"
don't execute the action I gave to the 2 buttons inside...Please, tell me how to make it work . By the way, I use Mac.
Thanx in advance
(Big thanx MophoAl, u know why)

Why Doesn't This Work?
Code:
str_button = mainTag.childNodes[i].childNodes[1].firstChild;
_root["navbutton"+i].txt_button = str_button;
this works, but I want to change the text to uppercase - I tried

Code:
str_button = mainTag.childNodes[i].childNodes[1].firstChild;
_root["navbutton"+i].txt_button = str_button.toUpperCase();
but that didn't work - doing a trace on it gives "undefined"
Can anyone tell me what's wrong?

ps - I posted this first in the XML forum, but have found I tend to get quicker answers here - sorry for the crosspost!
Cheers

JennyJ

Why Doesn't It Work? :(
I'm making a scene which is started with stream sound; when the stream is over, I connected it with an 'even' Sound and a stop(); action. It worked properly, but when I tried to connect more another sound (with another stop(); action) it didn't stop the movie at all, it continued to play again (from the begining). I couldn't understand why...??

Explain:
Frame (1): Start sound A, stream mode, loop=0.
Frame (1+n): end stream (the A sound's gone out)
Frame (1+n+m): start B sound with 9999 loops ('Start' mode) + stop(); action.
Last frame: stop B sound (use 'Stop' mode) + start C sound ('Event' mode) with 0 loop + stop(); action.

>> The movie doesn't stop at any frame with stop(); action... (!!??!)

Please help me, I don't get them, why... 8-}

Why Doesn't This Work?
Code:
on (release) {
_root.score = _root.score+10;
}
on (release) {
if (_root.score==100) {
gotoAndStop(2);
}
}
i have a dynamic text box var=score in the same frame as the button with the above script..
before the button is pressed the text box reads _level0.score
after it is clicked it changes to NAN and remains there

also is there a way to change this so it works with a movie clip coming into contact with another mc, to add 10 points to the score box, and remove that mc from the stage?

Still Doesn't Work
I thought that might solve the problem but I have looked at other sites of mine that don't use the wmode transparent parameter and they are still just white empty spaces on NS 6.2. Also some sites I made with Flash 5 are fine. I have exported these movies from flash mx as flash 5 but that doesn't fix the problem. Any advice???

Why Doesn't This Work?
Code:
cursor.onLoad = function() {
Mouse.hide ();
startDrag(cursor,true);
}
???
doesn't hide mouse and doesn't drag Cursor

Why Doesn't This Work?
I took 1 of the tutorials and followed it just like it said and the preloader is suppose to come up right away, but it stays at a white screen until the whole thing is loaded then the preloader come up for like 1 second, please help me with this. http://mp7.zapto.org
click the weekly best song.

Why Doesn't This Work?
hey,


I followed this tutorial...

http://www.kirupa.com/developer/mx/p...transition.htm

I am getting close, but my "doors" don't close when i click a button, they start openning???


thx,
Baljinder

Why Doesn't This Work?
alright, just need a little help with a bit of action script...
making a movieclip play using if... and variables....

var clicks = 0;
click.onPress = function() {
clicks++;
trace(clicks);
};
if (clicks == 20) {
ab.gotoAndPlay("b");
}

any help would be appreciated

Thanks
Maikel

Why Doesn't This Work ?
I've made some little animated buttons - they are movie clips - but i can't make them take me anywhere , tried doing the _root. command in the line but still doesn't work

can someone tell me why
i know its probably just me missing something but its starting to annoy me now

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