ActionScript 2.0 :: Arg - New Clip Conundrum?

Aug 19, 2004

I've been reading this site for a while now but it's only now that I have a problem that I turn to you guys in the forums for help... stupid unsociable me. I'm new to ActionScript development, and I've been able to figure out pretty much everything on my own so far, but this particular problem really has me stumped. I'm totally at my wits end here, so maybe one of you smarty folks can help me out.

The following code is a stripped down version of what I'm trying to do with a game-type application. Basically I create some new movie clips, put them in an array, give them each unique attributes, and then refer to those attributes later in another function. When I do this, the attributes for ALL clips have all been set to the attributes of the last clip created! Which in this case means that all the moving elements have the same velocity, when really I want them each to have different ones.

[Code]...

View 2 Replies


Similar Posts:


CS3 Variable To Line Colour Conundrum?

Mar 8, 2011

He doesn't do much, just an integer what adopts a value between 0-100. I also have a line drawing function. He does lots of things and draws lots of pretty lines. All in just one colour mind.I'd like to be able to change that colour based upon the value of 'n', but I don't know how to convert this integer into the 0x000000-0xFFFFFF format used by linestyle. I can scale and convert 0-100 into a hex string but I'm stumped at how to prepend 0x to the string and how to use this within linestyle...Here's what I have so far....

//rgb = n*16777215/100;
//hex = rgb.toString(16);
//mcImage.lineStyle(1, 0x000000, 100, true, "normal", "none");

[code].....

View 2 Replies

ActionScript 2.0 :: JavaScript - XML - Conundrum - Don't Load A URL

Sep 18, 2009

I have a flash menu that reads from an XML file and creates a graphic menu based on the images and URLs that are specified in the XML file. Problem is, I don't want to load a URL. I need to do something like this:

onclick="HideDIV('one');
HideDIV('two');
HideDIV('three');
HideDIV('four');
FadeinDIV('five')"

I have the javascript and CSS on the page setup to do that. What I don't know how to do is:

[Code]....

View 0 Replies

ActionScript 2.0 :: Disabling Buttons Conundrum?

Dec 20, 2004

I'm building a site at the mo with pop up that can be activated and covers the main page with a new info page. This popup can be activated at anytime and will cover whatever is in the main page. Trouble is, buttons are still active from the main page when popup is displayed and given the site design the only way to stop this problem is disabling the buttons below. What is a good way of doing this? I was hoping flash keeps some sort of array of mc content and the buttons could be identifed this way but somehow i don't think this is likely!

View 1 Replies

ActionScript 2.0 :: Dynamic Text Conundrum ?

Jan 20, 2008

I have a dynamic text field with the VAR name quotemaker.I am trying to load the right value into it by doing this

quotemaker = [quote + i];

where quote1, quote2, etc are variables with string values, however all that is returned is "quote1", not the value i set for quote1.

View 2 Replies

ActionScript 2.0 :: Disabling The Buttons Conundrum?

Dec 20, 2004

I'm building a site at the mo with pop up that can be activated and covers the main page with a new info page. This popup can be activated at anytime and will cover whatever is in the main page. Trouble is, buttons are still active from the main page when popup is displayed and given the site design the only way to stop this problem is disabling the buttons below.

View 1 Replies

ActionScript 3.0 :: Top-level Scope From Static Scope Conundrum

Apr 2, 2010

I have a Debug class I've written, and I'd like to include a static trace() method in there, unfortunately I have no idea how to then access global / top level trace as effectively I've blocked it with the local static scope.[code]

View 4 Replies

ActionScript 2.0 :: Targetting A Movie Clip - Loaded Into A Container Clip From Main Timeline

Nov 24, 2005

I am targeting a a movie clip. The problem is that all the syntax I have found for targetting clips looks like this: _root.sample_mc.sample2.mc. etc. The problem is, my target clip is in an swf that I've loaded into a container clip from my main timeline. So, essentially, I have a home.swf that loads menu.swf into a container called 'location'. In menu.swf, I have an MC called center, which contains the MC I am targetting called 'target'.

View 2 Replies

ActionScript 2.0 :: Loop Through A Movie Clip And Assign A Function To Each Of The Clip's Child Movieclips?

Jan 3, 2007

I want to loop through a movie clip and assign a function to each of the clip's child movieclips. when i do a for...in loop and then do a typeof() trace I get "string" and obviously it won't let me assign lets say 'onRollOver' functions to the children.

View 6 Replies

IDE :: Setup An Expandable Clip That Resizes With The Browser Window With A Main Clip Centered Over The Top?

Mar 11, 2009

I'm trying to set up an expandable clip that resizes with the browser window with a main clip centered over the top. I know it has something to do with a stageListener.

View 1 Replies

ActionScript 3.0 :: Preloader Resuming - Load The Next Clip While The Current Clip Is Playing

Feb 13, 2009

