ActionScript 2.0 :: Add The BlockOneUp Variable To The _root.Block?

Jun 15, 2008

I need some help with some variable problems. (AS2)

Code:
if (_root.Block+blockUpOne.dead == false) {
surroundingBlocks++;
}
I'm targeting a duplicated mc from another duplicated mc. The 'blockUpOne' is the variable of the number on the end of the duplicated mc (the "i" variable when the mc was created 20, the amount of blocks in the grid across). Basically I'm trying to target a block on top of the one with the code on. I need to add the blockOneUp variable to the _root.Block to made a string which targets a duplicated mc above the one with the code. Even more basically, I want to target an mc by adding a variable to the targeting code.

Example:
Block above: Block34
Block with code: Block54
if(_root.Block+(54-20) is alive){
do stuff
}

View 9 Replies


Similar Posts:


Filled Colour As A Variable / Setting Layer To Not Block Content Underneath?

Dec 10, 2009

I wonder if it's possible to take the filled colour (filled with myColor.setRGB(0x993366); like a colouring style) and set the colour filled to be a value of a variable in an if statement? if yes, anyone know how to do it?and is it possible to set a layer's content so that it does not block any button underneath it? I'm trying use that movie as a mask but I do not want it to block any activity underneath it. or is it better to use the myMovieClip .setMask (maskMovieClip)I only need the masking to appear when a specific button is pressed.

View 8 Replies

ActionScript 2.0 :: Edit A Variable In _root From A Function?

Apr 8, 2010

I want to edit a variable in _root from a function

it should look like this:

Code:
var index:number = 0;
function fnct (root_counter){

[Code]....

View 3 Replies

ActionScript 3.0 :: ReferenceError: Error #1065: Variable _root Is Not Defined

Jul 15, 2009

I was following a tutorial and input the AS code :

_root.onEnterFrame = function(){
if(_root._xmouse<50){
imgBar.prevFrame();
}
}

and im getting this : ReferenceError: Error #1065: Variable _root is not defined.
at Sliding_fla::MainTimeline/Sliding_fla::frame1()

View 7 Replies

ActionScript 2.0 :: Put The Character Variable And Info In The First Keyframe And Refer To These Via _root In Any Frame

Dec 29, 2010

I am trying to make a game to learn actionscript. my game is going to have multiple keyframes, ie one for dungeon, 1 for a large map yadda yadda yadda. Things like the character i would like to be available to all keyframes. i am assuming i put the character variable and info in the first keyframe and refer to these via _root in any frame. However if i want to make a dungeon and use the dungeon scene variables i would use this.

right now since i am only on the making a dungeon part i can refer to anything using this or _root. Case: my dungeon scene consists of walls and paths. right now i can do something like if(_root["path" + yPos + xPos]) _root["path" + yPos + xPos].removeMovieClip;

i can also call the same code using this instead of _root and it works. when i add a main new main frame and move the dungeon scene from frame 1 to frame 10, will i still be able to inter use _root and this and have the same effect, or once i move the dungeon scene from frame 1 to frame 10 i will no longer be able to use _root. also i only have 1 layer.

View 3 Replies

ActionScript 2.0 :: Change The _root.broj And _root.logo Variables Inside The Function?

Jan 14, 2010

In the code below i want to change the _root.broj and _root.logo variables inside the function which returns values from .php file. Inside the function everything works fine and all values are correct but when i trace var broj outside the function it's still 0.

var result_lv:LoadVars = new LoadVars();
var send_lv:LoadVars = new LoadVars();
var broj:Number=0;
var logo = new Array();

[Code].....

View 1 Replies

ActionScript 2.0 :: _root.cargo Are Multipled By 10 And Added To _root.totalscore?

Feb 27, 2003

im lookin to make this so that the points taken from the _root.cargo are multipled by 10 and added to _root.totalscore

[Code]...

View 2 Replies

ActionScript 2.0 :: _root._root[eelmine].nextFrame()?

Sep 14, 2004

if a condition is true, then:_root.(MC with instance name that is the value of "_root.eelmine").nextFrame(); is this correct?_root._root[eelmine].nextFrame();

View 16 Replies

ActionScript 3.0 :: Can't Accses "block" Movie Clip Which's Added From The Fla Files And Given An Instance Name As "block"

Dec 31, 2010

So i have an external as file which have a function. the function make the movie clip do something when it hit another object which i named "block."

but the external as file can't accses "block" movie clip which's added from the fla files and given an instance name as "block".

View 4 Replies

ActionScript 3.0 :: No Longer Move The "_root" By Changing The _x And _y Positions Of The _root?

Jan 26, 2009

I just recently began migrating from AS2 to AS3, and I have of course realized that I can no longer move the "_root" by changing the _x and _y positions of the _root (which no longer exists in AS3). How can I do this in AS3 (specifying _x, _y, _z possibly of the "_root")?

View 2 Replies

ActionScript 2.0 :: Basic Preloader - Dynamic Text Box Which Should Read The Variable "_root.loadText"

Jun 22, 2010

I admit I'm fairly new to flash, but I've almost finished an entire RPG battle system complete with music [etc. etc.] - but my problem is trying to add a preloader.. I have a basic page which says "Loading" and has a Dynamic text box below which should read the Variable "_root.loadText". In the first frame I have this code:

[Code]...

and in the second just "_root.gotoAndPlay(1);" for the updating process. I'm sure that's all okay. But when I export it, then upload the swf file to somewhere like SwfCabin to show people for testing purposes, they have to wait on just a blank white screen for 1~3 minutes.. -note: I use both Adobe flash CS3 [at home] and Macromedia Flash 8 [at school] - I can stick to just CS3 if needed.

View 2 Replies

ActionScript 3.0 :: Call The Global Variable Using "_root."

Feb 7, 2011

In actionscript 2.0, I can call the global variable using "_root."

ActionScript Code:
var str1="global"
function a(){

[Code].....

But it seems that I cannot do the same in actionscript 3.0 by using "root."

View 4 Replies

ActionScript 2.0 :: Use "_root" When Declaring A Variable?

Feb 10, 2010

i want to access variables from within movie clips, and my question is, when declaring variables from the root, is it necessary to add the _root? e.g.:

Code: var _root.imgSource:String = "img001.jpg"; or would it be sufficient to declare the variable in the root timeline, then refer to it in child clips as _root.imgSource?

View 7 Replies

ActionScript 2.0 :: Set "_root" Of A Swf To A Local Variable?

Mar 16, 2008

I'm cheating and using lockroot function atm

but how do I set "_root" of a swf to a local variable?

localroot = this ?

View 1 Replies

Flash8 New Kid On The Block?

Apr 17, 2009

I maintain two web sites and am reasonably competent in Dreamweaver and Fireworks. Now to get into Flash.I want to produce a banner which shows a flag + Welcome in that language and have about 20 nations to cover. Can anyone please point me to a guide as to how to get this started?

View 1 Replies

ActionScript 3.0 :: NavigateToUrl - IE8 Pop Up Block

Jun 30, 2010

I have a question: The following code, which works OK in Firefox and Safari, gets IE8 to throw a pop up block The simple code:

[Code]...

View 3 Replies

Actionscript :: HtmlLoader Block Ads?

Dec 14, 2010

I've got an AIR app that is loading mx:HTMLs. I would like to block the ads that show in them just like Adblock Plus for Firefox does (see http://adblockplus.org/en/). I subscribe to the Easylist USA filter.

var req:URLRequest = new URLRequest("http://www.google.com");
thisHtmlWindow.open();
thisHtmlWindow.htmlContent.htmlLoader.load(req);

I don't know where to begin to interrupt the HTML GET-ting process in actionscript. This is where I suspect I can add the HTTP filter. It'd be nice to subscribe to the filter and periodically download it/update it to make sure the major ad networks are blocked.

View 1 Replies

ActionScript 2.0 :: Use } Or }; At The End Of A Code Block?

