Can't Destroy Movie Clip
I have an object at the middle of the stage. When the mouse is overlapping it, the mouse pointer will be invisible, and be replaced by an animation of a move clip where the pointer is burned to crisp.
The problem: I need to destroy mcArrow (the burning curser animation) when it reach the last frame.
I Tried the following code at the last frame:
quote:ActionScript Code:
if (parent) {
parent.removeChild(this);
}
However, when the movie clip disappear, it gives the following error:
quote:TypeError: Error #1009: Cannot access a property or method of a null object reference.
at MinArrow/frame1()
Note that the error is generated at the first frame. If I remove the code from the first frame, the error hits the second frame instead.
Its not even supposed to return to the first frame, since the movie clip should have been destroyed.
I hope this makes sense. The files can be downloaded here:
www.kasperhviid.dk/stuff/reklame.zipwww.kasperhviid.dk/stuff/reklame.zip
- Kasper
Adobe > ActionScript 3
Posted on: 05/29/2008 05:37:48 AM
View Complete Forum Thread with Replies
Sponsored Links:
Can't Destroy Movie Clip
I have an object at the middle of the stage. When the mouse is overlapping it, the mouse pointer will be invisible, and be replaced by an animation of a move clip where the pointer is burned to crisp.
The problem: I need to destroy mcArrow (the burning curser animation) when it reach the last frame.
I tried the following code at the last frame:
quote:ActionScript Code:
if (parent) {
parent.removeChild(this);
}
However, when the movie clip disappear, it gives the following error:
quote:TypeError: Error #1009: Cannot access a property or method of a null object reference.
at MinArrow/frame1()
Note that the error is generated at the first frame. If I remove the code from the first frame, the error hits the second frame instead.
It's not even supposed to return to the first frame, since the movie clip should have been destroyed.
I hope this makes sense. The files can be downloaded here:
www.kasperhviid.dk/stuff/reklame.zipwww.kasperhviid.dk/stuff/reklame.zip
- Kasper
EDIT: Sorry about the double post - I pressed enter when the curser was inside the title field. Stupid ...
Edited: 05/29/2008 at 05:42:53 AM by Kasper Hviid
View Replies !
View Related
Generate/destroy Movie Clip
not sure how to fix this
if i could get a piece of code that generated a movieclip
instance of the button it might help.
thought that if how the buttons operate & become
accessible were changed it might fix the problem.
suggestions?
---
was working on an application and ran into a bit of aproblem
my buttons wouldn't work properly. first i thought it was just
an issue of badly defined hit areas/states
but i believe its because the buttons are overlaping each other
and blocking one another. so when the top buttons becomes
invisible and inactive they block the bottom butttons and end
up not functioning properly
View Replies !
View Related
Flash Lite Nested 'dynamic' Movie Clip Names Aka Why Must Flash Lite Destroy Me?
Hi.
I'm having problems defining the properties of a nested movie clip
beaconmap_search_mc.eval(curMapPlace)._alpha = 50; is the offending line
eval(curMapPlace) being the nested movie clip
It says I have to export is as flash 5 for it to work.
Seems ok according to this page:
http://www.adobe.com/devnet/devices/articles/as_flashlite_03.html
I have also tried using /: syntax, same problem.
It works when the nested movie clip name is named outright
(for example: beaconmap_search_mc.C1._alpha = 50;)
so I'm obviously doing something horribly wrong there.
Does anyone know where I'm going wrong?
I've had a few too many glasses of wine and a few too many hours on this assignment to work it out myself. And in general am just an awful programmer.
View Replies !
View Related
Destroy() ?
hi
Does anyone have any pointers on how to use
destroy()
I've figured out the youtube API tips at
http://code.google.com/apis/youtube/...reference.html
And i have a test site working at
http://www.smolenski.com/bas/
But i can't get multiple netstreams to swap out and play different youtube videos. They just continue to play the audio of the video I'm trying to swap.
Cheers
Bobsmo
View Replies !
View Related
Search And Destroy
how can i refer to any of a selected set of MC's in order to duplicate movie?
naming convention is striker_1, striker_2 etc etc, but any mc's can be present or not at any time
i think this has somehting to do with arrays, but i'm not sure how to use arrays!!
View Replies !
View Related
How To Destroy A Child
hi ppl
i load an external swf,
i add it to a container on the screen
then i need to remove it
loadeR.load("some.swf");
container.addChild(loadeR);
container.removeChild(loadeR);
but the some.swf has a song playing.. and it wont stop after the child is removed
how do i destroy the loadeR thing??
View Replies !
View Related
Search And Destroy
I have a box with 5 pieces of paper inside
myArray1 = new Array ("1","2", "3", "4", "5");
I am going to chose a piece at random from the box
$i = random(5);
trace(myArray1[$i]);
That piece has now been removed from the box, therefor it has to be removed from the array, now I can't find any tutorials on how to remove from mid-array only begining and end, so I thought of this,
ActionScript Code:
for (var $loop = 0; $loop < myArray1.length(); $loop++) { if ($loop <> $i) { myArray2 = new Array(); myArray2.push(myArray1[$loop]); } }trace(myArray2);
Now maybe I am wrong in how I have set this up, but im thjinking if the loop index of the random piece is equal to the random number, then skip that, else, put all the other pieces in a new box.
but when i trace the 2nd array, it displays the random value.
I don't know what I am doing wrong. Is there any way to move everything from an array into a new array WITHOUT a certain element? I mean I know you can move a certain element via its array possition, any form of array.pushNOT($n, ($n+1))
View Replies !
View Related
Search And Destroy
I have a box with 5 pieces of paper inside
myArray1 = new Array ("1","2", "3", "4", "5");
I am going to chose a piece at random from the box
$i = random(5);
trace(myArray1[$i]);
That piece has now been removed from the box, therefor it has to be removed from the array, now I can't find any tutorials on how to remove from mid-array only begining and end, so I thought of this,
ActionScript Code:
for (var $loop = 0; $loop < myArray1.length(); $loop++) { if ($loop <> $i) { myArray2 = new Array(); myArray2.push(myArray1[$loop]); } }trace(myArray2);
Now maybe I am wrong in how I have set this up, but im thjinking if the loop index of the random piece is equal to the random number, then skip that, else, put all the other pieces in a new box.
but when i trace the 2nd array, it displays the random value.
I don't know what I am doing wrong. Is there any way to move everything from an array into a new array WITHOUT a certain element? I mean I know you can move a certain element via its array possition, any form of array.pushNOT($n, ($n+1))
View Replies !
View Related
Search And Destroy
Hi,
I'm trying to manage a flash page with wordpress cms by reading the feeds but I'm stuck with the images part.
this is the data that I'm reading in flash
Code:
<p>someText... someText... someText... someText... </p>
<div class="mceTemp">
<dl id="attachment_3" class="wp-caption alignnone" style="width: 310px;">
<dt class="wp-caption-dt"><a href="http://localhost/wordpress/wp-content/uploads/2008/07/dscn2222.jpg"><img class="size-medium wp-image-3" title="myTitle" src="http://localhost/wordpress/wp-content/uploads/2008/07/dscn2222-300x225.jpg" alt="myCaption" width="300" height="225" /></a></dt>
</dl>
</div>
I don't want to display the image below the text, I want to store the image link, title and caption into vars to able to display the image in whatever way I want - for example to in the background of current flash section/page.
So how can I erase all the div class and only retrieve this data?
Code:
var imageLink:String = "http://localhost/wordpress/wp-content/uploads/2008/07/dscn2222.jpg"
var title:String = "myTitle"
var thumbLink:String = "http://localhost/wordpress/wp-content/uploads/2008/07/dscn2222-300x225.jpg"
var caption:String = "myCaption"
any help or suggested path greatly appreciated,
Thank you.
View Replies !
View Related
How To Destroy/free Object?
hi,
i got an Object, for example LoadVars.
i created it:
Code:
var my_lv:LoadVars = nre LoadVars();
and now i want to destroy it, free it from the memory?
how can i do it?
is this the right way?
Code:
my_lv = null;
what do u say?
Avi.
View Replies !
View Related
Destroy/Delete A Movieclip?
Hey every1.
I have a question (I'm sure somebody asked it before, but I didn't find the threat...) :
How can I delete/destroy/whatever a movieclip during a movie? I made a game, in the game there is a zombie (movieclip), and when its life (life???) reaches zero, it should be destroyed. I tried "removeMovieClip(this)" and much more, but it didn't work, but also there were no errors.
View Replies !
View Related
Create/Destroy Object Help
I have a challenge that is driving me nuts. There should be a simple solution to this but I think the forest and the tress analogy is what I've got going on. I have a very simple setup - a Flash file is loading a text file with a number of variables and values. The Flash file creates a series of buttons and labels based on the info that is coming in from the text file. Once the items are on the screen, I want the user to be able to choose a button and the program SHOULD clear all the created objects off the stage so new objects can show up.
I have attached the code for the Flash file the first set is on the first frame and the second on the second frame. I know that everything works up to the destroyObject call. Objects show up on the stage, they are given the correct text and instance names and they even send info (like their instance name) to the listener. The stupid objects just won't go away!
Any suggestions? Thanks for the help!
//frame 1 AS
loadVariables("installer.txt", _root);
_global.style.setStyle("fontSize", 18);
//"loop" while loading variables from text file
function checkParamsLoaded() {
if (_root.completeVar="yes") {
clearInterval(param_interval);
gotoAndStop(2);
} else {
trace("loading");
}
}
//put "loop" in motion
var param_interval:Number = setInterval(checkParamsLoaded, 100);
//
stop();
//frame 2 AS
var yLoc:Number = 485;
for (var i:Number = 1; i<9; i++) {
if (this["lang"+String(i)] == undefined) {
i = 9;
} else {
yLoc = yLoc-40;
_root.createClassObject(mx.controls.Button, "lang"+i+"Inst", this.getNextHighestDepth(), {_x:500, _y:yLoc, _width:130, _height:30, label:this["lang"+String(i)]});
_root.createClassObject(mx.controls.Label, "inst"+i+"Inst", this.getNextHighestDepth(), {_x:350, _y:yLoc, autoSize:"right", text:this["inst"+String(i)]});
}
}
stop();
//functions and listeners for all buttons to be clicked
var listener:Object = new Object();
listener.click = function(button) {
//clear the stage
for (var i:Number = 1; i<9; i++) {
if (this["lang"+String(i)] == undefined) {
i = 9;
} else {
destroyObject("lang"+i+"Inst");
destroyObject("inst"+i+"Inst");
}
}
};
for (var i:Number = 1; i<9; i++) {
this["lang"+i+"Inst"].addEventListener("click", listener);
}
View Replies !
View Related
[F8] How To Close/destroy Loadmovie?
I have attached a .swf to load inside a MC. This is the AS inside the MC on a blank frame:
code: this.createEmptyMovieClip("mHolder", this.getNextHighestDepth(), 200, 500, 500, 500);
loadMovie("oranges.swf", mHolder);
mHolder._x = 50;
mHolder._y = -200;
stop ();
I have a button inside this MC so when you click on it the MC closes and returns to the start up screen. This is the AS on this button:
code: on(press){
gotoAndPlay(11);
_root.stateOpen=false;
}
Problem is when the MC closes the attached .swf stays on screen..
How can I get the attached .swf to close when the MC it is inside is closed??
View Replies !
View Related
Does Flash Destroy PHP Sessions?
I think I need to ask it more simply....my other post was confusing. Does Flash destroy PHP sessions right away? I'm having Flash and PHP Session issues...the session seems to be getting destroyed quickly after its made. Any ideas?
View Replies !
View Related
Preloader Destroy My Site....
i load a file to a movieclip and everything seems to look good..but after i put a preloader to the file that i load to the movieclip,every tthing went wrong.the stop(); dosent work ,and a lots more.......
where should i put the preloader?
View Replies !
View Related
Making A Movie Clip In A Movie Clip Go To The Next Frame Of The Original Movie Clip
I have a movie clip (for simplicity I'll call it movie_a) in movie_a I have another movie clip movie_b.
in movie_a i have a button that when pressed makes movie_b play (it has a stop frame every once in a while so the button acts as a "next" button)
I want it so that when i get to the last frame of movie_b and press the button, it will go to the next frame of movie_a
I hope that doesn't confuse u and u can help me solve this problem, as i am stumped and I've tried everything I could think of (which isn't that much as I'm not too good with actionscript)
thnx
View Replies !
View Related
How To Destroy A Sound Object That Was Created?
hey guys..... have a little issue here, and will try to be easy to understand...
my problem: I create a sound object in frame 1, scene1 from a MC that contains BG music I want to play during an intro that spans scene 1,2,3. There's a MC onstage (that contains the BG loop) which is swapped to _level99 and named so that it spans all 3 scenes (also allowing me to create a sound object of it by targeting)
myLoop = new Sound( "mySoundClip");
There is also an onClipEvent() on this MC which watches for a var to fade the music in or out. This all works perfectly - not the issue.
At the end of scene3, I remove _level99, the named MC AND delete the sound object - after it fades out - therefore leaving no trace of it, or so I thought. In scenes 4, 5, 6 I am using addListener keys to watch for the user pressing the pgUp and pgDN keys. This also works fine EXCEPT that when jumping back in the timeline even just 5 or 10 frames in either scene 4, 5 or 6, (never going back to scene 1,2,3) the BG sound turns on again, at full volume.
What gives? I have tried everything, and cannot seem to get rid of this damn sound object. I've tried delete; I've tried unload; I've even tried redefining the sound object with the same name. Still nothing. Moving forward in the timeline is fine, but the minute I try and jump backwards in 4,5 or 6, the clip comes right back. I have debugged it, and it shows no occurrence of the sound object, or of the MC after scene3.
Hopefully one of you guys have experienced similar problems.
Thanks for taking a look.
View Replies !
View Related
Tile Based - Destroy Tiles
Hello, name's Matt, new to FlashKit.
I've been using flash for some time now, so I'm nothing short of cluey when it comes to making applications and such, although the game scene is never something iv'e tapped into.
Been following the wonderful tutorials by Sir.Tonypa, and Klas (OOS), and have a general understanding of how it's all working.
Im making a small Pac-man type of game, where as I can shoot, and blow holes through walls, as can the enemy.
Ive managed to get some cool AI working, and for them to shoot and attack me as I do the enemy. although my question is about how do I go about changing tile states to walkable/non-walkable once been shot... for a while I figured i could throw in a 'non-moving' enemy, that when i shoot, it dies and becomes a walkable area, although this didn't seem to work as planned.
I guess I'm just looking for some guidance, not so much as source and examples (keen to try this without ripping anyones code). So if anyone knows of links to similar posts with answers, or anything that may be of assistance, it would be mucho appreciated.
Mind you, I have been searching, for a few days now, and nothing has shown up with what I'm after.
Cheers guys, lookin forward to a favorable responce
--
Matt
View Replies !
View Related
[F8] Destroy All Instantiated Functions And Variables?
Is it possible to for example, jump to keyframe 14 where many functions and variables are instantiated, from keyframe 2, and then delete ALL variables, functions, and function events (like onEnterFrame) created on keyframe 14 and then jump back to keyframe 6, where more functions need to be instantiated, some with the same name as on keyframe 14 but doing different things?
Thanks.
View Replies !
View Related
Destroy A Previously Created MovieClip
I'm dynamicaly creating MovieClips with something like this:
Code:
var container;
container=this.attachMovie("Contenedor","contenedor_" + this.contenedores.length , this.getNextHighestDepth());
contenedores.push(container);
So later, according with some events i need to destroy those movieclips and get them out of the Array "contenedores". How can i do that?
Thanks in advance.
View Replies !
View Related
Create / Destroy Textbox Function :: Not Working
i have a series of buttons over which i want a text box to appear when they are the rollOver and rollOut events are triggered.
on rollOver i want the box to be created and display content
and on rollOut i want the box to be deleted
the box is created fine and displays the content and follows the mouse just like it's supposed to ... but it won't go away when i say delete _root.label
any ideas how to fix this?
here's the code
PHP Code:
makelabel = function () {
_root.createEmptyMovieClip('label', 1002);
_root.label.createTextField("insidelabel", 1003, -30, -30, 50, 18);
_root.label.insidelabel.background = true;
_root.label.insidelabel.selectable = false;
_root.label.onEnterFrame = function() {
this._y = _root._ymouse;
this._x = _root._xmouse;
_root.label.insidelabel.text = _root.select;
};
};
destroylabel = function () {
delete _root.label;
};
View Replies !
View Related
_alpha Destroy Everything / OnLoad Doesnt Work
Ive got 2 problems:
1.
there are 10 mcs (point0 to point9) in first frame
in second frame there are the same points but in diffrent positions.
when i add action eg:
point1._alpha = 50
in first frame and click "electronic" button point1 doesent move....
2.
point1.onLoad = function(){
trace("ll");
}
onLoad doesent work ....
source: http://www.dagami.lodz.pl/mac/v3mac.fla
View Replies !
View Related
Movie Clip Buttons Nested Inside Movie Clip Dont Work
Hi people!
im having a problem here.
in my first frame i have a movie clip named "menu_mc".
i have this AS for this movie:
Code:
this.menu_mc.onRollOver = function() {
menu_mc.gotoAndPlay(8);
}
this.menu_mc.onRollOut = function() {
menu_mc.gotoAndStop(7);
}
thats working ok, the menu_mc plays on rollover from frame 8 till frame 12 where stops.
On frame 12 (this is inside the menu_mc movie clip) i have another movie clip, named button1_mc.
and also i have AS controling that MC:
Code:
this.button1_mc.onRelease = function() {
getURL("index.htm", "_self");
}
The problem is that when i rollOver on menu_mc it work fine and the button1 appears, the problem is when i try to click button1...
doesnt work.
the swf you can see it on www.wt.com.mx/menu.swf
can anybody help me please?
what im doing wrong?
or what other ideas can you give me so i can make that work.
thanks!
View Replies !
View Related
Mouse Rollover On One Movie Clip Increase Decrease Alpha Of Another Movie Clip..
So I really haven't messed with Actionscript much for a couple years and here is my issue.
I have several movieclips I put together that will eventually be a menu for my website. When you roll over a menu option (movieclip) I am trying to get another movie clip to fade in giving the description of the menu item.
For example - when you roll your mouse over the 'Live Chat' option a brief text description would appear telling you what the live chat is about. This description is a seperate movie clip appearing away from the original menu.
I have made the movieclips for the menu and the movie clips for the descriptions. I tried this action on the menu option to get the description to fade in:
Code:
onClipEvent (load) {
this._parent.mc_text_discussionBoard._alpha = 0;
}
onClipEvent (enterFrame) {
this.onRollOver = function() {
if (this._parent.mc_text_discussionBoard._alpha<100) {
this._parent.mc_text_discussionBoard._alpha += 5;
}
};
}
But the alpha only increases on the description (mc_text_discussionBoard) by 5 when I keep rolling my move over and out and over again. It makes sense why it does that, but I'm not exaclty sure how to get it to continually increase the alpha by 5.
any help would be great and I am anxiously waiting to get this solved!
Kevin
View Replies !
View Related
Code 4 MovieClip Button To Load A Movie Clip Into A Placeholder Movie Clip.
Yeah that title sounds a little confusing...so i will explain:
Is there a way to tell a "movie clip button" that once it is clicked on to load a "movie clip" into a "movie clip placeholder". So instead of loading an external swf into the placeholder, it will be a movie clip from within the same library. Putting every single custom clip on the timeline would take a while, so that is why I thought it would be easier like this, and the other movie clips are not that large that I want to load into it so there is no need for external swfs, trying to keep it clean. Here is the code along the lines I am trying to go for.
__________________________________________
this.profile_mc.onRelease = function() {
placeholder_mc.loadMovie("profileSection_mc","plac eholder_mc","_root.content");
}
__________________________________________
- "profile_mc is the button I am trying to activate to load the
"profileSection_mc" into the "placeholder_mc". but so far no good.
- the movie clips are within the same library, not on the timeline or external library.
- Is this possible?
View Replies !
View Related
Using A Button In A Movie Clip To Control The Movie(and Not Movie Clip) Timeline
Ok i have a button placed in a movie clip. I want this button, when released, to go in another scene, frame one, on the movie(scene) timeline and not on the movie clip timeline.
So i tried: gotoAndPlay("mission", 1); (mission is the name of my scene)
But it goes to the frame 1 of my movie clip, It would be great if someone could tell me how i can control the movie timeline while my button is in a movie clip
thaks
Vakarm
View Replies !
View Related
How To 'stop' A Movie Clip Within A Movie Clip Within A Movie Clip Loop
I've done searches, laughed, cried, and punched holes through the wall, but I can't figure this out.
I'm in Flash MX (pro) and I have a MovieClip on my main timeline (frame 1). Inside that clip is another animation (the static animation scrolling across the screen), and another inside of it of the static animation (6 characters on a train each animated uniquely).
Confused yet? Ha! OK, so I just want the damned animation on the main timeline to run once and then stop (or to 270 frames). I've tried:
myMovieClip.stop()
to no avail. I've tried attaching the script to the movie clip itself, and also to the frame.
Any suggestions?
View Replies !
View Related
A Button Inside A Movie Clip, Within A Movie Clip, Calling Another Scene:
Is it even possible?
I have been trying to do it for the last few days for a site I am working on.
I have done searches in many forums and it's foolish looking for an answer that way, because quite frankly every thread I opened was something to do with LoadMovie or GetURL, etc.
What I have right now is on the button in my Menu Bar Movie Clip:
on (release) {
gotoAndPlay(285);
}
Which plays a fancy little animation in the movie clip and then on the last frame of that movie clip I had:
gotoAndPlay("Contact", 1);
Which is the Scene for the "Contact Us" Scene named "Contact"
One would think that it would load up the scene and play at frame 1, however all that happens is it reloads the movie clip of the "Menu Bar" at frame 1 and starts over, not even realizing what I asked.
Anyways, I figured there's a script or something that tells it to look outside of the movie clip or to the _Root, or whatever.
If someone has a solution, it would be greatly appreciated.
Sorry I have no example to show, since I have yet to upload it. (It's my company's web site, and I don't think customers would want to see some half-arsed web site that's not complete.
Thanks in advance.
View Replies !
View Related
On Mouseover Show Movie Clip, On Mouseout Close Movie Clip *HELP*
Basically what I am trying to do is this...
I have a movie clip that is a name. When you put your mouseover the name I want another movie clip to display to the right of the name. This clip has a photo and bio of the person.
The photo and bio have an animation that fades it in and an animation to fade it out. I have 5 frames for the fade in, then stop frame, then 5 frames for the fade out.
What actionscript do I need to use to make that second movie clip load when a user mousesover the name (first movie clip) and to make the second half of the second movie clip play when the user removes their mouse from name (first movie clip).
NOTE: I tried using loadMovie and unLoad movie but I couldn't do it loading another swf. The reason being this is already an swf loaded inside a main movie. I guess you can't load an swf inside an swf that's already loaded inside an swf. I hope this all makes sense!
I appreicate all the help!
Thanks a lot!
View Replies !
View Related
Create An Empty Movie Clip Inside An Existing Movie Clip?
I'm making sort of a tabbed navigation scheme by reading the data for each tab in from an XML file. What I'm wondering is if it's possible to use createEmptyMovieClip() to make a new empty movie clip inside a movie clip that already exists on the stage.
Using
ActionScript Code:
m_anchor.loadMovie(bg_image);
works as I would expect. bg_image is just the relative path to an image file, and m_anchor is a movieclip already on the stage. However, doing a similar thing:
ActionScript Code:
m_anchor.createEmptyMovieClip("textbox", this.getNextHighestDepth());
and then drawing a shape (a rounded rectangle, which I then want to put text on top of) doesn't work. It works if I just say "this.createEmptyMovieClip" instead of attempting to create it inside the m_anchor clip, but if I do that, the "textbox" is created at the root level and I can't unload it along with everything else in the "m_anchor" clip. Is it possible to create a new empty movie clip inside of one that is already on the stage?
Thanks!
View Replies !
View Related
Load An Internal Movie Clip To An Empty Movie Clip On The Stage
Can any of you shed some light as to why this is not working:
on (release) {
emptyMC.attachMovie("mrimc","instance1",this.getNe xtHighestDepth());
}
what I want to have happen is when the user clicks a button it loads the mirmc into emptyMC on the stage.
I have double checked that my empty movie clip does indeed have an instance name of emptyMC and that the movie I want to load into does in fact have the name mrimc in the library. Any ideas?
View Replies !
View Related
Problem Getting Movie Clip Inside Of Movie Clip To Face Mouse
I used the code below to make a movie clip face the mouse, it works when I use it on a movie clip that's not embedded in another movie clip, but when I used it on an embedded movie clip, it's axis seems to change.
Attach Code
var stickGun:MovieClip = this.stick_holder.stickGun_mc;
//stick_holder.stick_mc.stickGun_mc
stage.addEventListener(Event.ENTER_FRAME, onMove);
//stick_holder.stick_mc.stickGun_mc.addEventListener(MouseEvent.MOUSE_MOVE, onMove);
function onMove(event:Event):void {
// get the radian value of the angle between the clip and the mouse...
var myRadians:Number = Math.atan2(mouseY - stickGun.y, mouseX - stickGun.x);
// convert it to degrees...
var myDegrees:Number = Math.round((myRadians * 180 / Math.PI));
// get the horizontal and vertical distance between the clip and the mouse...
// rotate the clip toward the mouse...
stickGun.rotation = myDegrees;
}
View Replies !
View Related
Placing Actionscript Movie Clip Inside A Movie Clip Symbol
I'm loading an external image into an empty actionscript movie clip (holder1) using MovieClipLoader(); on frame one of my movie and is invisible. Then when the movie plays, there is an empty movie clip symbol (image1_mc) that is placed manually on the stage within another movie clip symbol (flash_mc), and is also on a bottom layer of a mask layer which is animated. Is it possible to place "holder1" inside of "image1_mc" so that I can treat it as if it were an embedded image? In other words, have the image in "holder1" inside of the manually placed movie clip symbol "image1_mc" so that I can use it like a regular symbol on the stage?
View Replies !
View Related
How Can I A Movie Clip Splash Prior To Attaching The Choose Movie Clip..Help
I have a presentation which I would like to publish on CD. What I want is to have movies attached to the container_mc on the stage upon clicking the desired navigation buttone. But before movie gets attached, I would like to have a logo_mc animation (from the library) to play itself before playing the selected clip.
I think I need to write up a function which will call the animation splash clip prior to attaching the clicked movie.
Appreaciate all the help.
Thanks so much.
View Replies !
View Related
Creating A Button To Open A Movie Clip From Inside A Movie Clip?
I'm using a hexagon menu to display some images. One image is placed on each slide of the hexagon menu (which can then be rotated left and right to see other "slides").
What I want to do now is to be able to click on the object (image) as a button and for it to go to another scene which shows the image blown up and some description next to it (which is another movie)
I have tried the following which doesn't seem to work:
Created an invisible button (or choosing the image as a button) and having
on(release) {
gotoAndPlay("scene 5", 1);
}
this doesn't work when I use it over the hexagonal menu, but when I move the button to somewhere else on the screen (not over the movie) it works.
Please can someone help with this - Ive been working on it flat out over the weekend and desperately want to make it work. any ideas would be appreciated!! thank you
View Replies !
View Related
|