Can An .as File Call A Movieclip Instance
Aug 14, 2010
I have want to tell a movie instance to play from a class:
`package com
{
import flash.display.MovieClip;
public class Global extends MovieClip
[code]....
pic1m is the class, but I get 1120 undefined property error.If I just put pic1m.play(); in my main timeline action layer it works fine, but I need the function playMask to be global in AS3...
View 1 Replies
Similar Posts:
Sep 16, 2009
How would you add a listener to an object inside of a movieclip that is in the library and as not been placed on the stage yet? Or, could you tell it to listen for when it does go on stage if it does come on the stage and when it comes on the stage to add an eventlistener to a movieclip inside of that?
View 3 Replies
Jan 23, 2003
Is it possible to call an instance of a movieclip by a variable name?
Say I have several movie-clips on the main timeline and a variable named "disabled". I want to click a button and have be able to tell "disabled" to goto frame 2, where disabled will contain the name of the movie-clip. can I do this?
View 3 Replies
May 21, 2008
how can i call all buttons within a certain movieclip (without naming each instance individually)?
View 5 Replies
Sep 20, 2009
I just want to ask if is it possible to call a movieclip using the String Class together with it's instance name to use gotoAndPlay() method. I know how to use the instance name and the method but then what if I want to use a string together with the instance name and the gotoAndPlay.
View 1 Replies
Jun 1, 2011
I have a movieclip instance named 'placeholder' on the canvas, and I want to change the alpha of the named movieclip from it's class without effecting the alpha of all the movieclips of the same type. How would I specifically target the named movieclip instance that is on the canvas?
View 3 Replies
Jan 26, 2009
I have a general / somewhat newbie question. Is it better practice to call a function from another class like so:
[Code]...
Does one way free up more memory or enhance performance?
View 5 Replies
Nov 18, 2010
I have a m.c. calling for a swf file as such:
Actionscript Code:
mcl.loadClip("splash.swf", emptyMC1);
How do I get it to call for a html file instead??
View 1 Replies
Dec 12, 2009
me only still learning as3, i've checked google there and back, but somehow i can't find the answer for this: how to target a movieclip instance which is already on the stage from within a class file? i mean, targeting it from the document class file is easy, but what is i want to target it from another class file?
View 2 Replies
Oct 6, 2009
I have searched the archives here, but cant get a clean answer on this.I am loading an external SWF sucessfully, but I need to manipulate a MovieClip instance within that external SWF from the main file.
Code:
// SLIDE 1 IMAGE LOADING
var slide1Loader:Loader = new Loader();
var image1:URLRequest=new URLRequest("slides/1.swf");
slide1Loader.load(image1);
slide1.slideImage.addChild(slide1Loader);
That is the successful code to bring it in - but now I need to be able to use a movieclip within it called COPYMC
View 4 Replies
Dec 31, 2009
I am in the middle of trying to create an swf that allows the user to upload an image into the flash file and manipulate it in several ways using actionscript 3 and flash cs4. (ideally if possible keeping the flash player needed at 9 or lower).I have solved most of the photo editing side, but am having trouble uploading any photo into the flash file. I have looked into the 'getfile reference' class and also the 'oncompletedata' but havent got it working. Can anyone help? I need the user to click on the upload button on frame one which will upload the file to the server and display it on frame 2 in the empty_mc (instance of myObject) Currently i have a random jpeg image in its place.
Originally i intended to use an html form and php upload script to do all the uploading then send the url link into flash but again cannot come up with a way for this.This successfully uploads my image onto the server in the 'images' folder but how do i get this into my swf?
View 8 Replies
Nov 21, 2010
I've been searching around all afternoon, and am pulling my hair out. 1) I have a movieclip instance on stage (simple graphical element that represents platforms for a hero to run and jump along). I have placed it on the stage with an external class engine.as and in this class it is called myPlatform and is an object of Platforms.as. The movieClip is called platforms and from a trace(myPlatform.name) the instance name is instance3.
2) I am attempting to access the properties of myPlatform in an Enterframe event loop in my character control and collision class (called hero.as)
Basically here is the bit of code I am trying implement within Hero.as :
[Code]...
This all worked when I was writing actionscipt within the FLA file, on the timeline frame 1. I simply don't know how to access myPlatform from within the external Hero.as class! Do I need to create a variable? Is there a really easy way to do this with some syntax/command that I have not learned yet?
View 3 Replies
Sep 14, 2011
I have a movie clip with an actions layer. Can I call a function from an actionscript file from the actions panel?
View 2 Replies
Oct 27, 2008
How can I call the instance name of a mc? For example in AS2 I would do: this._name How do I do in AS3?
View 3 Replies
Sep 25, 2007
I am using Flash2004 MX
I thought this would be simple, but it hasn't been.
I have a seris of hidden MCs named star1, star2 etc.
I want them to become visible when I call this function.
star_fn = function() {
starcount++
starshow=("star" + starcount)
starshow._visible=true
}
But it is not working.
I thought maybe it was like converting variable info to a number format, but using a text scenario instead.
View 5 Replies
Feb 8, 2009
configuring this instance movie to play when i click a button, here is my movie structure:
- root movie - container and some external .swf movie
The process is there will be button load at the end of root movie, and calling some external swf movie with number. all the swf will play in a container each swf movie(about 5 animation)
At the end of root movie there is also some loop animation that play at the end of root movie, while we can click the button also.
What i want to do is how can i play the loop movie, start from the middle when i click one of the button.
So what happen will be: - click button = external movie load and the instance name play from frame 100 and loop again.
View 3 Replies
Jul 7, 2009
i have a main movie. i use a loader to load a "example.swf" file. then i place that file inside a holder movieclip. in example.swf, i have an instance of a class i just wrote. this class has some particular methods. from my main movie, i want to call the methods of the instance of my class i have in example.swf. how can i do that??? i know it's a kind of casting, but none seems to work.
View 1 Replies
Oct 15, 2009
From my Main class, in the method onBackgrLoad, I am trying to call a couple of public methods (i.e. xmlData, hintergrund & numOfProducts) located in LoadXML. I keep receiving an error message that "loadXML" is undefined. I dont understand why because I clearly defined it in the main class:
PHP Code:[code].............
View 2 Replies
Apr 27, 2009
When I try to use this code to call a function for every instance of a certain class I get an error saying that there is a "call to a possibly undefined method removeInstance through a reference with static type flash.displayObject".
Code:
for (var i:int=0; i<=numInstances; i++) {
if (numInstances!=0&&getChildByName("b"+i)!=null) {
getChildByName("b"+i).removeInstance();
}
}
View 2 Replies
Dec 7, 2010
I've created a button in my stage. I've set the instance name to init and have the MainTimeline being called from an an external script[code]...
View 2 Replies
May 25, 2005
I'm trying to reference an instance through the use of a variable in my call to a prototype. The variable is myVar and contains the instance name to which I want to apply the resizeTo prototype. My syntax is incorrect.
Code:
on(release){
//disregard this line
this.swapDepths(this._parent.getNextHighestDepth());
//this is calling a prototype named resizeTo
this.resizeTo(150, -100, -100);
//Setting instance name of another movie
myVar = "green";
//Trying to drop that instance name into my next prototype call
this._parent.myVar.resizeTo(100, _parent.old_X, _parent.old_Y);
}
View 2 Replies
Jan 3, 2006
I have 35 textboxes with the names "t1" to "t35". How would I call these names in a for loop? I have tried this with no luck:
[Code]...
I know I'm doing something wrong with the ("t"+i) but I dont know how how to combine a string and number like that.
View 7 Replies
Apr 8, 2010
one of my problem is that how do i call the instance name of a button from my child.swf to my parent.swf
i have four buttons from my child.swf where when i click btn1 it will load superchild.swf but i want to load that superchild.swf to my parent.swf, like instead btn1 calls superchild.swf to load, btn1 will call parent.swf then on parent.swf it will distinguish that btn1 was click from child.swf and it will now load superchild.swf.
View 3 Replies
Sep 15, 2010
If an object, or say... a document class, creates an instance of a class (and stores it as a variable), and it doesn't pass any arguments to the constructor of the class, can that class object, by simply having a function of it called by the parent, tell who sent it that command/request? In other words, can a class object know who called it (such as it's parent) via a (seemingly) anonymous call?
View 1 Replies
Feb 8, 2009
How can I get the instance of the class to call the dispatchEvent for the postTrace function.
1180: Call to a possibly undefined method dispatchEvent.
Code:
package {
import flash.display.*;
import flash.events.*;
[Code].....
View 1 Replies
Jan 14, 2012
For some reason, the same code works now, without any problem at all. I don't know what happened, or why, but I no longer have this problem Here's the original post: To put simply, I created a MovieClip, put it with addChild() to stage, and when I tried to call this piece of code:
[Code]...
View 2 Replies
May 28, 2011
how can i access a movieclip via its instance name in another Movieclip class?
and a nother question how can i access a movieclip via its class name in another movieclip class?
BTW i want to access the movieclip child
View 4 Replies
Jul 17, 2011
I am trying to make a reference to a movieclip instance that is in another movieclip.
Here's the deal: I have a main timeline for different pages of a website...then within that I make all of the art on each page into a movieclip so I can do animations every time that main timeline frame is called to, yet still keep my main timeline clean.
Within one page's movieclip I have a few buttons that I want to use to go to other pages by referencing them on the main timeline.I have been using this: (home_about is the about us button on my home page, and frame 31 is on the main timeline).
home_about.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_6);
function fl_ClickToGoToAndPlayFromFrame_6(event:MouseEvent) :void
{[code].............
Since this home_about is within another movieclip,I get the access of undefined property error. Do I need to change the code I've pasted above or add in variable definitions to fix this?
View 1 Replies
Oct 24, 2007
how do you call an onClipEvent(enterframe) of a movieclip to happen when that movieclip is pressed?
[Code]...
when i type this in i get an error because on events cannot be nested within other on events. how can you get around this?
View 10 Replies
Feb 2, 2005
If I have a piece of a function that is telling Flash to:
// show a hover color
var col = new Color(this.background);
col.setRGB(0xf4faff);
How do I tell Flash to call a MovieClip as opposed to setRGB for the background MovieClip?
View 4 Replies