ActionScript 2.0 :: Possible To Change Target Level Of MovieClip?

Feb 9, 2007

is it possible to change the target level of a MovieClip? So I have two instances of the same MovieClip, both on level0.[code]Basically, now btn2 will disappear, and btn1 will remain visible.

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Mouseover MovieClip - How To Change Alpha Level

Sep 15, 2011

When I mouse over a movieclip, I want its alpha level to change. Here's what I have:

ActionScript Code:
object.addEventListener(MouseEvent.MOUSE_OVER, mouseOverObject);
object.addEventListener(MouseEvent.MOUSE_OUT, mouseOutObject);
function mouseOverObject(e:MouseEvent){
if(!inventoryOpen){ e.currentTarget.alpha = 100; }
} function mouseOutObject(e:MouseEvent){
if(!inventoryOpen){ e.currentTarget.alpha = 50; }
}

It does work, but the mouseover only registers when the cursor is over certain areas of the movieclip.

View 2 Replies

ActionScript 2.0 :: CS3 Loadmovie Into Target Mc - Not Level?

Apr 5, 2009

got a file that contains scripting that creates and animates a carousel effect in a faux 3d space - it all works great on a mac and some pc's but on a lot of pc's it doesn't play nicely! i have added some script to carousel script so if the carousel item is clicked it rotates that item to the front and then loads the specified swf into level 1

pc's don't seem to recognise the alignment of the loaded swf and brings it in half cropped off the screen - appearing in the top left of the stage area.how do i tell the loaded swf to centre in the middle of the stage just like the rest of the elements in the movie? how to make the target mc sit at the highest level/depth - in other words above the carousel? this is my onclick script:

