ActionScript 2.0 :: [MX2004] Prototype On Specific Movieclips Only?

Jun 24, 2004

What I am trying to do is to make a prototype apply to only certain movieclips. For example...I have one apple movieclip and one orange movieclip. For these I have two prototypes:

Code:
MovieClip.prototype.onLoad = function () {
this.fruitType = "Apple";
};

and

Code:
MovieClip.prototype.onLoad = function () {
this.fruitType = "Orange";
};

But I don't want the apple prototype to apple to the orange movieclips and the orange prototype shouldn't apply to the apple movieclips (they will overrun eachother).How can I accomplish this, without adding code to the specific movieclips, and WITHOUT doing like this:

Code:
MovieClip.prototype.onLoad = function () {
n = this._name.substr(0, 1);
if (n = "a") this.fruitType = "Apple";
if (n = "o") this.fruitType = "Orange";
};

View 12 Replies


Similar Posts:


ActionScript 2.0 :: Prototype On Specific Movieclips Only

Jun 24, 2004

What I am trying to do is to make a prototype apply to only certain movieclips. For example..I have one apple movieclip and one orange movieclip. For these I have two prototypes: [code]But I don't want the apple prototype to apple to the orange movieclips and the orange prototype shouldn't apply to the apple movieclips (they will overrun eachother).How can I accomplish this, without adding code to the specific movieclips, and WITHOUT doing like this:[code]

View 12 Replies

IDE :: MX2004 Looping Different Movieclips In One Animations?

Apr 7, 2011

l am trying to finish banner for my daughters web...l am just a mummy and dont have time to take classes etc but l am trying...this is a bannerone animation with few movieclips (already converted to movieclips)l need two of them to continue loopingl have put STOP action but then everything goes to a stilll tried entering layers on top vith actions like continue but its not working

View 1 Replies

ActionScript 3.0 :: Target Specific Movieclips In An Array?

Nov 16, 2009

I did this:

Code:
var mc_array:Array;
mc_array = new Array(3);
mc_array[0] = mc1;

[code]....

I want to use arrays to shorten things, but I don't know how to get and set the properties of individual entries of the array (with a mouse click).

View 2 Replies

ActionScript 2.0 :: Printing Movieclips From A Different Scene In A Specific Area?

Jul 22, 2011

So I've recently started working with ActionScript 2.0 at my internship. I am now working on a game, that already had all its graphic interface designed and I am doing all the programming. Basically what I have to do is get some movie clips (randomly) from a different scene and print them on another scene in a designated area (but also randomly). I am not sure the best way to explain my problem, so I made a sketch of how the scene should look. [URL] So basically I want to print the movie clips on the black space, as if they were the red squares. But the movie clips are stored in a different scene in the same project. So I want to know two things: how do I get the movie clips from the different scene? And how do I print those movie clips on the specific area?

View 1 Replies

Actionscript3 :: Jump To A Specific Frame Avoiding Others Movieclips?

Feb 4, 2012

I have a problem regarding flash, actionscript3 and movieclips.

I have 2 videos(inserted as movieclips, each one in different frames 100 and 102). I want to gotoAndPlay the one on frame 102, but the other in frame 100 always starts at the same time. How do I play just the specific movieclip of frame 102?

P.S. If I order to reproduce the movieclip on 100, it starts as it should.

View 1 Replies

ActionScript 2.0 :: Getting Text To Appear When 4 MovieClips Are Each Stopped On A Specific Frame

Dec 8, 2009

Basically I'm making a demonstration of a puzzle for class.

Each MovieClip is a bit of the puzzle, and users can move forward a frame or back a frame using the keyboard using the on(keyPress) function.

When the puzzle is complete, I want text to appear (or another MovieClip, ideally) letting the user know they've completed it.

So I'd want the text to appear when the following conditions are fulfilled:

round_mc is at frame 53
square_mc is at frame 2
triangle_mc is at frame 19
rectangle_mc is at frame 80

View 2 Replies

ActionScript 3.0 :: Full Screen Scale Mode For Specific Movieclips?

Dec 7, 2009

I'm building a flash website that needs to have fullscreen enabled for the entire site. Does anyone know how to make only specific movieclips scale up in size when entering full screen mode, like various background movieclips?

View 3 Replies

ActionScript 2.0 :: Duplicating MovieClips Multiple Times In Specific Location

Dec 22, 2011