I created a swf which loads multiple external swfs to 100% before playing. Which works fine. If I stop a clip while it's loading, I call loader.close() and I'm able to resume from where I left off at a later time. The problem I'm having is when I added the functionality to load the next clip while the current clip is playing. To be clear, I'll refer to the normal preloader as preloader, and the preloader which loads the next clip as pre-preloader. If the pre-preloader loads to 100%, everything is good. The next clip will play immediately without having to wait. If, however, the pre-preloader for the next clip is stopped at any point before 100%, the preloader will start loading at 0%.

With that being said, If I go back to the previous clip (which was previously already playing), the pre-preloader will pick back up where it left off, then if I go forward again, the preloader will pick up where IT left off.

[Code]...

View 3 Replies

Get A Movie Clip To Automatically Load Up Another External Clip After Playing An Embedded Flv?

May 24, 2010

I'm trying to get a movie clip to automatically load up another external clip, after playing an embedded flv.

This is what I've tried so far:

var holdFrame = setInterval( holdFrame, 5000);
gotoAndPlay(
_root.mc_holder.loadMovie("swf/library.swf"));
clearInterval (holdFrame);

Although it throws no errors, the setInterval is ignored and it just loads direct into the next mc clip.

View 9 Replies

ActionScript 3.0 :: Movie Clip Arrangement - Rotate One Clip Around Using An ENTER_FRAME Listener

Jan 31, 2009

So I have an array of eight mcs arranged in a circle around a larger mc and I want to make it so the user can click and drag any one of the mcs in the array and it will cause them all to rotate around the larger center mc. I can rotate one clip around using an ENTER_FRAME listener but since I want them all to rotate and not until the user clicks and drags.

View 0 Replies

ActionScript 2.0 :: Mouse Is On The Leaf Movie Clip The Movies Clip Disappear?

May 6, 2010

i have a problem with hitTest, i want when my mouse is on the leaf movie clip the movies clip disappear. or away any where

[Code]...

View 0 Replies

ActionScript 3.0 :: Symbol Movie Clip Plays In Loop Despite Stop() In Clip?

Jun 14, 2010

I am importing a movie clip as a symbol from a SWF using Embed to a AS3 program and, after attaching the movie clip to the stage, the movie clip keeps repeating. Before you ask I have indeed creating a script layer and put a "stop()" on the last frame. In fact the swf containing the symbol works perfectly fine when executed on its own or in Flashdevelop (my choosen IDE). Its only when imported does the clip keep repeating.Here is the code:

