[F8] AS Not Working On MovieClip - HELP
Hi I am attaching MCs with attachMovie, but one particular MC has problems with some actionscript. removeMovieClip and GotoAndPlay functions does not work with it. Anyone know whats wrong? help!
FlashKit > Flash Help > Flash ActionScript
Posted on: 07-26-2006, 12:48 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
MovieClip.onLoad - Not Working?
Hi,
I want something to happen staright after my movie clip is loaded.
For some reason when I use the following in the timeline of the clip it doesnt work
Code:
this.onLoad = function(){
trace("Yes Iam Loaded");
}
Im sure Ive had this working many times before but for the life of me I dont know why it doesnt work now. Any ideas?
Movieclip Structure Not Working
Hello,
Here's what I'm trying to do.
From the main scene:
Click navigation button > takes you to Movieclip one.
Movieclip one begins playing a minute long flash animation that should be immediately followed by a videoclip (AVI). Where should I insert tyhe AVI?
1.On the same layer as the flash animation (which is also a one layer movieclip)
2.on a fresh layer above it the frame after the animation stops
3.create a new scene with the video in it and write a "goto" actionscript pointing to it.
(note - i've tried doing this and it doesn't go to the scene I tell it to for some reason, maybe I'm doing it wrong or leaving something out.
Can someone help me because I'm really stumped and the boss is getting antsy!
Jay.
ps - I cannot attach the file because it is HUGE!
Working With Attach MovieClip
I have a mc(subNav) that I want to attach. I have been able to do this with a for loop and attachMovie, and then place each to a certain point below the previous. I am having problems assing the text to the textbox in each and assign an onClipEvent to each.
Form Not Working When Within Movieclip
I have a contact from on my site that loads from the main .swf
on (release) {
_root.contents.loadMovie("form.swf");
but it doesnt work, not all the buttons and text r there how come this happens? and how can i fix it?
Movieclip.gotoAndPlay Not Working
i've been trying to make this work for the past several days, and nothing...
i have a button with an if/else statement block... if the play head is at frame 40 currently, then the play should be directed to the "Red" frame label within the movie clip called "MC", if not then the playhead should be directed to "Purple" frame label within "MC"...
i've tried writing so many different ways, including _parent, _root, etc. but it's just not registering at all...
Code:
on (release) {
if (_currentframe != 40) {
_root.MC.gotoAndPlay("Purple");
} else {
_root.MC.gotoAndPlay("Red");
}
}
also, Here is a small FLA file which shows you what i'm trying to do... i'm assuming that maybe i'm forgetting something like naming an instance, eventhough i've checked and rechecked...
any help would be appreciated.
[CS3] Actionscript Not Working When I Put It Into A Movieclip?
Please help if you can. Thanks! I'm pretty new at this so here goes. A section of my Actionscript is not working when I put it inside of a movieclip. In the movieclip it calls in images of icons from an xml doc. and when you mouseover the icons they are supposed to scroll the icons left or right depending on where the mouse is. Everything works fine when it is outside of the movieclip but once I put it into a movieclip the icons don't scroll anymore. I need it to be in a movieclip so hopefully someone will be able to help me find out why the scroll section of my Actionscript keeps breaking. Here is the code I am using for the scroll:
Code:
controller2_mc.onEnterFrame = function() {
if ((this._parent.thumbnails_mc._x - this._xmouse / 30) > (-this._parent.thumbnails_mc._width + Stage.width) && (this._parent.thumbnails_mc._x - this._xmouse / 30) < 0) {
this._parent.thumbnails_mc._x -= this._xmouse / 30;
}
};
Thank you all!
Button Within A Movieclip Not Working
Hi, i have created a movieclip that has a button within it. I want the button to go to the next frame in the MAIN timeline.
I have tried gotoAndPlay Scene 2 (217) and it only plays the movieclip over again. If you can help me it would be a big help.
thanks
MovieClip Button Not Always Working
Hi,
We are facing an annoying bug in our project. It is like a presentation application and after you finish reading a page you must go to the next one by clicking the "NEXT" button (MovieClip Button). Most part of the time it works, but SOME TIMES the small hand icon turns into an arrows when keeping the mouse button pressed. The big problem is that we weren't able to find a pattern related to that problem, there is no special page where it fails or not.
The code into the "NEXT" button is really straightForward:
Code:
on(release){
this.gotoAndStop("unselected");
_root.controller.dispatch("release", _parent._name, this._name);
}
When that "dam" arrow appears the release event is not fired.
That is really annoying and we have spent hours trying to find a solution, but didn't get through!
Could anybody help, please?
Cheers
Button Within Movieclip Not Working
I think I have tried everything to get a button within amovie clip to work, and I am stumped. Can someone please look at this code and tell me how you can get the purple rectange in the last frame to go to an URL?
Here is the flash file:
button.zip
Any help would be much appreciated.
MovieClip.prototype Not Working
Hey people - I am building a stand alone app so it's being exported as version 7 so I can use css to format my xml, but now my prototype function is not working.
this is the one i am using:
Code:
MovieClip.prototype.floatTo = function(speed,endx,endy,isY) {
this.speed = "."+speed; this.endx = endx; this.endy = endy;
this.dist_x = Math.round(endx - this._x);
this.dist_y = Math.round(endy - this._y);
this.vel_x = this.dist_x*this.speed;
this.vel_y = this.dist_y*this.speed;
this._x += Math.round(this.vel_x);
this._y += Math.round(this.vel_y);
if(isY)return Math.round(this.vel_y);
else return Math.round(this.vel_x);
}
Any idea what the deal is. Do I have to do something different with the prototype when it's exported as V7. I am still using AS 1.0.
Anyone know?
Thanks
Movieclip.gotoAndPlay() Isn't Working
Hiya, I'm hoping someone can help me, as I am unable to see a problem in my coding.
It's a simple command, creating a load bar for a child swf loaded into a movieclip within a parent swf. The load bar works fine, but when the swf is fully loaded i want to tell it to go to and play a specific frame. I am using the code mov_site.gotoAndPlay("start") whereby mov_site is the empty movie clip and start is the frame I want it to play.
However, for some peculiar reason it's going to the frame label "start" but is acting as if there's a stop command on this frame label...it simply won't play any more of the loaded movie. I can definitely say that there quite clearly isn't a stop command on this frame, i have used this coding before without issue, and the issue is now really starting to bug me...something so simple that I can't see an issue with. If i remove the line mov_site.gotoAndPlay("start"); then it loads the movie fine and it simply plays from the beginning.
My code for the load bar is below...can anyone help?
Thanks very much!
stop();
mov_site.loadMovie("cliffhousecontent.swf");
img_mask.onEnterFrame = function() {
var l = mov_site.getBytesLoaded();
var t = mov_site.getBytesTotal();
var percent = Math.round(l/t*100);
img_mask._y = 450-(percent*3);
if (l==t){
mov_site.gotoAndPlay("start");
}
Duplicate Movieclip Not Working
i have create a function for duplicate movieclip but when i call for the function it not working. Is there anyone who can help me to trace wats going on wif my script? i have been trying to figure out but still cant find out wat went wrong.
Below is my code:
Attach Code
wire.onPress = function ()
{
this.createEmptyMovieClip("mc1", 90); //Create a newMovieClip with variable name "mc1""
mc1 = attachMovie("idwire", "wire", 91); //store the Movie into mc1 by attaching
mc1._x = 130.5 ;
mc1._y = 33.8; //setting the corrdinates for x and y axis
dragging(mc1); //calling the dragging function
duplicate(mc1);
}
function duplicate()
{
amount = 50;
while(amount>0)
{
duplicateMovieClip (this, "mc"+i, i);
i++;
amount--;
}
}
Instantiating A Movieclip Not Working?
I've been out of the Flash game for a while and I'm just learning AS 3.0 so work with me here. I have an existing movieclip in the library that I'm simply adding to the stage like so:
var mc1:mcname = new mcname();
learn1.x = 583;
learn1.y = 144;
addChild(mc1);
However this doesn't work in my existing project. I made a new flash file to test and do this it works fine, but it wouldn't in my project. I did some troubleshooting and found that no matter what layer I put this AS on it wouldn't show up unless I deleted any and all my layers that use masks?? What does that have to do with anything?
Button In Movieclip Not Working
I have a button within a movie clip that I want to use to move to the next scene on the main timeline but I can't get it to work. The stop all sounds works, but the goto does not.
ActionScript Code:
on (release) { stopAllSounds(); _root.gotoAndPlay("Scene 4", 1);}
Any suggestions? I trawled through this board's archives and from what i found, it should work.
Incidentally, what is the best, cleanest and simplest way to stop a movie clip playing at a given frame? Can you simply use:
_root.MovieClip.stop ();
Cheers
CSS Tutorial - Not Working In A Movieclip
Hello,
I followed the steps in the CSS Tutorial and it worked fine to call and display external text with CSS. However, as soon as the script and dynamic text box was placed into a graphic symbol or a movie clip it did not show up.
Any thoughts?
----
I used a Dynamic text box as explained in the tutorial (with Instance name "Output") and used the following actionscript (in the layer above):
var format = new TextField.StyleSheet();
var path = "http://www.kirupa.com/developer/mx2004/code/flash.css";
format.load(path);
format.onLoad = function(loaded) {
if (loaded) {
output.styleSheet = format;
myLoadVar = new LoadVars ();
myLoadVar.load("kirupa.txt")
myLoadVar.onLoad = function (success){
if (success == true) {
output.variable = "kirupa"
output.htmlText=myLoadVar.kirupa;
}
}
} else {
output.text = "Error loading CSS file!";
}
};
-----
-Foley.
LoadMovie Movieclip Not Working
I have 2 problems:
1. I am using FLASH MX 2004. I have loaded an external movie with the behaviors pannel. This works, but my movie that I loaded into a movie clip holder is not working. All the MC that are in the loaded movie are showing up at once and not complying with the (visibility) action script I have set for them.
2. I want to load this mc onto the main movie at a very specific point. Like to the pixel. Is this possible? What does flash use to pin-point where the movie is loaded into another movie?
thanks!!!
Buttons In Movieclip Not Working
I made a menu that scrolls from left to right which contains all of my buttons for navigation. This menu is a movie clip. My buttons load external swf's into a blank movie clip on the main timeline. The problem is that my buttons don't work when they're in the menu movie clip. They work if I place them on the main time line but then I can't animate my menu... Help!
The code I'm using for my buttons:
on (release) {
loadMovie("bio.swf", "blank");
}
Thanks in advance...
-P.
Movieclip Containing Buttons -not Working
Hi,
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";
function primeSound() {
mySound = new Sound();
mySound.loadSound(current_mp3, true);
}
playing = false;
_root.control_mc.play_btn.onRelease = function() {
primeSound();
_root.control_mc.gotoAndStop(2);
};
_root.control_mc.stop_btn.onRelease = function() {
mySound.stop();
playing = false;
_root.control_mc.gotoAndStop(1);
};
I would be thrilled to learn why this does not work ... kind regards Olki
Loading MovieClip With XML, Not Working
i'm new to the actionscriot xml thing, so i'm not even sure i'm dong this right.
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.
any help would be great.
CreateTextField Twice On One Movieclip Not Working [AS 2.0]
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;
showGrowthOver1._y = 550;
showGrowthOver1.createTextField("label_txt",_root.getNextHighestDepth(),0,0,200,20);
showGrowthOver1.createTextField("input_txt",_root.getNextHighestDepth(),210,0,100,20);
showGrowthOver1.input_txt.type = "input";
showGrowthOver1.input_txt.text = "1";
showGrowthOver1.label_txt.text = "Highlight Growth Greater than 1";
As it is, only the "input_txt" field appears. If I comment out the line that creates the "input_txt" field, then the other one appears. I can't get them both to appear at the same time. Am I not allowed to include two textboxes like this or am I doing something else wrong?
-Mathminded
Button In Movieclip Not Working
I have a button within a movie clip that I want to use to move to the next scene on the main timeline but I can't get it to work. The stop all sounds works, but the goto does not.
ActionScript Code:
on (release) { stopAllSounds(); _root.gotoAndPlay("Scene 4", 1);}
Any suggestions? I trawled through this board's archives and from what i found, it should work.
Incidentally, what is the best, cleanest and simplest way to stop a movie clip playing at a given frame? Can you simply use:
_root.MovieClip.stop ();
Cheers
CSS Tutorial - Not Working In A Movieclip
Hello,
I followed the steps in the CSS Tutorial and it worked fine to call and display external text with CSS. However, as soon as the script and dynamic text box was placed into a graphic symbol or a movie clip it did not show up.
Any thoughts?
----
I used a Dynamic text box as explained in the tutorial (with Instance name "Output") and used the following actionscript (in the layer above):
var format = new TextField.StyleSheet();
var path = "http://www.kirupa.com/developer/mx2004/code/flash.css";
format.load(path);
format.onLoad = function(loaded) {
if (loaded) {
output.styleSheet = format;
myLoadVar = new LoadVars ();
myLoadVar.load("kirupa.txt")
myLoadVar.onLoad = function (success){
if (success == true) {
output.variable = "kirupa"
output.htmlText=myLoadVar.kirupa;
}
}
} else {
output.text = "Error loading CSS file!";
}
};
-----
-Foley.
LoadMovie Movieclip Not Working
I have 2 problems:
1. I am using FLASH MX 2004. I have loaded an external movie with the behaviors pannel. This works, but my movie that I loaded into a movie clip holder is not working. All the MC that are in the loaded movie are showing up at once and not complying with the (visibility) action script I have set for them.
2. I want to load this mc onto the main movie at a very specific point. Like to the pixel. Is this possible? What does flash use to pin-point where the movie is loaded into another movie?
thanks!!!
Movieclip Containing Buttons -not Working
Hi,
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";
function primeSound() {
mySound = new Sound();
mySound.loadSound(current_mp3, true);
}
playing = false;
_root.control_mc.play_btn.onRelease = function() {
primeSound();
_root.control_mc.gotoAndStop(2);
};
_root.control_mc.stop_btn.onRelease = function() {
mySound.stop();
playing = false;
_root.control_mc.gotoAndStop(1);
};
I would be thrilled to learn why this does not work ... kind regards Olki
Alpha Not Working On A Movieclip In Cs3?
Hi guys - this is probably something really obvious but it's got me a bit stumped
I have several movieclips containing a static textfield with text in using a font that I've already embedded for actionscript use (it has a * after it's name). I've motion tweened these to move across the screen, starting at 0 alpha and becoming 100 alpha at the end of the tween (so movement and alpha tween).
The problem is that the alpha doesn't seem to be working. I've replaced the type with a random shape and the alpha works again so it seems to be something to do with the embedding but I'm not sure what.
hope you can help
obie
Actionscript Within Movieclip Not Working
Hey guys!
I've trying to make a swf that contains several movieclips. Loading it is easy but when I load it the actionscript that was coded inside that movieclip stop working (e.g. loadvariables, etc).
I tried to make those movie clips in a separate swf but the result are the same. what can I do!?
[HELP] MovieClip.stopDrag Sometimes Working Sometimes Not
I have a Movieclip, attached with Movieclip script
Code:
on(press) {
this.startDrag();
}
on(release) {
this.stopDrag();
}
The problem is sometimes it is working, but sometimes, when I have released my mouse button, it is still draggable, without holding the mouse button, only when I click again, the mouse drag is stopped.
Platform: Flash MX 2004 Professional
Movieclip.gotoAndPlay(isnt Working)
I made a 2 simple menus for a website in flash. one is called 'menu'. on the other menu (called mainmenu on rollover it is supposed to have the menu called 'menu' gotoAndPlay another frame. But when i put my mouse over the button on the 'mainmenu' nothing happens to the menu called 'menu'. however when i put the code in the first frame of the whole movie it works and the menu called 'menu' will goto the frame that i specify. both menus are separate movie clips. so how come the menu called 'menu' wont goto the frame i want it to goto when i have another movie clip tell it too?
Button's Working Inside A Movieclip?
Is it possible to put a button inside of a movie clip and have the rollover option still available? I'm trying to make a draggable movie clip but i need the buttons to also move with the clip and also be able to be activated. Thanks in advance!
Button Not Working Inside Movieclip
I have a button on my stage that opens a separate movieclip. Inside that movieclip i have a button. When I rollOver that button, then I rollOut the moive that it is contained in closes. Why?
Here is an example of the buton code i am using, not to complecated here:
Code:
stage_btn.onRollOver = function() {
container_mc.gotoAndPlay("over");
};
Buttons Still Working Under Transparent Movieclip...
Hi guys,
I've made somthign where, when a user presses a button, a semi-transparent popup box appears, with new buttons in it. But the buttons under are still clickable.
Could someone please help.
I really need a way to make the mouse only able to press buttons on a certain level.
Thanks.
Movieclip & Array With HitTest, Not Working
Ok, my problem is that I have a grassfield named: "grass1". I put it an array named:"grass" with the index of 0. I want to use the array in a hitTest to make the guy stop. I know how to do the stop functions, but I don't think I am doing the array right. Here is all of my code so far:
Code:
movespeed = 10;
bg = new Array(_root.bg0);
objects = new Array(_root.bg0.grass0, _root.bg0.grass1);//My grass array
_root.guy.onEnterFrame = function() {
if (Key.isDown(37)) {
this._x -= movespeed;
}
if (Key.isDown(39)) {
this._x += movespeed;
}
if (Key.isDown(38)) {
this._y -= movespeed;
}
if (Key.isDown(40)) {
this._y += movespeed;
}
if (grass[0].hitTest(this)) {//This is the hitTest I am having troubles with
this._x -= movespeed;
}
};
Now, how can I get the hitTest to work properly with the array?
Collision Inside Movieclip Not Working
Hi,
I am having a movieclip (mvGround)
Inside mvGround there are 2 movieclips (mvCol1) and (mvCol2)
if (_root.mvGround.mvCol1.hitTest(_root.mvGround.mvCo l2._x, _root.mvGround.mvCol2._y)) {
Trace("Collision")
}
This code is not working
if the two movie clips are at the root this code works
if (_root.mvCol1.hitTest(_root.mvCol2._x, _root.mvCol2._y)) {
Trace("Collision")
}
[F8]Function Not Working With Movieclip Buttons.
OK so my function just eases a movie clip across the stage on rollover. However it will only work when the script is on a actual Button not a Movie Clip.
Here is whats going on.
First Frame (Write the function)
Code:
function moveArrow(Xcoord){
this.onEnterFrame=function(){
arrow._x+=(Xcoord-arrow._x)/2;
}
}
stop();
Script on button (button is actually a movie clip)
Code:
on(rollOver){
this.gotoAndPlay("over");//over effect
moveArrow(180);
}
So that script works fine if the properties of my button are set to "Button" But it will not work if it is a "Moive Clip".
Is there away arrond this. I guess I could build "hit state" buttons and script around them but that would be a pain.
Any help would be great?
Scrollbar Inside Movieclip Not Working
This is an issue that I have had for a while now and I have searched the web for a solution however no one seems have mentioned it before. When I set up a text scrollbar inside movieclip and call the MC to the stage using attachMovie the scrollbar simply packs up. Can anyone explain whats going on?
[MX04] Duplicate Movieclip Not Working
ok... i am trying to duplicate a movieclip with a library linkage name of 'fireball'...
i have put this code on the first frame inside a movieclip, but for some reason if i try to duplicate more than one fireball it destroys the old fireball and puts a new movieclip at the current mouse x and mouse y instead...
Code:
if (Key.isDown(Key.SPACE)) {
fire1++;
_root.attachMovie("fireball", "fireball"+fire1, fire1);
fireball1 = _root["fireball"+fire1];
fireball1._x = _xmouse
fireball1._y = _ymouse
var fireball1x = _root.player2.head._x-fireball1._x;
var fireball1y = _root.player2.head._y-fireball1._y;
var angle = 180*Math.atan2(fireball1y, fireball1x)/Math.PI;
fireball1._rotation = angle;
}
and also... i would like to know how to fix my rotation code, because there is a 'player2' ragdoll mc inside which there is an mc named 'head' (both of these are instance names)
and i would like to know how to rotate my fireball to the ragdoll and make the fireball move towards him... and i think that since my fireball mc is a circle, i don't need the rotation code, just a code that moves towards where player 2 was when the fireball was shot, but not constantly following him like a homing missile, so that there is a chance that your fireball will miss if he moves fast enough...
RemoveMovieClip Not Working For Attached Movieclip
Dear Friends.
I am having an weird problem. I am creating a software in flash, a desktop application for my client.
I attached movieclip but on a button click i want that movieclip to be removed.
My commands are correct i checked it in new flash file but not working in the main file.
When I use unloadMovie it works. but it does not delete physical properties, I face problem in attatching the same movie again.
Please Help.
Thanks in adv.
Setting Visibilility Of Movieclip Not Working
im trying to have my movieclip called standby_screen invisible by default and then appear when a button is pressed. Unfortunately it stays visible the entire time.
ActionScript Code:
_root.lightswitch.onPress = function() {
if (_root.lightswitch._currentframe == 1) {
_root.lightswitch.gotoAndStop(2);
_root.standby_screen._visible == true
}
else if (_root.lightswitch._currentframe == 2) {
_root.lightswitch.gotoAndStop(1);
_root.standby_screen._visible = false
}
};
Movieclip Event Listener Not Working
Hey, I got this movie clip that is a menu that drops down on a ROLL_OVER EventListener and scrolls back up on a ROLL_OUT EventListener. Inside this Menu movieclip are more movieclips serving as buttons like pause and play. Here's the code for the button that is working fine.
mstart.addEventListener(MouseEvent.MOUSE_DOWN, start_down);
function start_down(evt:MouseEvent):void{
mstart.gotoAndStop(2);
}
here's the code for the pause movie clip.
mpause.addEventListener(MouseEvent.MOUSE_DOWN, pause_down);
function pause_down(evt:MouseEvent):void{
mpause.gotoAndStop(2);
}
The clip IS defined as mpause in all keyframes... BUT
the pause movie clip is un-clickable... As if there's no code for it at all... Why?
Array Of Movieclip Doesn't Working Right
Hi, I created an array, and inside the array, there's some name that same with the movieclip on stage. So now I try to make it like, everytime I click on the movieclip, the array will delete it name in the array. Now still trying it out and seems like need some help, anyone?
And also include the file where I stucked.
Dynamic Array
Edited: 07/24/2008 at 09:03:33 PM by rockylhc
Copy + Paste Not Working For Movieclip
Hi im makin an arkanoid game where you have to destroy bricks with a ball. I tested the game with a single brick on the screen, and it works fine (the brick gets destroed when the ball hits and adds to the score as well).
But as soon as i try to multiply the movie clip to have lots of bricks on the screen, the ball does not recognize the movie clip and goes straight through it.
Further more, after hitting a particular brick, they all disappear at once!
PLz tell me the prob! this assignments due on friday !
MovieClip Methods Not Working After LoadMovie
I've been trying to fix this off and on for weeks now, and it really makes no sense to me why it will not work. I'm creating an empty movieclip, calling loadMovie on an external file to load into my newly created movieclip, which all works fine (no security issues).
When I test from flash, all the controls (play(), stop(), etc) work fine. Once I run it through the browser, however, all of the controls stop working, even though other code is still able to access the movie's properties.
It's seriously making me crazy as it makes no sense to me whatsoever, and it's not really doing anything fancy. Hopefully the included flash file will help explain it further. You will need to replace the URL in the loadMovie method.
I've tried searching for anything that would cause the loaded clip to go out of scope, but I'm seriously stumped.
Movieclip Acting As Button Not Quite Working
Hi all,
I'm trying to make a movieclip act as a button (I've done this before and it works for the most part) My problem this time is that the movieclip is simply a piece of text, and light text at that, so when I rollover or press the movieclip, the mouse has a hard time seeing where the movieclip is because it is thin type. When using buttons, you can have a hit state, but what do you do if you are using a movieclip? The movieclip is on a translucent background, so i can't fake giving it a background so it has something to hit on.
Any ideas?
Menu Inside Movieclip Is Not Working
hi friend
i need ur help i m working on below website i m facing a problem. whn you go to INSIDE PAGE
u will find about.specification contact n orther links.
inside.swf is the main file & when any1 clik on specification link an load movie comand on target it loads spec.swf . its work fine but inside this file thr is a menu which is inside a movieclip i hv given a link which will gotoandplay a Labeled frame in main scene. but its not playing at all . i hope u understand it.
http://www.naghihyundai.com/vr
Shapeflag HitTesting Not Working In Movieclip
Look at the example attached.
I thought maybe I had to use localToGlobal, but they are on the same layer, so it can't be that. It works on the root frame, just not in the movieclip.
Any ideas would be helpful.
Remove MovieClip Hittest Not Working.
Hey peoples,
I'm working on this top down game where some guy has to collect coins.
Thing is, for example I got 2 frames, and they both got coins in em, when you walk to the 2nd room and grab all the coins, and go back to the first room the coins respawned in both rooms.
Code:
onClipEvent (enterFrame) {
if (_root.survivor.hitTest(this)) {
_root.money++;
this.removeMovieClip();
}
}
That line of code is attached to a coin which is outside the Frame.
Code:
duplicatemovieclip("money2_mc", "money3_mc", 1);
setProperty ("money3_mc", _x, "200");
And that line of code is attached to the frame actionscript.
I can't seem to use that script twice, any idea of how I could pull this off?
Thanks in advance!
-Santa
Button Not Working Inside MovieClip?
I am using a menu which is a movieclip, and when I set a button which is inside of thr movie to go to a frame of the scene, it doesn't work.
Any ideas?
Thanks!
Dragging Movieclip And Working Buttons On It.
This one is quite easy, but I just can't get it to work.
Here's the swf;
http://kerin.cxc.pl/mapka/
And here's the fla;
http://kerin.cxc.pl/mapka/index.fla
I Use this script to scroll the map around
on (press) {
this.startDrag(false, -550,-400,0,0);
}
on (release) {
this.stopDrag();
}
I want to create a 'button' that will work and is also moving around with the draggable movieclip. I created one on a layer on top of my movieclip and it just does not want to work!
And help i greatly appreciated...
MovieClip OnRelease Function Not Working
I've read some other posts on this, but they went off subject, so I'll try it myself. The problem is the following, I have written an onRelease function for a movieClip. The first time the you click the button it works, but when you don't move the mouse and click again, nothing happens...
It's a very simple script:
ActionScript Code:
prevBtn.onRelease = function(){
trace("prev clicked");
prevImage();
}
Anyone knows why I first have to move my mouse again before the onRelease event is executed again?
|