Calling Button Within A Movieclip
i have a movie clip called menu
there is a button in the movie clip called button1
how do i use that button from the main timeline
i was guessing to do:
menu.button1.onRelease { whatever action }
but its not working
how would i do that
p.s. i need to be able to run the release code in the main timeline, not the button's timeline
thanks
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 11-13-2003, 05:16 PM
View Complete Forum Thread with Replies
Sponsored Links:
Calling Button Within A Movieclip
i have a movie clip called menu
there is a button in the movie clip called button1
how do i use that button from the main timeline
i was guessing to do:
menu.button1.onRelease { whatever action }
but its not working
how would i do that
p.s. i need to be able to run the release code in the main timeline, not the button's timeline
thanks
View Replies !
View Related
Calling Movieclip And Option Button Instances Using Variables
Hi,
I use flash mx 2004.
My problem is this:
I am loading an xml file into flash which contains information on the contents of the movie.
One piece of info is contained in the attribute of an xml tag. I am trying to set the value of this attribute as the instance name which references an object in the movie.
let me give you an example;
I have a question with four option buttons each with an instance name of option1, option2, option3, option4. The xml file not only loads the questions but also contains a reference, as an attribute, which indicates the correct answer.
I have no problems extracting this value - which for example we can say is equal to "option3", but I can't seem to get it to work.
option3.selected == true; would be the way to hard code this but how do I get it to use the value I extract from the xml file.
valuefromXML.selected == true;
this would also apply to referencing an instance of a movieclip.
movieclipnamefromXML.play();
I hope this has been explained clearly!!??
Thanks in advance
T.
View Replies !
View Related
Problem With Calling Label In A MovieClip From Another MovieClip
Hey everyone
I started to play around with actionscript 2 to try and get it to change a movie clip using reference 1 (Attach code puts everything at bottom of page)
But now Im trying to do it using reference 2, but I get the following error:
TypeError: Error #1010: A term is undefined and has no properties.
at menu_mc/homeClick()
Does anyone have any ideas what I could be doing wrong?
Just to try and explain how my stage is set up it kinda goes like this
mainStage has both pages_mc and menu_mc on it.
menu_mc has the home_btn on it and action script from reference 2.
pages_mc has the label "homeStart" on it.
Edit : Ive been trying to trace pages_mc but Im not managing to do it I'm constantly faced with the following error :
1119: Access of possibly undefined property pages_mc through a reference with static type flash.display:DisplayObjectContainer.
Attach Code
Reference 1
on (release)
{
gotoAndStop(1);
_parent.Pages.gotoAndPlay("home");
}
Reference 2
this.home_btn.addEventListener(MouseEvent.CLICK, homeClick);
function homeClick(event:Event):void {
this.pages_mc.gotoAndPlay("homeStart");
}
Edited: 03/31/2008 at 06:16:10 AM by Gaunt Face
View Replies !
View Related
Extending A Movieclip And Calling A Nested Movieclip
Hi, I'm trying to do somthing like this:
class Timer extends MovieClip
{
// constructor
function Timer()
{
this.onEnterFrame = CountDown;
}
// CountDown
function CountDown ()
{
this.mask_mc._yscale--;
}
}
And it won't let me (There is no property with the name 'mask_mc'.)...
Alternatively, I try to do this:
class Timer
{
var __timer_mc:MovieClip;
// constructor
function Timer(timer_mc)
{
__timer_mc = timer_mc;
this.__timer_mc.onEnterFrame = CountDown;
}
// CountDown
function CountDown ()
{
this.mask_mc._yscale--;
}
}
And it won't work either...
So my question is:
How can I call a nested MovieClip from inside an onEnterFrame method (which is declared in a class that extends a MovieClip)?
Thnx,
EZ
View Replies !
View Related
Calling Upon A Movieclip
I made a scrollbar and this is at the beginning of the script:
onClipEvent (enterFrame) {
if (ini_clip<>1) {
text = "textextexetxetxetxetxetxetxetxet"
barscroll.drag = 0;
ini_clip = 1;
}
Where it says "text=texetextextextxetxetxet" I want it to go to a movieclip with the text because I want to adjust the character spacing and I can't do that with dynamic text.
View Replies !
View Related
Movieclip Calling
Is there a method u can call in actionscript to return a list or array of all the nested movieclips in a movieclip?
For example, let's say I create a movieclip on the stage called "mov_1", which contains two other movieclips inside, called "mov_2" and "Mov_3". Is there a method I can call that will return an array that contains the movieclips "mov_2" and "mov_3"?
Help greatly appreciated!
View Replies !
View Related
Calling A Movieclip?
Hi there
I have a movieclip with the following actions:
on(release) {
myinstancename.gotoAndPlay(2);
}
The movieclip with the instance name "myinstancename" is on the stage, but is invisible in the 1. frame - therefore I call it in frame 2. Im doing a portofolio with my references in thumbnails. When you click the thumbnail, you'll get the reference in a bigger view - in a "window" on stage.
But nothing happens when doing like above.
Hope you understand my question. (Im from DK, but doing the best I can)
View Replies !
View Related
Calling Upon A Movieclip
I made a scrollbar and this is at the beginning of the script:
onClipEvent (enterFrame) {
if (ini_clip<>1) {
text = "textextexetxetxetxetxetxetxetxet"
barscroll.drag = 0;
ini_clip = 1;
}
Where it says "text=texetextextextxetxetxet" I want it to go to a movieclip with the text because I want to adjust the character spacing and I can't do that with dynamic text.
View Replies !
View Related
Calling Upon A Movieclip
I made a scrollbar and this is at the beginning of the script:
onClipEvent (enterFrame) {
if (ini_clip<>1) {
text = "textextexetxetxetxetxetxetxetxet"
barscroll.drag = 0;
ini_clip = 1;
}
Where it says "text=texetextextextxetxetxet" I want it to go to a movieclip with the text because I want to adjust the character spacing and I can't do that with dynamic text.
View Replies !
View Related
Calling A Movieclip Help
Hi Chaps
I want to call a movieclip
the movieclip is called a name (e.g. box) + a number (e.g. 2). The number is stored in a variable (e.g. count)
how can i call a particular movielcip? e.g.
Code:
_root.box2.gotoAndStop(3); for example
_root.box+count.gotoAndStop(3); doesn't seem to work
any suggestions?
cheersies
View Replies !
View Related
Calling Movieclip By Name From An Array
Hi,
I've got an array in which I store the names of some movieclips. Now I want to control these movieclips from a while loop (a for-loop doesn't work because the movieclip-properties aren't supported).
This is the general idea but I can't get it to work....
-------------
// array with mc-names
arrLabels = new Array("none","lblRotterdam");
// function
function showLabel(active){
i = 0;
while (i<arrLabels.length){
_root.mcMap.arrLabels|i|._alpha = 50;
i++;
}
}
-------------
(I've put pipes '|' instead of brackets)
I've tested the while loop, it works fine.
'arrLabels[i]' works fine if I want to display the value stored in the array.
Only '_root.mcMap.arrLabels[i]' doesn't seem to work...
Any thoughts??
Thx, Pascal
[Edited by tamtam on 04-10-2002 at 04:29 AM]
View Replies !
View Related
Dynamically Calling A Movieclip...
How can I replicate this code:
tellTarget(bob) {
gotoAndStop(2);
}
in the 'dot' format:
bob.gotoAndStop(2);
where 'bob' is a MC name stored in a variable NOT A MC NAME (i.e. bob = "_root.choppy.biffer").
tellTarget is ofcourse 'dropped', but still functioning, so there must be a way of using 'dot' format to do this...but I can't find it...
View Replies !
View Related
Calling A Function In A MovieClip
Hi Guys for some reason I cannot call a function defined in a movieclip.
What i have done is created a movieclip with two functions, Checked and UnChecked.
Within the movieclip I can call the function and it works; however, when I put it on the scene and name the instance it would not work.
The functions are defined on the fist frame of the movieclip. There is a stop on the first frame. I don't image that the stop would interfere but that is why I am here because it does not work.
Code: _root.Section1.Checked();
View Replies !
View Related
Calling A Function From A Movieclip
Hi,
I have a function on frame 1 which moves the mc across the stage to the center.
I am calling the function from the mc as an On(Load).
The script to move the mc is moving all objects on the stage, it is not targetting the mc on its own. I can't get it to target the mc alone.
Any ideas?
View Replies !
View Related
Calling A Movieclip In An Array
Hi Everyone,
I'm using Flash MX and I'm very much a beginner.
Any ideas how I can tell a movieclip in an array to gotoAndPlay a certain frame?
I was guessing something like this:
_root.cardsClicked[0].gotoAndPlay(3);
cardsClicked being the name of my array.
Thanks,
Alun
View Replies !
View Related
Calling Out Timeline In A MovieClip
Flash 8
Ok I have a button that is when you press it gotos 46 and plays the animation.
that works fine. But....
I have also Calling a frame in a movie clip to display that frame.
This frame im trying to call out is the content of the website.
So there has to be diffrent frames for these pages.
Code:
on (press)
{
_root.gotoAndPlay(46);
}
on (release)
{
this._parent.pages.gotoAndStop(2);
}
The name of the movie clip is called pages.
If i dont put stop in the first frame its shows the first frame along with others.. You know( Flash back and forth thru pages) But if i put stop(); then it will not engage to the frame im trying to call out.
if this doesnt make scence to you please fell free to add me On MSN
rodgerjr@comcast.net
View Replies !
View Related
Calling GotoAndPlay Of Another Movieclip
I have trouble with the following code. Actually I'm trying to drag a movieclip to a particular target. On release I need to create a duplicate movieclip and then play an animation in it, while sending the original movie clip back to its original position. But the this.gotoAndPlay(1) is not working. It just goes to that particular frame and stops. Please help
Here is the sample code
ball.onPress=function()
{
startDrag(this);
orig_x=this._x;
orig_y=this._y;
}
ball.onRelease=function()
{
stopDrag();
duplicateMovieClip(this,"ballmc01",this._parent.ge tNextHighestDepth())
thismc = this._parent["ballmc01"];
thismc._x=this._x;
thismc._y=this._y;
thismc.gotoAndPlay(1);
this._x=orig_x;
this._y=orig_y;
}
View Replies !
View Related
Calling Functin In Different Movieclip Mc
This is the setup I have
controller.swf
Frame 1 has
function tracemytext();
{
trace("bla bla bla")
}
controller.swf has a mc in it
frame 1 of mc has actionscript code
tracemytext();
now I want to call the function tracemytext(); which is in "parten" movieclip.
This does not seem to work.
Regards Marskus
Any idea
View Replies !
View Related
MouseEvent Not Calling On A Movieclip.
I have an enemy whom when he is clicked should take damage.
The problem I'm having is when I assign the listener:
addEventListener(MouseEvent.CLICK, check_for_click);
it refuses to work.
If I make it:
stage.addEventListener(MouseEvent.CLICK, check_for_click);
It works. The problem although the event handler is on the enemy but the stage. I just don't know why my enemy MovieClip refuses to work.
Code:
I can upload my code if someone could take a peek at it for me.
There is something I don't know about event handlers I think.
package {
import flash.display.MovieClip;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.text.TextField;
public class Enemy extends MovieClip
{
public var engine:MovieClip;
public var aka_name;
public var jail_cell; // which cell I'm in
public var life;
public function Enemy(parent, enemy_name, jail_cell)
{
life = 3;
engine = parent;
this.jail_cell = jail_cell;
aka_name = enemy_name;
aka.text = enemy_name;
engine.addChild(this);
addEventListener(Event.ENTER_FRAME,on_every_frame);
stage.addEventListener(MouseEvent.CLICK, check_for_click);
}// class contructor
function on_every_frame(e:Event):void
{
this.x ++;
// check to see if cursor is over enemy
engine.reticle.check_for_enemy(this)
}
function check_for_click(e:MouseEvent):void
{
//check to see if enemy was hit
if(engine.reticle.check_for_enemy(this))
take_damage();
}
function take_damage()
{
if ( life != 0)
life --;
else
death();
}
function death()
{
this.visible = false;
}
public function move(x,y)
{
this.x = x
this.y = y
}// move
}//class
}//package
View Replies !
View Related
Calling A Movieclip From The Library
Hello everyone.
I'm going through the Actionscript 3 Animation, Making Things Move book. I'm working with the IK examples in Chapter 14. I want to replace the graphic of an IK chain segment with my own. The example uses an AS file which uses the Drawing API, I want to use a graphic from Illustrator. I can't figure out how to call a Movieclip from the Library in AS. The code for the files is:
ActionScript Code:
package {
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
public class OneSegment extends Sprite
{
private var segment0:Segment;
public function OneSegment()
{
init();
}
private function init():void
{
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
segment0 = new Segment(100, 20);
addChild(segment0);
segment0.x = stage.stageWidth / 2;
segment0.y = stage.stageHeight / 2;
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
private function onEnterFrame(event:Event):void
{
var dx:Number = mouseX - segment0.x;
var dy:Number = mouseY - segment0.y;
var angle:Number = Math.atan2(dy, dx);
segment0.rotation = angle * 180 / Math.PI;
}
}
}
I want to replace Segment with my movie clip.
Any ideas? Thanks, A.
View Replies !
View Related
Calling A Dynamic Movieclip
I am trying to loop through and fill 15 movieclips with thumbnails. I want to know how to target the movieclips dynamically... here is what I have: boxes.box1.BoxPhoto.loadMovie(this.picHolder.attri butes.thumb);
and here is what I want to do:
boxes."box"+i.BoxPhoto.loadMovie(this.picHolder.attributes.thum b);
i know this is the wrong syntax because it is giving me an error, so how can I do this?
please help
Thanks
View Replies !
View Related
Calling A Function From Within A Movieclip
How do I do this, and Is it wrong to do it this way?
I have a movieclip on the timeline and within that movieclip it has buttons which I've placed listeners. I'm doing it this way rather than putting the code in the document class because the buttons don't appear right away in the movieclip (not until around frame 10). The function is defined in the document class because it is used with other movieclips.
Anyone have an idea on how to properly do this?
View Replies !
View Related
Calling A Function In A Movieclip
I want to call a function that I define in a movieclip so that I can access the variables in the movieclip.
So, outside of the movieclip I want to do mc.myfunc(4, 5) and then the movieclip has a function called 'mc' that takes two arguments. How to do this? I have tried defining functions in the first frame of the mc but to no effect.
I'm using attachMovie so that may be why I can't call myfunc, so how to get around it?
Thanks!
View Replies !
View Related
Calling Inside-movieclip-functions
Hiya!
Here's what I've got:
Inside Movieclip("menu") on frame 1 there are two functions I'd like to call from outside of the movieclip.
my trusty '"Action Script Reference Guide" tells me you may call functions from anywhere in the timeline, provided you acces them with the correct path.
Okay, so : _level0.menu.myfunction(); right?
Wrong. It don't work.
Please help,
View Replies !
View Related
FlashMX Calling Scene From A Movieclip
hiya all,
i am looking for the ways on how to control a movie if it has several scenes and the buttons are in a movie clip?
what i get always is a next scene command instead of that name i am typing in action palletes window
any help would be greatly apprecited
ciao
_hr
View Replies !
View Related
Calling A Function In An External Movieclip ?
Hello
I've been searching for some time now how to solve a problem, and I don't understand at all what I've done wrong, so here we go...
I've got a flash movie (simple_flash.swf). In this movie (only one frame), there's this :
code:
function simple_function(var1, var2) {
//do some great things
}
I load this movie from another movie (the main one) like this :
code:
//id contains something like "external_movie"
//z contains the z-index value for the new movieclip
_root.createEmptyMovieClip(id, z);
var my_object = eval("_root."+id);
I load my external movie clip using a movieClipLoader :
code:
//url is the path to simple_flash.swf
//my_object is the same as above
my_movie_loader.loadClip(url, object);
My movie shows up as expected, but I can't manage to call the function simple_function. I've tried this :
_root.external_movie.simple_function(x,y);
or
_levelxx.simple_function(x,y);
(I know xx), but nothing...
If I call trace(_root.external_movie), my movieclip is here, but trace(_root.external_movie.simpl_function) is undefined...
What's wrong ?
Thank you
View Replies !
View Related
Calling A Function From Inside A Movieclip
I've already posted this in the xml-forum, 'cause I hoped to find people, who know this tutorial, but i guess it's better suited here.
I've been playing around with Flashscript.biz's xml database tutorial and I thought I understood the basics of it, but now I tried to have the Model-Name-Buttons in their own Movieclip and the Results on Frame 2 of the main timeline.
The script I attached to the Model-Name-Buttons in the mc is this:
code:
on (release) {
_root.gotoAndPlay(2);
_root.showModel("kim", "fmodels.xml");
}
which doesn't work(it goes to frame 2 but doesn't show the models/execute the function), i've already tried defining the function within in mc that contains the buttons, but that didn't help either... argh.
So what am i missing?
Help, please... thanks
View Replies !
View Related
Issue Calling Functions Within A MovieClip
I have a movie clip on my main timeline. I am attaching other movie clips to the main movie clip on my timeline. Here is the code:
Code:
map_mc.attachMovie("Marker", "Markers"+i, map_mc.getNextHighestDepth());
map_mc["Markers"+i].SetUrl(XmlPreferences.firstChild.firstChild.firstChild.firstChild + String(ID));
map_mc["Markers"+i].SetText(Left, Name);
map_mc["Markers"+i]._x = X;
trace(map_mc["Markers"+i]._x);
map_mc["Markers"+i]._y = Y;
I have done traces and X, Y, Left and Name as well as the Xml data I'm reading in has values, yet when I attempt to call my functions (which are defined inside of the Markers movie clip) they don't actually get called (It's just a simple trace ("YOU CALLED ME") inside of them).
What am I doing wrong? I've taken several Flash courses and have made several games with litterally almost the EXACT same code so I don't know what's wrong. Oh and I do have Linkage setup properly. I am also using Flash 8 but am targetting Flash 6 (though it does the same when targetting Flash 7 or 8)
View Replies !
View Related
[F8] Calling A Movieclip Instance From Xml Data
don't ask why i would want to do this, but if i were passing an instance name of a movie clip via xml, how do i call that in my flash script? For example, below, after my xml is loaded, i see the correct instance name, but my syntax in calling it is a bit off ( i am get a bit disoriented trying to learn as3 now! ha):
Code:
//AS2 script:
var bt=buttons[i].attributes.instance
trace(bt) //gives string name- which is very long _level0.CONTAINER_E.pages.p3.page.pf.sph.ph.pic.pic.container.instance14.btn_1
var bt_url=buttons[i].attributes.url
if(bt)
{
bt.onRollOver=function()
{
trace("hey man, you are on a button!!")
removeZoomAtributes(false)
}
bt.onRollOut=function()
{
ZoomReady()
//ob.onMouseDown=zoomOut;
}
bt.onRelease=function()
{
getURL(bt_url,"_blank");
}
}
View Replies !
View Related
Calling A Function Inside A Movieclip
I guess this is pretty basic, but it's giving me a headache by now, and I can't seem to find an answer anywhere.
What I need to do is basically to call a function, and/or change a variable inside a movieclip. This needs to be done from the main timeline (_root??).
For simplicity's sake lets say the movieclip code looks like this:
Code:
_content = "Lirum larum";
function test()
{
this.test_txt.text = _indhold;
}
The I would think I should be able to call that function from the mail timeline, with the following:
Code:
test_txt_instanceName.test();
Only I can't. What am I doing wrong here?
View Replies !
View Related
Calling A Function Outside A Movieclip From Inside One..
hopefully that's not too confusing:
I have a function I made in the root timeline.
Inside of a movie clip, I have a button which calls the function in the actions layer in the root timelime..
how do I make this work?
ActionScript Code:
//IN ROOT TIMELINE:
function modify(PARAM1, PARAM2):void
{
function does stuff here;
}
//Within a MovieClip
click_mc.addEventListever(MouseEvent.CLICK, onClick);
function onClick(event:MouseEvent):void
{
modify(Param1, Param2); //Param1/2 just an example
}
modify isn't being found. using root.modify or parent.modify isn't working...
what am I missing here?
View Replies !
View Related
Calling MainTimeline Function From MovieClip
Currently switching from 2.0 to 3.0 and having a simple problem. In 2.0 if I wanted to call a function on my main timeline from a movieclip, all i would have to do is type
parent.myFunction();
In 3.0 this does not work, and i cant find the conversion anywhere. any help would be much appreciated
View Replies !
View Related
Calling A Movieclip On Stage From A Subclass?
Is it possible to reference a predetermined movieclip object on the stage from a function within a subclass?
I have a document class which is then calling a subclass and within the subclass I have a function that I would like to change the properties of a movieclip on the stage.
can this be done?
View Replies !
View Related
Calling Function On A Contained MovieClip
Not sure if this is possible however, my current project requires this functionality…
Overview: user goes to webpage and based upon their profile, they get a Questionnaire as some content of their Flash Movie. The Questionnaire is an SWF file that is retrieved from the server and displayed by the containing Flash Movie.
The < Next > button is on the Movie, not inside the Questionnaire. When the user presses the <Next> button, I need to get the user’s responses from the contained SWF questionnaire and send it to the server.
Is it possible to add a function to the SWF, say GetResults(), which will gather the user’s input and return it back to the container Movie for further processing???
In Java/C++/etc, I’d declare an interface and have all the Questionnaire SWFs implement this interface and could even check the type of the SWF (is a) and then invoke a function defined in the interface.
Is there another way to do this in Flash if this won’t work??
TIA,
geo
View Replies !
View Related
Calling A Function In An Attached MovieClip
I am trying the following, but it seems like the function is not getting called. If I trace it, it returns an undefined. What am I doing wrong?
Thanks a lot for any help.
this.attachMovie("team_" + whichProfile, "team_" + whichProfile, this.getNextHighestDepth());
var teamProfile = ["team_" + whichProfile];
this[teamProfile].fadeInPhotos();
View Replies !
View Related
Quickie: Calling Movieclip Methods
ok, am i going incredibly nuts or what? I have a movieclip on the stage that has an instance name of 'rightClip' which has a method called dial(numIn). I would have thought I could run this method from the root timeline by saying
Code:
rightClip.dial("354651681");
But evidentally not, as that doesn't work.. what will? the method works fine if called from within the movie clip as just plain dial("38463581"); but obviously that means i can't control it from the root and can't have two of them running with different parameters.
View Replies !
View Related
Calling A Method In A Movieclip From The Root.
Hi,
I'm new to flash and actionscript and need a bit of help.
I created a movieclip and placed it on the stage. The movieclip is called markLoader_mc. In the markLoader_mc I created a function on frame one of the timeline. Here's all the code in frame one:
Code:
stop();
function LoadPic(pic:String){
loader_mc.loadMovie(pic);
gotoAndPlay(2);
trace(pic);
}
loader_mc is a movieclip that is just there to show jpg files.
The rest of the timeline for markLoader_mc updates a status message "xx% loaded" and a progress bar (frame 2 and 3). Frame 4 turns of the progress bar and text message. It's just a simple movieclip I want to use as a holder for jpg files that has a built in progress bar.
The idea is to call the "LoadPic()" method from the root timeline and the markLoader_mc will show the progress and load in the jpg.
If I hardcode:
Code:
loader_mc.loadMovie("test.jpg");
in frame one of markLoader_mc (instead of executing the function) everthing works perfectly. But when I try to call the function from the root timeline it is never executed.
Here's how I'm trying to call the function. This is from the root timeline:
Code:
_root.markLoader_mc.LoadPic("test.jpg");
I've tried all types of dot syntax to try to get to the function but nothing seems to work. What am I doing wrong??
I've tried
this.markLoader_mc.LoadPic("test.jpg");
markLoader_mc.LoadPic("test.jpg");
I even tried using the with statement:
Code:
with(this.markLoader_mc){
LoadPic("test.jpg")
}
help!
View Replies !
View Related
Calling Function From OnRollOver In Dynamic MovieClip
I'm having some trouble calling a function from the "onRollOver" event of a dynamically created mc.
In the code below, I've created a mc inside another mc in the function "makeMyMovie". This works fine. Problem is in the "onRollOver" I'm trying to call "testFunc()" but it doesn't reach there.
I know the "onRollOver" works because 'trace("A")' works.
code:
myClass.prototype.makeMyMovie = function() {
this.mymainMov = createEmptyMovieClip("mainMov", 2);
this.mymainMov.createEmptyMovieClip("mc1",i+10);
// content of mc is created here
this.mymainMov["mc1"].onRollOver = function() {
this.testFunc();
trace("A");
}
};
myClass.prototype.testFunc = function() {
trace("testing");
};
Any ideas would be greatly appreciated...
View Replies !
View Related
[MX04] Data Type For Calling A Movieclip
Hi.
I have a super simple question for you all.
I'm using the Tween class and would like to dynamically call movie clips.
All the movie clips are in the stage, labeled page1, page2, etc.
Now, when I try to pass variables in the function call, the Tween class doesn't seem to recognize which movie clip I'm calling.
Here are my actions in a nutshell. Assume they're all labeled:
function moveclip(a) {
new Tween(a, "_x",....);
}
button.onRelease = function() {
page = page + pagecounter;
moveclip(page);
}
When I do a trace in the function call, it shows the right movie clip label, but the Tween action doesn't seem to recognize which movie clip it is.
Need help on how to convert "page" into a format or string that the function call can recognize. Should I parse it or something?
TIA
View Replies !
View Related
Calling Loadmovie From Within A Movieclip Class Object
Okay, i'm having a weird problem which i'm hoping someone will be able to shed some light on.
I've written a class - Symbol - that extends the movieclip class, and I have an object in the library which is asigned to this class.
Various instances of this object are created on the stage (by another class).
The object then loads an external swf, using loadmovie, into itself. At this point, the object loses it's functions and properties... it's no longer the Symbol class i've defined. In particular, I have set mousover properties which no longer work, but like I said, its seems to no longer be a Symbol object.
To get round that, I tried deploying an empty movie clip inside the object of my Symbol class, and loading the external swf into that instead so as not to overide the object itself, but the same thing happens.
I have even ensured that I place the empty clip that the SWF loads into beneath another layer with an alpha of 0, within the Symbol object. This in an attempt to ensure that something of the object itself is above the external swf so its mousover functionality can execute, but no joy.
Can anyone help me? So much thanks in advance (and more to come).
View Replies !
View Related
Calling Event Listeners Inside A Movieclip
I'm migrating over to actionscript and I'm having issues.
I have a movieclip and I'm just trying to see if the even is working
sandbox (mc)
- ball (mc)
Code:
The following code is in frame 1 of sandbox movieclip
ball.addEventListener(MouseEvent.MOUSE_OVER, rollOver);
function rollOver():void
{
trace('Testing');
}
I'd expect a trace on roll over but I get:
ArgumentError: Error #1063: Argument count mismatch on sandbox::ball_3/rollOver(). Expected 0, got 1.
View Replies !
View Related
Problem Calling An Existing Movieclip Instance
hi
i dinamically create movieclip instances using createEmptyMovieClip; they are created and i can see them in the debug panel just fine.
instances are named using the following structure,
_level0.diagram.childs.child0
_level0.diagram.childs.child0.childs.child0
_level0.diagram.childs.child0.childs.child0.childs .child0
_level0.diagram.childs.child0.childs.child0.childs .child0.childs.child0
_level0.diagram.childs.child0.childs.child0.childs .child1
_level0.diagram.childs.child0.childs.child1
_level0.diagram.childs.child0.childs.child1.childs .child0
_level0.diagram.childs.child0.childs.child2
problem is i can only target instances with child*0*, other than *0* it doesn't work!
for example,
Code:
trace(_level0.diagram.childs.child0.childs.child0);
works a treat, instead
Code:
trace(_level0.diagram.childs.child0.childs.child1);
doesn't! it returns undefined
i'm having a real hard time trying to understand what is going on, *please* any ideas/pointers are very, very much apreciated.
cheers
mat
View Replies !
View Related
|