Dec 14, 2006

Something I've always wondered, but never got round to asking is should I use...

Code:
}
... or...

Code:
};

... at the end of a code block? What's the difference as I've seen both used but no explanation as to why?

View 4 Replies

IDE :: Catch Block Not Working?

Oct 29, 2010

why my code not workinghere is my as code

package com_dp
{
import flash.net.URLLoader;

[code].....

View 1 Replies

How To Make A Layer Block Buttons Below It

Jun 8, 2009

ok i'll try and explain this best i can, on my site i have a menu that takes up the whole of the content area.. the plan is that when the user clicks the menu button within a content page the menu would appear over the top however with a slightly transparent background so you can still see the last visible content page in the layer underneath.. i've got this to work however the buttons within the content page are still active.. is there a way i can make the menu layer 'solid' so the content below is only visible but not accessible?

View 5 Replies

Mark An Entire Block Of Code?

Apr 7, 2010

How do we make an entire block of code (maybe 10 lines) as comment.

Maybe just to deactivate a code block when trouble shooting AS code.

View 2 Replies

ActionScript 3.0 :: Movieclip Can't Appear When I Add It In Certain Block Of Code

Sep 1, 2011

I want a movieclip to appear in a drag and drop game. When you successfully drag the right object and drop it then an animation is called from the library.The animation doesn't appear. However, when I use the same code at the beginning of my programme it does appear so it's not that part of the code that is the problem. Also, a trace statement does trace so it is running the code.[code]...

View 7 Replies

Html :: Banner Block Up Authorization Div?

Feb 17, 2010

Flash banner block up authorization div. Currently it looks like:

View 2 Replies

Actionscript 3 :: Finding The Offset Of A Block?

Jan 2, 2011

I am trying to make a pong like game but i need to find the offset from the center of the paddle so that i can make it bounce differently depending on where it hits the paddle. How can i achieve this?

View 1 Replies

Flash :: Block Until Request Completes?

Feb 9, 2011

I want to make a synchronous request to a server. I want the entire program to stop processing anything until the request is complete and the server has responded; what is the proper way of doing this?

View 3 Replies

ActionScript 3.0 :: Can't Understand Block Of Code?

Dec 10, 2009

i'm watching actionscript manual and can't understand this code, could you please explain what it is.

View 2 Replies

ActionScript 3.0 :: Scaling And Adding The Block

Apr 27, 2011

What the soundwave should do is follow the block, and scale appropriately. This is my code for scaling and adding the block, inc. soundwave

[Code]...

View 0 Replies

FLV And SWF Videos On Site - How To Block Redirects

Feb 4, 2010

I am working on an archive that contains a large number of flv and swf videos. The plan is to make this archive available to my site visitors to be able to go back and look at some of the old flash videos. Simple enough. The problem is that most of these videos have a redirect at the end which will send you to a website that no longer exists and I do not have the original fla's to work with. These files are pretty old. So, what I'm looking for is a way to prevent these redirects and keep my visitors on my site.

View 3 Replies

ActionScript 2.0 :: Move A Block Of Text Up?

Mar 13, 2008

Is it possible to use actionscript to move a block of text up (like movie credits) so it scrolls up smoothly?

I've tried motion tweening but no matter what i do, it jerks :-|

View 2 Replies

IDE :: White Block Before Flash Movie?

May 26, 2009

i have an html web site withe flash movie there is white block for a few second before the flash movie is up ow do i get read of it? can i make this white clock to be black or to have a clock the time until the flash movie is up

View 5 Replies







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