I have a question about movie clips. I have about 20 MC-s in my flash. Is it possible for me to duplicate one of them multiple times in specific location? I mean if I have button that says "DOG" and I press it, then new dog appears on screen. And I need to do it for like ten times or so

View 8 Replies

IDE :: Convert MX2004 To CS4?

Feb 1, 2009

I have the attached .fla file that was created in MX2004 but I only have CS4 to work with. Is there a way to convert this so I can use it?

View 2 Replies

ActionScript 2.0 :: Prototype...

Feb 27, 2004

Hi there,
can someone tell me what Prototype exactley is?
I guess it's something like css style sheets.
kind regards

View 3 Replies

ActionScript 2.0 :: Convert From MX To MX2004?

Jan 10, 2006

I have a piece of code that works fine using flash player 6 and AS2 but soon I as try to use flash player 7 and AS2 it stops working..

This is my code:

Code:
var cgiThing=new loadVars();
cgiThing.onLoad=function(ok){

[Code]....

View 2 Replies

ActionScript 2.0 :: Duplicating MCs (yet Another One) (MX2004)?

Apr 9, 2006

Whenever I make a code to duplicate anything in a reaction to an action, i get the problem of having my initial duplicated mc destroyed upon re-duplicating (you fire bullets and the one shot before the last always disappears and so).The thing is, if you take kirupa's "How to Fire"-tutorial, download the source and run it, the thing works like a charm. However, even if i copy every last single bit of code and content to a new document, the duplication process acts as described above.In addition, here's a quote from the tutorial "How to Fire" [url]

explain how on earth one would get "_level0.bullet" from something the likes of "trace(this._name)", which, of course, returns the instance name. Which would, in the aforementioned tutorial's case, be, in fact, "bullet". Not "_level0.bullet". He states "It's not the instance name"... Well, what the heck is it then? The result of the trace in question varies relying COMPLETELY upon the given instance name. If you write "Bratwurst" as the instance name, you get "Bratwurst" from the trace, as god is my wittness.

Even if i remove EVERYTHING from the code that even COULD, by the user's will, remove the duped mc, the initial problem remains. You can only fire one bullet at any given time, other(s) disappear.It's most propable that there's just something i've missed completely, and end up making myself looking like an ***, but still.For those who want a code, just take a look at the tutorial (the URL above). Everything's basically the same. I would also appreciate if someone were to try what i've described, which is to copy everything from the tutorial .fla and placing the stuff on a fresh document.

View 1 Replies

IDE :: Making The Leap - MX2004 To CS4?

Mar 29, 2010

I've been using MX 2004 pro for a few years now at a fairly superficial level just for website updates/enhancements, little educational things, and little personal animated birthday cards, etc. I have just recently started learning action script, which I'm getting, slowly but surely.

Anyway, my question is: how much different is CS4 from MX 2004? i.e., am I looking at a huge learning curve? I don't mind huge learning curves when I have lots of time on my hands, but I don't. But I would like to keep my software up-to-date, since I just got a new computer with Windows 7 on it.

View 1 Replies

ActionScript 2.0 :: Make A Specific Thing Happen While Clicking A Specific Button

Jan 17, 2006

What I want is a hint how to make a specific thing happen while clicking a specific button. Like "if I click button 1, do this". Would like to use this script though I'm gonna add buttons over time and this is an easy way to have the functionality working.

Here's the code:

Attach Code

function hitButton(btn) {
btn.onRollOver = function() {
this.colorTo (0xC4006A);

[Code]....

View 4 Replies

ActionScript 2.0 :: Change The Colour Of A Graphic In A Specific Movie In A Specific Frame

Mar 31, 2006

i need to change the colour of a graphic in a specific movie in a specific frame. if i have a movie clip instance-named "sidetext" thats 15 frames long, and i want a graphic in the movie, called "letterp" to change to one of four colours that i want it to randomly at frame 10 and stay that colour uintil frame 15, how can i do this?

View 2 Replies

Actionscript 3 :: How To Get MovieClip.prototype

Aug 12, 2010

In a ActionScript 2 code sample it uses some MovieClip.prototype's functions, as MovieClip.prototype.setModel;I'm trying to write this example using an ActionScrip 3 class, but the MoviewClip.prototype does not exists, where can I get it from? Does it exists in ActionScrip 3?

--update as you are asking, here goes, this code works just fine as an actionscript included on frame1, but I want to make a ActionScript 3 class with this same code:

//package
//{
// public class asteroids extends MovieClip
// {

[code].....

View 2 Replies

ActionScript 2.0 :: Prototype For TV Using D / Pad Navigation

Aug 25, 2011

I am using a software to load my swf in the TV and I can get basic functionality without problem. My issue is with creating a menu slider that is x and y sensitive without using the Xmouse or any mouse related property. This has to function within D-Pad Navigation and with a standard TV remote. I have had some success with using an invisible button (loaded with a script) to make the menu "move". This way doesn't allow much control.

View 6 Replies

ActionScript 2.0 :: MovieClip.prototype?

Sep 27, 2007

am finishing up the Friends of Ed Actionscript for Flash MX.At the end they show using MovieClip.prototype. Is this depreciated or not best practice? I was planning on moving onto FOE Object-Oriented ActionScript.

View 2 Replies

ActionScript 2.0 :: What Is A Usage Of Prototype

May 8, 2002

i don't understand the usage of prototype.

View 4 Replies

ActionScript 2.0 :: Prototype Does Not Work?

Dec 28, 2004

Why wont work this prototype ?I dont understand it.You can download the fla hereWhat do it need to do: When you roll-over a piece of the skyline it need to resize to that defined number.I putted the code in a for()-loop.

View 1 Replies

ActionScript 2.0 :: Prototype Align 5 Different Mc's / Swf's

Jan 9, 2005

ive made 5 diff codes to give the right positions on my mc's. but the code is all hanging on the mc's. Now i was thinking 2 put all code into 1 keyframe. So i think i need to write a prototype of it. It will be great if somebody out so i can understand more about how 2 write my own prototype for this. The file is just for study for me to play a bit with aligning mc's on stage. The code that is hanging on the clips are:

[Code]...

View 1 Replies

ActionScript 3.0 :: Loop A Specific Bit Of My Movie Until A Specific Link Is Clicked?

Mar 29, 2010

how I can loop a specific bit of my movie until a specific link is clicked?

View 5 Replies

Flash 10 :: Export Specific Frames Not All Frame - Specific Timeline

Sep 15, 2010

how do i export specific frames not all frame. ex: if flash has 1 to 200 frames. here i want to export 51 to 150 frames as a movie. if there is any command or plugin to export movie like this.

View 0 Replies

ActionScript 2.0 :: Read Specific Field In XML If Press A Specific Buton?

Mar 7, 2011

so i need to make a flash that will do the next things.if user press button "x" on the next frame should display "x" text from a xml.if user press button "y" on the next frame should display "y" text from a xml.

View 1 Replies

ActionScript 2.0 :: OnRelease On Dynamic Mc [MX2004]

Feb 12, 2004

The problem is that I can't get the subItems to work with the onRelease function.

View 1 Replies

ActionScript 2.0 :: Mx2004 Multiple HitTests

Sep 14, 2004

I have 9 static movieclips arranged in a 3 by 3 grid, and 1 movieclip that moves using keypresses (invisible_mc)[code]when a hitTest is registered between the invisible_mc and any of the icon_mc's, The icon_mc goes to and stops on frame 2..else it goes to and stops on frame 1. I have constructed the hitTest as follows.is there anyway to reduce the endless repetition of code? [coe]

View 1 Replies

ActionScript 2.0 :: [MX2004] Referencing One Movie To Another?

Apr 5, 2005

Main.swf has a button which loads Movie.swf into a movie clip 'contents' (as shown in the tutorials). 'contents' is directly over the button, so when you move your mouse in Movie.swf, it still detects the button in Main.swf.I need to know how to make Movie.swf use Main.swf button so that I can disable it while Movie.swf is open, and enable it when Movie.swf is closed.So far my code is 'blank'.MyButton.enable=false;with 'blank' being main.swf. I tried _root, _parent, etc.., but nothing worked.

View 2 Replies

ActionScript 2.0 :: Use The Envelope Transform In MX2004?

Aug 31, 2005

Is there a way to use the envelope transform through actionscript in MX2004?

View 1 Replies

ActionScript 2.0 :: Tweens And OnMotionFinished In MX2004

Feb 15, 2006

I created some code in Flash 8 for a client using MX2004. I used Tween and made a onMotionFinished function. I saved it as a MX2004 file, but when he tries to compile it he gets.[code]

View 2 Replies







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