Code:
function released()
{
output.text = this.txt_label.text + " has been selected";[code].........

View 1 Replies

ActionScript 3.0 :: Target The Event To The Second Level Of Sprite?

Sep 21, 2011

If i have a container, with some sprites and this sprites containes other sprites, wich is the best way to target the Event to the second level of sprite?
 
Container:
 
- sprite1 ---> contain n sprite
- sprite 2 --> contain n sprite
- sprite 3 --> contain n sprite[code]....

View 7 Replies

ActionScript 3.0 :: Target An External File Locate Up One Level?

Feb 25, 2011

I was trying to upload an external .txt file which is located up one level from my .fla file but I couldn't make it work, this is what I have...This code works just fine if I put my external .txt file in the same folder as my .fla

ActionScript Code:
var myRequest:URLRequest = new URLRequest("MaterialRef.txt");

but when I try something like... where the .txt file now is in a folder called "Materials" which is located up one level, it just doesn't work.

ActionScript Code:
var myRequest:URLRequest = new URLRequest("../Materials/MaterialRef.txt");

View 0 Replies

ActionScript 3.0 :: Target An External File Located Up One Level

Feb 25, 2011

I was trying to upload an external .txt file which is located up one level from my .fla file but I couldn't make it work, this is what I have...

This code works just fine if I put my external .txt file in the same folder as my
.fla

var myRequest:URLRequest = new URLRequest("MaterialRef.txt");

but when I try something like... where the .txt file now is in a folder called "Materials" which is located up one level, it just doesn't work.

var myRequest:URLRequest = new URLRequest("../Materials/MaterialRef.txt");

View 6 Replies

ActionScript 2.0 :: Changing Level / Target Of New Movie Stop Old File From Playing?

Jun 27, 2003

[code]That is the code used to solve the cache problems, but i dont' really get the second line. How does changing the level or target of the new movie stop the old file from playing?!i also searched what "?" does in flash, but i couldn't seem to find it.

View 3 Replies

ActionScript 3.0 :: Target Movieclip With E.target?

Aug 30, 2010

qi have a movieclip which is added to the stage:

var profileholder:profileHolder=new profileHolder ;

inside of profileholder is another movieclip(infoBtn) that acts as a button.when the mouse is over profileholder i want to do something with infoBtn like:

//profOver is the over state of profileholder
function profOver(e:Event) {
e.target.infoBtn.alpha=1;
}

this doesn't work and brings up this error:ReferenceError: Error #1069: Property infoBtn not found on flash.display.Loader and there is no default value.
at main_fla::MainTimeline/profOver()

i also tried:
function profOver(e:Event) {
var item:profileHolder=e.target as profileHolder;
item.infoBtn.alpha=1;
}

and get this error:TypeError: Error #1009: Cannot access a property or method of a null object reference.

View 1 Replies

ActionScript 3.0 :: Create A New Movieclip For Each Top-level XML Node And Include In The Movieclip Two Separate Textfields?

Jun 4, 2009

My goal with this actionscript is to create a new movieclip for each top-level XML node and include in the movieclip two separate textfields, an image, extend the movieclips to two row if necessary, rotate each movieclip differently depending its parity and add a hover event based on the movieclips instance name. I have achieved each goal except for the hover bit. The reason I cant access the instance name outside of the for loop is because the instance name only lasts for duration of the loop. Here is my current code (at pastie address).

[URL]

View 3 Replies

Actionscript 2.0 :: Change Level Of Movie Clips?

Jul 29, 2009

I wanted to know if there's any command that let's you bring in front target Movie clip or Move it at the end...

Also Is there any command that pauses the proccess of the script and another that let's you continue?

View 3 Replies

ActionScript 2.0 :: Change Level Of Movie Clip

Mar 2, 2002

I just start to give the firsts steps in Flash5 ActionScript, then I would like a pacient help, because I can't to do this.I have an intro (Instance Name: logo) and another movieclip (InstanceName: back).The intro starts(logotipo), on the middle they calls the other movie clip(back in tell target "go"). This movie (back) that would to be the background of the all scene and of the "logo" too.First problem. I want to invert the levels of the movieclips because I want the mclip(logo) always on stage and the "back" on _level0.That can be possible?! How??On the end of the MovieClip(back) I' ve got the action:loadMovie("menu.swf", _level20).The "menu.swf" is a menu bar with the buttons. When I press a button is to change the action of the movieclipe(back) on the _level0.

View 2 Replies

ActionScript 3.0 :: XML Attribute Change Depends On Children Level Attributes

Jan 5, 2012

[Code]....
 
I am currently updating page level "visited=true" programatically/runtime. I wanted to roll up to topic level(all parent levels) once I have shown visited state "true" to all pages in topic.

View 2 Replies

ActionScript 2.0 :: Targeting Clips On Layers - Change The Level Dynamically?

Jan 15, 2004

[URL] Theres the example to work with....anyway....as you can see, im loading in movies externally...each on its OWN different level....what i want to do is make it so that when i click a menu option on the left, the current swf loaded on the stage closes and the new one comes up (to avoid the clutter of 10 differnt windows all scattered).....here are my thoughts:

1. have variables on the root timeline that are basically "currentLoaded" and "currentLevel" -- which basically will store the name of the currently loaded swf and the level that its on.

2. each swf would have code on frame one that would see if the 'currentLoaded' varible is blank, and if not...it will close the current loaded swf ....

my dilemma is that i dont know how to change the level dynamically...i know you could do the instance name like this:

[Code]....

View 4 Replies

ActionScript 3.0 :: Bitmapcanvas - Add Shadows To All Objects - Background Bitmap (won't Change During Level)

Oct 21, 2010

I'm working on a tile based game, inspiredb by tutorials from the book "the essential guide to flash games". Please have a look at [URL] -- edit: by the way, the game idea is by no means mine, but i want to replicate the old game "sensitive" from the c64 [URL] for learning purposes I want to add shadows to all objects that stand in the water. However, since I want to keep my sprite count to a minimum, I have put all objects that don't do anything in a background bitmap. The best solution I can think of is to have:

1) a background bitmap (won't change during level)
2) a background shadows bitmap (won't change during level)
3) a sprite layer
4) and a sprite shadow layer at every screen, but this seems like a lot of work for just shadows.

View 5 Replies

ActionScript 3.0 :: Change Target When Swf Not Available?

Dec 8, 2008

I want to redirect the following code when the target isn't
available.

