ActionScript 2.0 :: Using Stage As MovieClip?
Sep 17, 2010
I'm trying to use the stage as a movieclip so that I can use onRelease to simply make the whole stage clickable. I'm creating various banner sizes and I rather do this simply using code rather than creating a movieclip on the timeline and adjusting the dimensions for each banner size.
This is what I wrote:
this.onRelease = function() {
getURL("url", "_blank");
};
The code doesn't work at all. This one does but it doesn't show the hand cursor:
this.onMouseDown = function() {
getURL("url", "_blank");
};
easiest Actionscript 2.0 solution to do this rather than using the timeline?
View 3 Replies
Similar Posts:
Jul 11, 2011
How do you make a movieclip move horizontally from the start of the stage to 3/4 of the stage. Stage size is 700 px by 600 px i want just one row in the middle of the stage. i want that movieclip to disappear right after it reach the end of the 3/4 mark.
View 1 Replies
Feb 27, 2006
i saw a thread while ago .. that always position a movieclip in the middle of the stage even if the stage or window resize any1 can point me to it
View 3 Replies
Aug 18, 2009
I can't access a variable on a the stage from within a movieclip thats placed on the stage.
View 4 Replies
Oct 16, 2011
what I'm trying to do is accessingsnapText = scrollPane.source.textSnapshot;from an external swf. I've tried:
trace("-->: "+scrollPane.source.textSnapshot.getText(0, 1000));
trace("-->: "+myLoader.content.textSnapshot.getText(0, 1000));
trace("-->: "+mc.textSnapshot.getText(0, 1000));
[code].....
View 3 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
Jan 18, 2009
I am making a site and have a component on the stage that is put there dynamicly through AS 2.0. When I F5 or Ctrl F5 it seems that the actionscript is read allover again?Only the script that is situated in the specific label. What if I have script in that label that creates a news reader. I f12 and the news reader is there I jump to another label with the menu. when i jump back to the home label the news reader does not appear on the stage. after a f5 or ctrl f5 it does.Do I have to attach the movieClip in each label to assure a the dynm-movieClip script is on stage for the ctrl f5 issue?
View 0 Replies
Nov 15, 2004
know how I can resize the stage to match the size of an external graphic/movieclip which is loaded into an empty movieclip,
View 3 Replies
Sep 1, 2009
I have a movieclip on the stage(lets call that selection movieclip) that once a button is clicked is going to open another movieclip(call this slideshow) I am trying to remove the selection movieclip when you launch the slideshow movieclip.
Error:
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display:isplayObjectContainer/removeChild()
at mc_work/clickHandler3()
[Code]...
View 9 Replies
Feb 8, 2006
how to load a movieclip into a blank movie clip all in the same movie?!
View 4 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
Jan 29, 2011
how to cal movieclip from stage to the movielcip which present in another movieclip
View 4 Replies
Apr 23, 2010
How do you align a dynamic movie clip position with another movie clip which is in the root stage? I tried to get the mc in root x,y position, but the starting point of the class that loads the dynamic MC does not seems to be accurate. (Meaning at the root stage, the x,y is 0,0 but at the dynamic class, its somewhere like 100,20 for the browser area (and it actually vary base on the browser size))
**the other classes I used to run the custom classes below, I have it added this MC to stage
var blocker:stageBlocker=new stageBlocker();
this.stage.addChild(blocker);
Below is the dynamic MC. Should I not add it to its own "stage"?
public class stageBlocker extends MovieClip {
private var blocker:MovieClip= new MovieClip();
public function stageBlocker():void {
[Code].....
View 1 Replies
Jan 15, 2010
I am trying to cast a String (from an array of strings generated by a for loop) which is referencing a MovieClip already on the stage.
[Code]...
View 4 Replies
Apr 10, 2010
How can i attach a movieClip into another movieClip that is already on the stage (using the attachMovie method) and randomly place them.
View 6 Replies
Mar 8, 2010
I have a Movieclip on stage with nested movieclips inside. All referenced at 0,0. None of the child movieclips load any dynamic content, animate or have Masked Layers. It does have an input textfield in one of the child MCs. The parent MC shows 280 px width, while it returns 313 px with a .width trace. There is no code that alters the .width value of the parent MC at run-time. And the ParentMC on stage is not scaled (it is at 100% width/height)
View 1 Replies
Feb 23, 2012
I'm not sure if this is an actionScript3 question, or a general flashCS5.5 stage editing question (i'm using Windows76bit):HISTORY:I've made a complicated animation, with many different layers, tweening at different times.Now that I'm all done, I realize I should have put it all in a movieclip in the first place (so I could do things to it easily, in Actionscript).PROBLEM (A):I can't just select everything and right click and choose "convert to symbol" (if I do, any layer that has animation is left out. for some reason).PROBLEM (B):I tried writing action script code that says var canvas_mc = new MovieClip() canvas_mc.addChild(stage.root); //(I've also tried just canvas_mc.addChild(stage);but this gives the "TypeError: Error #1009: Cannot access a property or method of a null object reference." I'm guessing it's a no no to just add the current stage into a MC(?)
View 1 Replies
Apr 19, 2010
On the click of a button I am having a movie clip load onto the stage from the library using the _root.attachMovieClip command and that part of my code is working perfectly.I have a close button embeded into the movieclip being loaded in but I am unable to get it to remove the movieclip from the stage when the close button is clicked. The close button has to be inside the loading movie clip so it doesn't interfere with other items on the stage which is why i'm not using _visible to show and hide the menu.
View 2 Replies
Nov 9, 2009
I've created a simple movieclip (48 frames long). I want to play this movie on the stage. I created enough frames, but the movie doesn't play. I haven't used Flash for a real long time, so I'm probably missing something simple.
View 4 Replies
Jun 5, 2011
I have 2 movie clips on the stage, and i need to call the 2nd movieclip from within the 1st one[code]...
View 1 Replies
Aug 3, 2011
I cannot add movieclip to stage. Here's the code:
[Code]...
I have this in the first frame in the timeline: var game:Game = new Game();game.main();
View 4 Replies
Oct 20, 2004
How can I make an movieclip leave the stage throw an event on a buttom? What action shoud I give to the buttom??
View 5 Replies
Apr 19, 2007
I need to incorporate the facility to save a file in swf or jpeg or bitmap format using actionscript.. is that possible?? if so,the file should contain a movieclip that's on stage.. i could convert it to bitmapData and then try saving.. or if not that, then atleast the screeshot of the whole movie should get saved..
View 7 Replies
Mar 6, 2009
I have a button, inside an mc1 which when clicked it plays
[TweenLite.to(mc2, 2, {frame:1});]
inside mc2 -which located back on the stage.
Currently I get the error of "access of undefined property)".
View 3 Replies
Jan 12, 2010
Work bought this menu and asked me to edit it even though i'm no AS2 expert just so basic knowledge, I've come pretty far so far but now i ran into a problem (probably the final one)...The menu uses XML to load in the menu, so all the options are dynamical.If you click a button it loads a menu into the stage, but if i click an other it overlapse the old one...i need to unload all the other movies on the stage, how do I do this? This is what I got for onRelease functions:
Code:
//Release function..
_parent.AccordionMenu["Menu"+a].onRelease = function() {[code]....
View 1 Replies
Jun 15, 2009
My code is this:
Code:
stage.addEventListener(MouseEvent.CLICK, addBullet);
function addBullet(event:MouseEvent):void {
var bullet:MovieClip = new bshot();[code]....
bshot is a movieclip in my library with the class name of bshot as well.i do not understand when i click i do not get a bullet being added to the stage?
View 3 Replies
Aug 6, 2009
I am new to Actionscript 3 and i am making a basic flash site using CS4 and AS3.I need to have an image as my background that resizes whenever the window/browser is resized and that works perfectly. I also need to import another SWF to the stage as this contains the main body of the site, this SWF needs to be centered at all times on the stage even on a resize.I have pasted some code below as what i have working at the moment is the SWF gets imported, the background does scale and resize etc but the movieclip won't center when first launched and i just can't figure it out.[code]
View 2 Replies
Aug 27, 2009
normally when i want to add a movieclip to the stage I would do this:[code]but I have an array of linkage ID's that I select from randomly at runtime so how do I code it to place it on stage?[code]
View 5 Replies
Feb 20, 2011
I have created a movieclip (game_container_mc) in the main.as file and I want to add a child (enemy) to it from a different file (makeWave.as) how would I do this?
View 7 Replies
Aug 5, 2011
How would I move a movie clip from a (non-specified) point, to a designated destination (in coordinates)? For example, move a movie clip named "Guy" to coordinates X=100, Y=100.
View 4 Replies