ActionScript 2.0 :: Putting A HitSpot MovieClip Inside The Box MovieClip?
Oct 18, 2006
I need it to have a rollover in the initial state (which works fine) and then, in another state (represented by the onOff variable & mc),I need it to have a rollover that has a different size than the actual area being displayed (so that it will do the rollOut when the user leaves the area around the first line of text).I thought I had it figured out by putting a hitSpot movieClip inside the box movieClip, but the box rollover function doesn't let the hitArea rollover function through...Here's the code, and the fla is attached with some samples of what I'm trying to do.
Code:
var onOff:Number = 0;
onOff_mc.onPress = function() {[code]......
View 1 Replies
Similar Posts:
Jan 29, 2011
I am trying to create my first semi-serious flash game. The problem I am having is I want to be able to click a button in the players inventory to equip a different armor to the player, and have that armor work in the game on the same movieclip(Player) without having to re-make all the attacks and moves etc. for each change on another movieclip. My ideas are extremely novice like putting each armor and update on a different frame inside the Player movieclip and then doing a gotoAndStop to the frame. Though that may work I don't know how to goto a frame inside a movieclip. I would like to control this using as much code as possible.I would paste my code but I don't have any code for this part of the game so far. I have tried some simple coding but so far I cannot get the pieces together.
View 1 Replies
Jan 25, 2012
I have a Button that is inside MovieClip1 which is inside MovieClip2; yet when i click the Button it doesn't dispatch Event.
View 5 Replies
Aug 10, 2009
Assume the main time line is A. On A I've got movie clip Z also On A . I've got movie clip B and inside B I've got a movie clip C (I need it to be this way because it soft of a TAB meanu).My problem is the actionscript written in C makes few objects called planet 1, planet 2, planet 3 on A function well. But when I move planet 1, planet 2, planet 3 to a movie clip (planets_mc) it won't function! How can I put planet 1,2 and 3 in to one mc and still make the actionscript in C work?I've used the _root. command in the script C. Hope my question is clear enough!
View 3 Replies
Jan 8, 2010
I've been trying to embed an entire html page with all the graphics and text into a movieclip.I used a dynamic textfield within the movieclip and used the URLLoader to load html text into the textfield.Also i used the UIScrollBar.Everything works except that the images remain where they are while scrolling.I need the scrolling effect and so haven't used the wordwrap on the textfield.
Code:
import flash.net.URLLoader;
import fl.controls.UIScrollBar;
import flash.display.MovieClip;
import flash.events.Event;
[code]....
So I needed to know whether there is any other way of doing this so that i could get most of the layout settings of the html into movieclip so that i can just place the movieclip where ever i want that page to be displayed.
View 3 Replies
Nov 23, 2008
Anywho im trying to add thumnails to a gallery of mine. Everything works fine untill i put all the symbols in a movieclip. When i do that the scroller stops working but everything else works fine!
The tutorial im working from is: [URL]
And the part of code that is relevant is:
function thumbNailScroller() {
this.createEmptyMovieClip("tscroller", 1000);
scroll_speed = 10;
[code]......
View 2 Replies
May 30, 2010
I used to use flash is AS2. Now in AS3 I can't put any code on a movieclip.I used to for example put code on a movieclip so that onrollover it would simply play what was in it.How can I achieve this without putting code on the movieclip itself?
View 1 Replies
Aug 9, 2011
On the stage, I have a movie clip called mc which contains 20 frames.I have put mc.stop(); on frame1 of the main timeline, this puts a stop action in frame1 of mc.Now I want to put a stop(); action on frame10 of mc using the main time line where all my code is.
The code fl.getDocumentDOM().getTimeline().layers[0].frames[0].actionScript = 'stop();'; does seem to work and I don't know what to import.There also a code method addFrameScript(0, customFunction); but it only crashes flash player.
View 6 Replies
Apr 17, 2010
I am trying to activate a rollOver-function when the mouse rolls over a movieclip inside of a movieclip.On the main window (root), first you rollOver a button where a window shows up with more options (movieclips).From stage, my first movieclip is called "catapultas_read_more" which leads to amother movieclip called "pic1_mc". The label that is going to play when mouse over on pic1_mc is "rollOn".I tried this.gotoAndPlay("rollOn); directly inserted to the movieclip, but the movieclip inside pic1_mc never starts
View 8 Replies
May 4, 2011
I have the scenario below. I have a movieclip on the stage (root). Inside this movieclip I have a frame with the action below:
_root.MCHappy.visible = false;
_root.MCSad.visible = false;
_root.MCNormal.visible = true;
I cant get this working with AS3. How is the correct way to do that inside a MovieClip with AS3?
View 6 Replies
Oct 21, 2005
I'm creating a menu bar that is a movieclip and inside the movieclip consists of the buttons.Now the menu bar is twice as WIDE as what is visible on the stage.The only part you can see is the text 'menu' on a bar.Then when the mouse hits the bar, it flies across the screen to the otherside of the bar where the menu buttons are.Now the menu bar does its animation over 20 frames - the last frame being the frame where the menu buttons are now visible.
On the last frame i have the 'stop;' code
On the first frame I have this code:
Code:
stop();
this.onEnterFrame = function(){
if(rewind == true){
[code]....
View 2 Replies
Jun 23, 2009
I have been using TweenLite for all of my easing. I was wondering what the code is for having a button inside a movieclip not active while the movieclip is tweening.Then when the movieclip does finish tweening the button then becomes active.
View 2 Replies
Feb 16, 2010
How can I get a button inside a movieclip link to a frame in another movieclip on the scene? I tried this code:
function gotoCenter(event:MouseEvent):void {
MovieClip(root).centermc.gotoAndPlay(2);
}
skruetest.addEventListener(MouseEvent.CLICK, gotoCenter);
..where "skruetest" is the button, "centermc" is the movieclip where I want to go to frame 2. I don�t get errors with this code, but nothing happens when I click the button. What can I do?
View 4 Replies
Dec 4, 2011
I want to apply actions to a movieClip nested inside a dynamicly attached movieClip, with the attachMovie method; it doesn't works when the movieClip is attached by a button:
1.when the swf movie loads with an attachMovie method the remove_btn clears the window_mc
[Code]....
View 9 Replies
Oct 23, 2009
I have a button inside a movieclip, to which I would like to apply a rollover function. When rolled over, this button (inside MOVIECLIP 1) would make (MOVIECLIP 2) jump to second frame. I'm using Flash 8.This is turning onto a real headache for me, since i've searched every single forum and thread concerning this matter, and nothing seems to work.
View 7 Replies
Oct 27, 2011
i have dynamic buttons in movieclip and i want the movieclip goto 2nd frame once some one click single movieclip while rest remains in 1st frame.the movieclips can be in arrayi have some code here:
Actionscript Code:
var mc:MovieClip = new MovieClip();for(var i:int = 0 ; i < numberOfButtons;i++){ var btn:MovieClip = new button();
[code]....
View 5 Replies
Nov 5, 2010
I have a movieClip button in my library that I dynamically add multiple instances of to the stage using code (so each instance has a unique name). The button has two frames, so it has a basic rollover effect (just changes color. To make the rollover work, I've had to dynamically add an event listener to each new instance of the movieclip, which triggers the rollover function.
I was wondering, instead of adding an event listener each time, can I somehow have an event listener within the movieclip to take care of the rollover? Or will it not make any difference to the number of event listeners, as it will still add a listener with each new instance of the clip?
View 1 Replies
Dec 3, 2006
I have a movie clip, circle_mc, and in it is embed another movie clip, point_mc. I made the circle draggable with this:
Code:
circle_mc.onPress = function() {
startDrag(this);
[code]....
View 3 Replies
May 18, 2010
On the stage I have a movieclip called mc_back. I also have a movieclip on the stage called mc_content. Now, inside mc_content I have a bunch of code and some of it adds, or should add, an EventListener to mc_back as well as a a function that works when mc_back is pressed.
So basically, all code is written inside mc_content and some of it needs to interact with mc_back.
how to target mc_back from inside mc_content. Using stage.mc_back or root.mc_back doesn't work and Google should be my friend, but in this particular problem, it's acting more like my enemy.
View 8 Replies
Aug 3, 2009
Is there any ways to set a movie clip(item2) invisible but set another movie clip which located inside item2 visible?
View 1 Replies
May 17, 2011
I am brand new to AS3 and just about muddled through with AS2. I have a problem which should have a simple solution but everything I try gives errors.I had a load of buttons on the main timline which worked fine. I have moved a load of them into another movieclip called flyoutMenu. Now none work and I get the error:Error #1065: Variable about is not defined.This is the code stripped down to one button:[code]
View 2 Replies
Aug 6, 2009
I have a movieclip running inside a movieclip and i want trigger an action on the timeline in AS2 I would put _root.gotoAndPlay("start6_fl"); or _parent.gotoAndPlay("start6_fl"); depending on were I wanted to go.How do you do this really simple action in AS3?
View 7 Replies
Mar 17, 2010
I have a movieClip called "mcUnitedStates" inside another mother movieClip.
I have two instances of the mother movieClip. One entitled "mcWorldMapTop" on its own layer and the other entitled "mcWorldMapBottom" on its own layer.
I thought having two instances of the same movieClip and applying different filters to the mcUnitedStates movieClip in each.
Error I get is: Access of unidentified property mcWorldMapBottom
I'm doing this because the colorTransform is making the glow the same color as the colorTransform instead of the color I want the glow to be.
I am getting a Compiler error with this code:
stop();
//
import flash.display.Sprite;
import flash.filters.GlowFilter;
[Code].....
View 5 Replies
May 3, 2011
I have a mock up fla file showing what i am trying to attempt. I have a button nested in a movie clip on the second frame on main timeline called PageBackBtn. I am trying to get this button to target a label within a movieclip on the first frame of the main timeline. The label also is called PageBackBtn within the movieclip on frame one.
View 0 Replies
Oct 27, 2005
Iv'e got a problem, when creating a movieclip inside a movieclip. I create 5 movieclips dynamically... I want a clickable tag/box on each of these moviclips...
[Code]...
View 9 Replies
Feb 10, 2010
I have a movie clip called "myMC". I set its x value as such:
[AS]
var myMC:MovieClip = new MovieClip();
addChild(myMC);
myMC.x = 100;
[Code]....
I know I could proboly acheive this with a math equation but is there a function that can get the exact global position of "myShape"? So that I can position another movieclip or sprite around that movieclip?
View 3 Replies
May 4, 2011
I have a mock up fla file showing what i am trying to attempt. I have a button nested in a movie clip on the second frame on main timeline called PageBackBtn. I am trying to get this button to target a label within a movieclip on the first frame of the main timeline. The label also is called PageBackBtn within the movieclip on frame one.
View 1 Replies
Feb 24, 2011
I am trying to get to a
movieclip nested inside a movieclip in As2:
MovieClip1.movieClip2.movieClip3.gotoAndStop(2)
MovieClip1, MovieClip2, MovieClip3 is instances Names.
View 2 Replies
Apr 27, 2011
I made a script that creates a MovieClip (two stationary Ovals, side by side) from the library and transports them from the left side of the stage to the right.The idea would be to make the RIGHT Oval decrease in size as the MovieClip is traveling while keeping the LEFT Oval the same size. (All of them being part of an Array)I thought to convert the right Oval to a MovieClip within the parent MovieClip, but I have not been able to access the ".width" and ".height" of the nested MovieClip.Not sure whether I'm on the right track or not.
View 5 Replies
Feb 23, 2012
I am not able to create a empty movie clip inside a empty movieClip.
Here the code..
var photoHolder:MovieClip=new MovieClip();
addChild(photoHolder);
var photo:MovieClip=new MovieClip();
[Code]....
View 9 Replies