function buttonClick(event:MouseEvent):void
{
gotoAndStop(event.target.name);

[Code]....

The code works great but I'm building a large site and would like to have a default swf that loads when the target isn't available. I tried various if statements when event.target.name == null but haven't been able to get any of them to work.

View 7 Replies

ActionScript 1/2 :: Movieclip In ButtonMode - Draggable To Different Movieclip Target?

Jan 8, 2010

I'm doing a project that makes a movieclip draggable in different droptarget movieclip. When it is dragged in the 1st target an animation is triggered and so as the rest of the droptargets.Here's my initial code that does'nt work:
 
btn1.buttonMode = true;
b1OrigX = btn1._x;b1OrigY = btn1._y;
//btn1btn1.onPress = function(){    startDrag(this);}//droptarget = box1btn1.onRelease = function(){    stopDrag();       //droptarge1t

[code]....

View 2 Replies

ActionScript 3.0 :: Change An Event Target's Name?

Mar 22, 2009

Can I change an event target's name? or it's an only-read property? I've been googling it but to no avail... For example, say this is my button code:

[Code]...

if trace the event target's name, you get buttonOne. But what I need to do is have the event's target's name to become buttonOne1. because I already have a button with the instance name. That's my setup, not the way I would do it OF COURSE, but this is the way the unique file is setup for my aunt, to have two set of buttons that calls the same image...(not the thumbnail issue I had before)... so the Question: is there a way to add a letter or remove a letter from the event target's name? You know how you can add a letter to the beginning of an array like buttonsArray.unshift(newButton)....can you do the same thing with an event.target.name?

View 3 Replies

ActionScript 2.0 :: Accessing A Movieclip On Another Level?

May 20, 2003

i made this code to dynamically create a menubackground of square tiles. I had no problem here...but then when i try to access them i dont seem to succeed...dont know how too.heres the first code creating the tilepattern...

amount = 0;
row = 0;
horiz = 0;

[code]....

View 1 Replies

ActionScript 2.0 :: Which Movieclip Is At A Higher Level

Dec 23, 2006

If I have 2 movieclips, how can I know through actionscript which one is at a higher level?

View 2 Replies

ActionScript 3.0 :: Cannot Change A Target Point Of Loaded Bitmap?

Apr 28, 2010

I have gallery which I want to modify. Now, I load big image on the stage by clicking thumbnail menu. I can see a small preview of that thumbnail on mouse over. Thumbnail preview is done by cloning thumbnail image and nest that image into thumbnail preview window.

[Code]...

However, it did not work yet. I do something wrong. I am wondering if someone can help me to figure it out. I spent a lot of time to modify it as It looked like a simple thing but without any success. I will provide more information if needed. The project consists of many classes I can explain more if the information I provided is not enough.

View 0 Replies

ActionScript 2.0 :: Change The Color Of The Target When Game Ends?

Feb 29, 2012

I've created a simple drag 'n' drop game and I want the color of the target to be changed only when the user puts inside it all the text frames.

The instance name of the target is "targetCircle" and that of the text frames is "circle_mc", "circle1_mc"....."circle5_mc".

View 0 Replies

ActionScript 3.0 :: Target Of EventListeners - Possible To Change MovieClips Image

Nov 7, 2011

I've made a loop that is creating 9x movieClips that is loading external images and I have also added eventListeners to those movieClips to make it possible to change the movieclips image. My problem is that i can't access the target of the "first eventListener". Here is the code to browse for the new image, i want to access the movieclip of this function in a later eventListener, like this: event.CurrentTarget

Code:
file.addEventListener(Event.SELECT, onFileSelected);
function mUp(event:MouseEvent):void{
file.browse(new Array(new FileFilter( "Bild (JPG och JPEG)", "*.jpg;*.jpeg;")));
}

The second eventListener. This function is called when the new image is selected
Code:
function onFileSelected(event:Event):void{
file.addEventListener(Event.COMPLETE, loadCompleteHandler);
file.load();
}

The third and last function, this function is called when the image is loaded and is ready to be used.
Code:
function loadCompleteHandler(event:Event):void{
file.removeEventListener(Event.COMPLETE, loadCompleteHandler);
var loader:Loader = new Loader();
loader.loadBytes(event.target.data);
// Here is the problem!
event.target.addChild(loader)
}

If if put this code, it will target the second function's event.
Code:
event.target.addChild(loader);
I am searching for a code looking like this to replace the old image with the new one
Code:
event.target.target.addChild(loader);

View 5 Replies

ActionScript 3.0 :: Loading .swfs Into A Movieclip, Same Level?

Nov 24, 2010

My problem is on my stage i have a loader_mc invisible movieclip that i want to load .swfs into using addchild

Problem is, everytime i click on a button that addchild the .swf keeps adding ontop like layers, therefore in my function button i tried to removechild before addchild but i will keep getting error #1009

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at bla_fla::MainTimeline/frame1()

I was wondering if anyone can teach me any other better ways how to load movies like in as2, on the same level when the button is clicked, the previous .swf is kicked aside and the new one will load.

View 2 Replies

ActionScript 2.0 :: Create A Level Select Screen So The Buttons Unlock Complete A Level?

Apr 22, 2011

im trying to create a level select screen so the buttons unlock as you complete a level, so far i have this on each button:

on(release){
if(this.number <= currentItem){
gotoAndPlay(3);
}
}

[Code]...

View 0 Replies

ActionScript 3 :: Level Of MovieClip - Moving Action Layers?

Aug 9, 2011

When creating some extended MovieClip to the stage using AS on Actions of some frame, on which layer this MovieClip is created? On layer where Actions were? If I wanna move it down, for example, can I simply move the Actions layer? And by the way, one more question, what if I would not create Actions layer and write all the code on some used one?

View 2 Replies

ActionScript 2.0 :: Attach Movieclip To Stage And The Detph Level?

Sep 18, 2011

on my journey in creating a tile based grid. i came across on the second line and the 3rd argument. ( the depth leve of the movieclip.

++ d now i didnt think this was possible. I would like to know what the d stands for as does not appear in blue. so does not appear to be a inbuilt command. I mean i normally use this.getNexthighest depth.

[Code]...

View 4 Replies

ActionScript 1/2 :: OnLoad Working At _root Level But Not At Mc_target Level?

Aug 26, 2010

I have two layers in my FLA both with empty movie clips as follows:In mc_Empty1, I attach a faded background movieclip as I wait for mc_Empty2 to load a SWF.  Once the SWF is loaded into mc_Empty2, I want to remove the faded background movieclip from mc_Empty1.  When I load the SWF from the main timeline, the onLoad() function works and removes the faded background from mc_Empty1.  However, when I load the SWF from mc_target, the SWF loads, but the onLoad() function does not.  Here's my AS2 code:
 
//Loading SWF from main timeline
mc_Empty1.attachMovie("mcFadedBg", "mc_FadedBg", 1);
mc_Empty2.loadMovie("My.swf");mc_Empty2.onLoad = function():Void{    trace("loaded"); //This works    removeMovieClip(mc_Empty1.mc_FadedBg); //This works}

[code]....
 
I know I'm targeting properly because the SWF loads as it should, but the onLoad() function does not. 

View 3 Replies

ActionScript 3.0 :: Application Level Vs Document Level Class Paths?

Oct 2, 2010

This is making me a little kooky today. I thought I could defined a library path in PREFERENCES > ACTIONSCRIPT > ACTIONSCRIPT 3.0 SETTINGS then that library would be available to all AS3 FLA files, but that doesn't seem to work for me. If I use the PUBLISH SETTINGS and define the library path everything is fine.

Is there something that I could have done to disable the application level class path functionality? I guess I'm trying avoid having to set the library path for every new FLA I'm making.

View 1 Replies

ActionScript 2.0 :: Play Movieclip To Show Start Of Level In Game?

Nov 8, 2009

I have a game with multiple levels, which is working as I want it to. I would like to add just one extra bit of functionality. As each level starts, I would like a movieclip to play and then disappear after a second or so. The movieclip will just say "level 1", "level 2" etc, without any interaction. Ideally it will appear as the level loads, and then fade out to disappear.

View 2 Replies

ActionScript 2.0 :: Load Swf From Third Level Into Container In First 'home' Level

Dec 26, 2011

I'm doing a bigger aplication in flash (as2).Image, there is a main "home" flash with several menu buttons.Clicking these buttons, I load external swf into an empty container in this "home" flash.[code]clicking buttons in this second level, will load external movies into an empty container in this SECOND LEVEL swf.This works fine, but now, coming to the THIRD LEVEL (don't think there will be more in the future) problems come up, some scripts won't work.Now (I'm a as2-beginner) I think, loading external swf ALLWAYS into containers in the first "Home" flash should solve the problem.But I don't know, how to load an swf from the third level into a container in the first "home" level.In the "home" level, I have a "close" button, that will unload the container content.I need to go to a certain scene "content_2" in the home swf, too.

View 7 Replies







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