ActionScript 3.0 :: StarDrag Not Working On MovieClip With Text?

Sep 12, 2009

In the first class I add a textField tf to a movieClip mc using mc.addChild(tf)
 
In my second class: I create in an instance of mc and I see that it comes with its appropriate text
 
I register event listener mc.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
 
In onMouseDowm function i call event.target.startDrag();  and I get this error
 
ReferenceError: Error #1069: Property startDrag not found on flash.text.TextField and there is no default value.  at SecondClass/onMouseDown()
 
I think there is something like conflict related to the textField of my movieClip mc.
 
When I remove mc.addchild(tf) in the first class, the method starDrag() works well (//mc.addchild(tf))
 
How to resolve this issue, I need the textField with its text on my mc

View 5 Replies


Similar Posts:


Flash8 StarDrag But Only Sideways?

May 6, 2010

have a movieclip with this script

Code:
onClipEvent (load) {
startDrag("/cursor", true);

[code].....

View 1 Replies

AS3 - Having Buttons In A Movieclip Not Working

Oct 22, 2010

I've created a movieclip of a trashcan, which falls over and 6 items fall out of it. I want each of these items to become a button, which will jump to a different point on the timeline.

The movieclip is all working fine, and the buttons appear to be fine. The problem is when I publish the flash, the movieclip resets each time I hover over one of the buttons, so i get an endless loop of this trashcan falling over and the items falling out.

View 1 Replies

ActionScript 1/2 :: Drag A Text Movieclip Onto A Picture Of An Object Movieclip

Mar 26, 2010

I Have the drag and drop working where you drag a text movieclip onto a picture of an object movieclip but having some problems. I know its something to do with the hitTest function but when i drop the word "cow" onto the picture of a dog it actually says this is correct by displaying the word cow above the picture of the dog when instead it shouldnt allow me to drop the text onto the picture which doesnt match.

Basically i need to know how to seperate the drag hitTest function for the DogPic/DogText so that it has its own function to detect a hit. At the moment you can see in the below code I have 1 hittest fucntion detecting both collisions when they need seperate functions I tried making a seperate function for each but it didnt work

[Code]...

View 4 Replies

ActionScript 2.0 :: CS3 On (release) Not Working In Movieclip?

Jul 15, 2009

I've made 2 swf's. One is navigation with a movieclip named "connn" where another swf of content being loaded into it. The second swf is the content consists of a scrollable bar of thumbnails at the bottom, loading particular content on the stage. For the contents swf, I've this script on each of the thumbnail

PHP Code:

on(release){
_root.gotoAndPlay("framename");
}

which framename is marked on the top level of the flash, with a movie clip of a couple of images swaping. And this work perfectly. [URL]

PHP Code:

loadMovie("services_web.swf",this.connn);

which load the content into the movie clip named "connn". It got no problem loading the swf in but I discover that after it is loaded, the thumbnail script of the content failed to work. (please see: http://mr-otto.com/wd/services.html under WEB/INTERACTIVE > websites)

I guess that is the problem of the _root. thing and perhaps changing this I can have it work as perfect as it can be even being called in another swf.

View 2 Replies

ActionScript 2.0 :: CS4 Code Not Working In Movieclip?

Nov 22, 2009

I can place the following code on a movieclip:

PHP Code:

onClipEvent(load) {
gravity = 0.2;
yspeed = 0;

[code]....

And it'll work fine, however if I place it like this on a frame in the movieclip:

PHP Code:

this.onLoad = function() {
gravity = 0.2;
yspeed = 0;

[code]....

It doesn't work

View 6 Replies

ActionScript 3.0 :: Alpha Not Working On MovieClip

May 28, 2009

I created a symbol (Movie Clip) for my library, and I can manipulate all of its properties except for one—alpha. Here is a sample of the code:
 
var range:Range = new Range();  // Range is the symbol in my library, and has been exported for ActionScript
range.alpha = .1; // Doesn't seem to work as the symbol is still at 100% opacity.
_buffer.draw(range, range.transform.matrix); // This is where I draw the symbol to the buffer
 
Everything draws fine, but it is as if the alpha property is not working.
 
P.S. - If anyone knows, should I use a Graphic for my symbol instead of a Movie Clip if I only have one frame?

View 7 Replies

ActionScript 1/2 :: Subclassing MovieClip Not Working

Oct 22, 2009

I'd like to get more of the actionscript into class files and off the various time lines. The problem is I can't make it work. I have a class file called dezynworks.aegis.TextPanel Container.I have a MovieClip in my library called TextScrollWinow. Linkage for TextScroll Window: Identifier, TextScrollWindow; class: dezynworks.aegis.TextPanelContainer. Now I read on a web site that dragging the clip to the stage would retain the class association. That is news to me. I thought you had to use attach. Regardless, neither way seems to work.[code]The attach works. The clips appear on the stage, but the class is gone. dummy.init() (a method of the TextPanelContainer class) is never called and the instanceof statement returns false. There are no compiler errors. There are no runtime errors. I've set up test cases in a new Flash file and it all works like I expect.I've tried deliberately gumming up the class name and introducing syntax errors into the class file. It seems Flash is finding the file okay. Something must be failing silently, but I have no clue what and I'm out of ideas.

View 6 Replies

ActionScript 3.0 :: Swf Inside Movieclip Not Working?

Apr 7, 2010

I have four movieclip buttons inside a swf file. (External swf) Different layers.I need to access those buttons separately.

View 6 Replies

ActionScript 3.0 :: Movieclip Stop() Isn't Working?

Jan 9, 2010

I've created a class and then in my library I linkaged my movieclip to the class..Inside the movieclip there are some actions in the frame like gotoAndStop . but it seems they are all ignored.

View 2 Replies

ActionScript 3.0 :: Button In A Movieclip Not Working?

Jul 16, 2010

i have 2 movieclips, 1 with buttons and the other with the action.when i click the button nothing happens, why ????

menufilm = the movieclip with the buttons
band = the movieclip with the action
menufilm.contact.addEventListener(MouseEvent.CLICK , contact);[code]...

View 7 Replies

ActionScript 3.0 :: Having Buttons In A Movieclip Not Working

Oct 22, 2010

I've created a movieclip of a trashcan, which falls over and 6 items fall out of it. I want each of these items to become a button, which will jump to a different point on the timeline.

The movieclip is all working fine, and the buttons appear to be fine. The problem is when I publish the flash, the movieclip resets each time I hover over one of the buttons, so i get an endless loop of this trashcan falling over and the items falling out.

View 0 Replies

ActionScript 2.0 :: OnPress On Movieclip Not Working?

Jan 23, 2011

I have created a simple grid on my canvas.First I defined an empty movieclip (wrapper) for my grid, then I draw lines onto it to make the grid.Now, I want to click on the grid and get the x/y of where I clicked so I can determine where in the grid i am. But my trace in the onPress event does not show.I'm under the impression that my mcGrid has a 0x0 width and height. When I trace the mcGrid._width in the bottom it outputs "0" so maybe that's why it is not working? Here is my code:

ActionScript Code:
_root.createEmptyMovieClip("mcGrid", 1);
for (var i=0; i<12; i++) {
var clipName = "mcHorizontal_"+i;

[code]....

View 0 Replies

ActionScript 2.0 :: Movieclip Containing Buttons Not Working?

May 12, 2005

i'v created two buttons, Start and Stop, that I've have put into a movieclip. I've done so beacause I only want the user so see one button at a time. (I've managed to make it work with 2 buttons, but I'd like to know why it doesn't work with a movieclip and 2 buttons)
So when the user clicks the "Start" button the sound starts playing and the movieclip is set to frame 2 where the stop button is. So far so good, but when I'm trying to click the "Stop" button nothing happens. Here's the AS:

PHP Code:

stop();
current_mp3 = "audio.mp3";
function primeSound() {
mySound = new Sound();

[code]....

View 7 Replies

ActionScript 2.0 :: Loading MovieClip With XML, Not Working?

Nov 20, 2005

i have a movie clip with an xml menu that i want to load into another movie clip. if i test the scene that contains just the xml menu works fine, but if i test the scene with that contains the movie clip that has the xml menu in it, it dosen't load.this is probably not how you us xml in movie clips but i couldn't find anything on this.

View 4 Replies

ActionScript 2.0 :: CreateTextField Twice On One Movieclip Not Working?

Dec 17, 2006

I have a movieclip that I'm trying to attach two textfields to. Here's my current code:

Code:
_root.createEmptyMovieClip("showGrowthOver1",_root.getNextHighestDepth());
showGrowthOver1._x = 10;

[code]........

View 3 Replies

ActionScript 2.0 :: Why A GetURL Isn't Working On A Movieclip

Mar 17, 2008

why a getURL isn't working on a movieclip? The exact same code works fine when on a normal button but not on a MovieClip. Both were on the top timeline and were not embedded within anything. Actionscripting 1 in Flash CS3.

Code:
on (release) {
getURL(clickTag, "_blank");
}

View 1 Replies

ActionScript 3.0 :: Button Under Movieclip Not Working

Nov 23, 2009

In AS2 you could put a button under a movieclip and it would still work so you had to put a disabled button above it to stop it working. It seems that in AS3, a movie clip will disable button rollovers underneath it but I need it work!I've done a very basic test to make sure my movie clip isn't set to buttonMode=true or anything like that but it still happens.

View 1 Replies

ActionScript 2.0 :: GetURL Not Working In A Movieclip?

Feb 8, 2010

Ok so my swf on my homepage is calling in the main.swf which then has movieclips and coded like this on the Actions layer which I made

button1.onRelease = function (){
button1.getURL("http://scholarscanada.com/wordpress/education/programs/reading-readiness/");
}

Here is the site so you guys can see, I believe it has to be something with calling the main.swf into the movieclip because I've never encountered this issue before...

[URL]

If you click on the LEARN MORE for the first image it doesnt go to the page which I ask it for.

View 2 Replies

IDE :: CS5 Working With Multiple Instances Of A Movieclip?

Jan 17, 2011

I am working on a project which looks like a crossword puzzle. When you mouse over on the white boxes they will light up. When you mouse over the letters they will have 3d rotations and when you rollover only some specific letters, they will flip some specific boxes.

Right now what happens is, when you mouse over the boxes with letters on them, the letters will rotate but the box will not light up. This is because I have created the box movieclip, with the invisible button inside it, and then just duplicated it in my scene to create a tile. But the invisible button for the letters are on the scene,so it's kinda overriding it.when I tried having the buttons on the scene rather than inside the movie clip, what happened is when you roll over one of the boxes, all of them will animate.

View 1 Replies

ActionScript 2.0 :: Movieclip Containing Buttons -not Working?

May 12, 2005

I'm trying to do a really simple mp3-player for a website and I've stumbled on a small problem.I'v created two buttons, Start and Stop, that I've have put into a movieclip. I've done so beacause I only want the user so see one button at a time. (I've managed to make it work with 2 buttons, but I'd like to know why it doesn't work with a movieclip and 2 buttons)So when the user clicks the "Start" button the sound starts playing and the movieclip is set to frame 2 where the stop button is. So far so good, but when I'm trying to click the "Stop" button nothing happens. Here's the AS:

PHP Code:
stop();
current_mp3 "audio.mp3";

[code].....

View 7 Replies

ActionScript 3.0 :: Show MovieClip With Keypress Not Working

Mar 3, 2010

I am trying to make an interactive presentation, where you can push down on different keys and show different layers in my image. [URL]. If you open this .swf and press the "Q,W,E,R,T" keys you can see what I mean. It was working fine with the layers associated with the "Q W E" keys, but once I started adding more, I cannot press and reveal more than 3 layers at once (try pressing different combinations of three keys at once and you should see that not all of the layers appear, but each key works individually).

Here is my AS3:
Code:
import caurina.transitions.*;
mc_aerial.alpha = 0;
mc_01.alpha = 0;
mc_02.alpha = 0;
mc_03.alpha = 0;
mc_04.alpha = 0;
stage.addEventListener(KeyboardEvent.KEY_DOWN, mc_aerial_KeyDown);
function mc_aerial_KeyDown (e:KeyboardEvent):void{
[Code] .....

View 2 Replies

ActionScript 3.0 :: AddEventListeners Not Working After Removing MovieClip

Feb 16, 2011

I have created a simple game which is started by a start button in a Movieclip that opens at the beginning using the code :
var splashscreen:MovieClip = new Splash();
splashscreen.x = 0;splashscreen.y = 0;
addChild(splashscreen);

The splashscreen movieClip has its own code :
Play_btn.addEventListener(MouseEvent.CLICK,playgame);
function playgame(e:Event):void{parent.removeChild(this); Play_btn.removeEventListener(MouseEvent.CLICK,playgame)
}

When I run the game the splashscreen does load and then disappears when the Play button is pressed but none of the eventlisteners seem to work. The background moves, the enemy ships fire but I can't move the ship or fire using the keyboard. The game works perfectly well when I don't use the splashscreen at the start.

View 6 Replies

ActionScript 3.0 :: Remove Child Of A MovieClip But Still Working?

Feb 26, 2011

have made interactive quiz which have 12 movieclips each movieclip contains loop animation and sound in it(on Timeline), i export them as classes, clip1, clip2, clip3....etc, now i m doing when user reach on question 1, then clip1. comes on screen and playes that movieclip and after clickicking on right answer clip needs to remove from stage, but it is happening that clip is gone unvisible but is sound is till working

var hint:clip1=new clip1()
addChild(hint)
when user choose right answer

[code]....

View 3 Replies

Professional :: Simple Movieclip Click To URL Is NOT Working?

Jul 14, 2011

I've tried over 4 tutorials to make my movieclip link to a URL. It's just not working for some reason...
 
Here is my code.
  
ondemand.addEventListener(MouseEvent.CLICK,goThere);
function goThere(e:MouseEvent){
var request:URLRequest = new URLRequest("www.money.net");

[Code].... 
 
This should work!! There are no compilation errors...
 
No mouse cursor change on hover... just like nothing is there.

View 7 Replies

ActionScript 3.0 :: Movieclip Rollovers Not Working On Different Frames?

Aug 9, 2011

I'm creating an interactive that consists of 3 maps, each on its own tab. On each map, there are various circles representing data for a particular city.I want the circles to display a pop-up containing text when you roll over each one. Since I don't want the plain old buttons, I'm using 2-frame movie-clips, where the second frame represents the mouse-over state and a text box fades in as follows:
 
[Code]...
 
This all works fine, and I can get multiple buttons working on the first tab (frame 1) by grouping them all into a movie clip, as follows:
 
[Code]...
 
The problem is when I try to use the same or a similar with a different set of buttons on the second tab (frame 15). I put a similar set of actionscript on frame 15. The buttons seem to accept the buttonMode = true command, but I absolutely cannot get the rollovers to display. I've tried using different function names for the MOUSE_OVER and _OUT events, to no avail. I get no errors and nothing shows up in Output -- it just acts as if there's no rollover to display.Do I need to somehow put all the AS on Frame 1? Is it an issue related to ENTER_FRAME in the rollovers?

View 3 Replies

Flash - Movieclip Color Is Not Working Properly?

Nov 23, 2011

I have 2 frames and in frame 1 the target MC color is being changed to RED. After that i go to frame 2. If i came back to frame 1 the MC doesn't retain the RED color. What i do wrong. Please see the pictures.

http:[url]....

View 1 Replies

ActionScript 3.0 :: Alpha Value Not Working Correctly For MovieClip

Jun 29, 2009

I'm wanting to create a simple red flash effect which entails a red flash suddenly appearing and fading away on screen.

I'm currently doing this by creating a red box as big as the screen and made it a movieclip. I'm then decrementing this movieclips alpha value from 100 to 0 but ofcourse, it's not as simple as that.

It seems that any alpha value greater than 0 makes the object have 100% alpha. So what's going on? How should I do it?

View 2 Replies

ActionScript 3.0 :: Put Flv Movie As A Movieclip Working Like A Background?

Nov 5, 2009

Im trying to use a Flv video effect like a movie clip in As3...

I want this Flv effect to work like my background on my WebSite... i already imported the flv and convert it to a movieclip... but i dont dont the code to make it work like my background always in loop.. and when i enter a certain frame...

View 0 Replies

ActionScript 3.0 :: Movieclip Focus Not Working On If Statement

Jul 7, 2010

I have created menu which has roll over and out animations.What I am trying to achieve is to play the roll over animation when rolling over the menu, but stop the roll out animation IF the focus has been set on a specific movieclip.[cod]I am not sure what I am doing wrong, but if I trace the stage focus inside the if statement nothing happens, but it works if I trace it on else statement(gives null) which means that the if statement is bypassed and the else is played.

View 7 Replies







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