Code:
package {
import flash.display.*;

[code]......

View 2 Replies

ActionScript 3.0 :: MC To Loop That Is Inside A MC - Play Head Of A Movie Clip To Return To A Certain Frame Of That Clip

Nov 2, 2010

I would like play head of a movie clip to return to a certain frame of that clip so a MC inside it would loop. I now have: stop(); as the action.

View 2 Replies

ActionScript 2.0 :: Error : Frame=1: Line 5: Clip Events Are Permitted Only For Movie Clip Instances?

Jun 8, 2002

i've tried placing the code in the actions pnel of the mc; on the mc at the main time line and in various other unspeakable places... but i always get the same error warning me that this code can only be used in movieclip instances and that my stupidity levels are reaching dangerous levels. (error: 'Symbol=stage_mc, Layer=actions, Frame=1: Line 5: Clip events are permitted only for movie clip instances

onClipEvent(enterFrame){'

i fear somebody will reply to this with:'the code goes on the movieclip instance'...at which point i will take up a career in knitting (i knew i shouldn't have given up the course in the first place)

View 12 Replies

ActionScript 2.0 :: Load A Random Movie Clip From The Library To An Empty Clip On The Stage Called (bg_graphics)?

Oct 20, 2004

I want to load a random movie clip from the library to an empty clip on the stage called (bg_graphics). the clips in the library are called (green, blue, yellow).

View 5 Replies

Actionscript 3 :: Accessing A Clip Inside Another Clip In A Loaded SWF-File?

Mar 1, 2010

I'm writing a card game in AS3. The artist I'm working with has produced (in Flash CS4) a single swf-file containing all the card graphics and animations. The structure of the fla working file looks something like this:

- Scene
- CardGraphics (Movie Clip)
- CardFront
- CardBack
- CardValueImage (Movie Clip)

In the program I create 52 instances of my Card class, each having a MovieClip instance created from the loaded swf. The idea is to set the frame of the CardValueImage MovieClip to correspond to the Card instance's suit and rank member variables. However, I can't figure out how I access CardValueImage and call gotoAndStop (or whatever method I will need to call).

[Code]...

View 2 Replies

ActionScript 2.0 :: Dynamic Clip Update Position Of Other Clip Required?

Feb 6, 2009

Been working on this for almost 2 weeks and I am completely stuck. I've got a main dynamic movie clip that pulls in images from an xml file. It's x position moves depending on the mouse position. Obviously its width is dependent on how many images are pulled in.

I have an indicator movie clip that runs along a 600 pixel line in the opposite direction to the main clip that gives an indication of how long the main clip is.

I know the length of the indicator's line so its x position needs to be updated in relation to the x position of the main clip. 1% of indicator's maximum movement in 6 pixels so it needs to move 6 pixels in relation to 1% of main movie clips maximum distance.

[Code]...

View 0 Replies

ActionScript 3.0 :: Get The Clip To Only Activate After The Mouse Is On The Specific Clip For More Than A Few Seconds?

Jun 23, 2010

I have multiple movie clips on my piece. Each clip is of an an image, and when the mouse curser goes over the image, the movie clip begins (making it bigger).If you run your mouse curser all over the screen, they all activate at once.I want the clip to only activate after the mouse is on the specific clip for more than a few seconds. I know I need a timer. How do I do this? What is the code and where does it go in mine (below)?

Frame 1:

stop();
image10.addEventListener(MouseEvent.MOUSE_OVER, image10overFunc);
function image10overFunc(e:MouseEvent)
{

[code]....

View 2 Replies

Actionscript 3.0 :: Loop A .flv Clip Located In An Array When That Clip Has Finished

Apr 20, 2009

I am trying to loop a .flv clip located in an array when that clip has finished. Do I add an EventListener.complete then play it again? Ummmm. This seems pretty pedestrian.

View 2 Replies

ActionScript 2.0 :: Clip Events Are Permitted Only For Movie Clip Instances?

Sep 8, 2005

clip events are permitted only for movie clip instances onClipEvent(enterFrame) {

i keep getting this output message --- can't figure out what it means.

View 1 Replies

ActionScript 2.0 :: Dynamic Movieclip Naming (clip Inside The Clip)

Oct 19, 2006

i've got 48 small movieclips named "1clip", "2clip", etc. all the way up to "48clip." I want to do something with them all and use a loop to affect them all the same way.

[Code]...

but that doesn't seem to work. are variables and instance names interchangeable? my lClip var traces out of course, but the lClip.imagHolder.loadMovie never happens (clip inside the clip).

View 1 Replies

ActionScript 2.0 :: Making A Clip/button Close Parent Clip?

May 10, 2007

Can we make something, ie a close button, that onRelease will close the parent Movieclip, regardless of the name of that parent? I'm going to need a lot of close buttons, and I don't like the idea of coding each to close the relevant MC. I've done a bit of experimenting, but not had any luck yet.

View 2 Replies

ActionScript 3.0 :: Checking And Removing Clip (inside Parent Clip)

Apr 14, 2010

I'm having problems with something somewhat simple. We're going to a trade show and needed a video that would randomly load a SWF clip on one scene, then I have the timeline move to another after a delay and then go to the next part to load an image, then I have it restart and do it again, for a never-ending looping video at our booth.

I'm running into an issue though, when it loops and plays the SWF for the 2nd time, the old content still remains and the new content plays over the previous one. I figured the issue was I needed to remove the previous clip before loading a new one. I found some code that I thought SHOULD work but can't seem to get it right.

[Code]...

View 1 Replies

ActionScript 3.0 :: Flash Mouse Drag On One Clip To Move Another Clip

May 13, 2011

I trying to create an animation that will demonstrate the basics of steering a sailboat. There will be a movieclip top view of the boat hull. Another movie clip will be the boat tiller. One end of the the tiller will have a grip that the user will drag with the mouse. Dragging the grip will turn the tiller turn right or left on its axis. When the user drags the tiller to the left, the boat hull turns to the right, and vice versa. I can get the tiller to rotate in a circle around its axis. However, making the tiller turn no more than 15 to 20 degrees left or right, and creating an event listener that will test when the tiller is turned left or right, then turn the hull the opposite direction as a sailboat would react.

View 2 Replies

ActionScript 2.0 :: Scrollbar For A Movie Clip - Move The Clip Within A Certain Ratio

Nov 22, 2004

how I can create a working scrollbar for a movie clip? I've managed to get as far as inserting two buttons that allow you to move the movie clip up and down, it's just getting the scrollbar to be able to move the clip within a certain ratio that I'm finding hard to do.

View 4 Replies

ActionScript 2.0 :: Target The Selected PicFrame Clip And Have It Call The Function ResizeFrame To Change The Width Of Border Clip?

Feb 19, 2007

i have a loop that attaches clips of the picFrame to a holder clip based on the number of childNodes. how do i target the selected picFrame clip and have it call the function resizeFrame to change the width of just the border clip inside the picFrame the onRelease was chosen? i realize under the resize function i have it targeting the holder clip's width. i just don't know what else to do and i've tried many else's.

[Code]....

View 3 Replies

ActionScript 2.0 :: Swap Depths - If I Click On The Space Between The Nested Clips In The Top Clip It Actually Is Hitting The Buttons(movieclips) On The Other Clip Under It?

Apr 11, 2007

I have two main clips with clickable clicks within each. I am using swapDepths on the two main clips in a tab navagation fashion. The problem is that if I click on the space between the nested clips in the top clip it actually is hitting the buttons(movieclips) on the other clip under it. Any suggestions?

View 1 Replies







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