ActionScript 3.0 :: Access Movie In Other Funtion?
Mar 28, 2011I am just simplifying my senario here.I have function that loads movieclip in loops[code]...
View 5 RepliesI am just simplifying my senario here.I have function that loads movieclip in loops[code]...
View 5 RepliesFlash cs4.
What I need to do is make a search function that will find items within the site it self.
Example...
if I have like 100 folder and all are numbered but I dont want to scroll I want to just type 86 and it should go there.
so i have a flash script that was working fine but now i got an error that i dont realy get
Code:
TypeError: Error #1006: appendText is geen functie.
at Twitter_Main/loaded2()
[code].....
loader_ary[i].contentLoaderInfo.addEventListener(Event.COMPLETE, loadyLoaded);I would like to have access to the variable "i" inside the function loadyLoaded.what code would i need to useto return i or atleast the name of loader_ary[i] and slice it or something.
View 9 RepliesI used a script like this to randomise a background graphic:
function randomBg() {
randFrame = random(3)+1;
bg_graphics.gotoAndStop(randFrame);
[code]....
how a function can be called at regular interval for limited times in AS3.0 and one more thing the timer should not be started automatically. I have to trigger that method.
View 7 RepliesI have a scolling menu, that works wraps around and everything, all nice and pretty.When I place a get url on the button state the url opens,When I place a goto on the button state nothing happens, the supposed scene is a no show.(I have also tried this on the mouse down in the MC state with the same results)I started the scrolling images as buttons then f8'd again and converted to MC's...the MC's have a zoom funtion on them, btu i removed it to see if that was a possible cause to no avail.
View 7 RepliesI've got a simple program that consist of a document class and a buttonTemplate constructor class. I need to call a function called updateText that should be in the document class, when someone clicks on a button. My event listeners for the buttons are in the buttonTemplate class. My question is, how do you call a function in the document class from a constructor class? Here is my simplified code below
DOCUMENT CLASS
Code:
package {
import flash.display.MovieClip;
import flash.text.TextField;
[Code].....
i got a school flash project where i need to access the _y properties of many movie clips buttons that set with name like sel 1 sel2 sel 3 and so on the problem is i have 2 sets of those, one on the main timeline which i can access with "for" looped _root["sel"+i]._y and one which is inside another movieclip problem is i don't know how to access the later using for loop? this is the script that i used to access the _y on the _root.selx
[Code]...
I have a movie, let's say MainMovie. Within this movie I have another movie, let's call it MovieWithin.
I have a few variables in the MainMovie such as MyColour, MyHeight, etc.
In the MovieWithin, I want to place the following code:
onload()
{
ThisColour = _root.MyColour;
ThisHeight = _root.MyHeight;
}
So that when it loads I can pass variables to the movie. But this isn't working for me!
It seems that I can access variables going in one direction, but not in the other.
For instance if I was in the MainMovie, and had a code such as: MyHeight = this.MovieWithin.ThisHeight
Then this would work absolutely fine! But if I try to access variables in the other direction, from the inner movie to the outer movie, it just won't have it!
I've tried the _parent technique with no joy!
Basically I want to be able to load several movies (not at the same time!) into my MovieWithin, but be able to control their state on loading by accessing the variables in the MainMovie.
i made a movie clip name floor, and inside it are movieclips called plan0, plan1, plan2, plan2, and so on.
so to make it easy, it put the movieclips inside the floor movieclip into an array, like this:
daFloor = new Array();
for(a=0; a<10; a++){
daFloor[a] = "plan"+a
}
[Code]....
both didn;t work. how to access the inside movieclips through array;
I have a main swf called, main.swf; Inside it I load another movie, skin.swf (this has 10 movieclips in the library with linkage name). What I want is to attach the movieclips from skin.swf inside the main.swf.
But problem is I am not able to attach the movie clip in the main.swf from skin.swf.
I work for an equipment planning firm and we subscribe to an organizational tool which allows us to build projects and add the items we are planning to buy to each project. The company who offers this product keeps all of the project data as well as the equipment library in a database on their servers. Up until recently, this information was displayed to us using a normal website using HTML and javascript and would access the database when it needed to. Now they are upgrading to a flash based movie which is used as the interface and it still accesses the database to display the proper items for each project and to access the equipment library. Since this is a 3rd party company, I do not have access to the actionscript they use but is there a way I can control the movie with some sort of programming. In the past, I've used visual basic to send commands to the website and I could automate a huge list of tasks which would ordinarily take a long time. Is there anything comparable to doing this in a flash movie? It can be any programming language.
View 1 RepliesI wonder how can i find the place or the target of a movie clip i working in.So, i have a movie clip on frame 50 of the root flash;=> On that movie clip 'player' i have a mediaDisplay with an instance name 'video' and in the some movie clip i have another mc 'play'so, how can i access to instance video from mc play.
var = '../.video'
and
var = _root.video.player.video ;
[code]....
I have created several movie clips in a loop.
Code:
for (var i:int=0; i<externalXML.videoClip.length();i++){
var linkHolder:MovieClip = new MovieClip();
[code]......
For some reason I can't access the timeline of the movie i'm loading.currently, I have a swf (we'll call it "loadME") to be loaded. it sets a _global variable for the timeline like so:[code]the actual content loads, but I just can't seem to access its timeline. I should mention that the _global.mainTimeline is a movieclip on the stage of the clip to be loaded.
View 2 RepliesI'm making obstacles for my game, and basically what I have is a movieclip called char on the maintimeline and a movieclip called floor.. within the movieclip floor i put a movieclip called obstacle in. What I want to do is check to see if char hit obstacle, so itd be like hitTestObject(floor.obstacle) then make the main timeline go to frame 2..
View 1 RepliesI have an mc called parent_mc.. inside that is child_mc... now if i do in AS2
parents = new Array();
childs = new Array();
parents = [parent_mc];
[code].....
I'm designing an interface which lets the user control the timeline of a movie clip, by dragging a slider up or down with the mouse. And I can now drag the slider around, an archivement for which I am way proud. But I have some problems:
1) When the user drag the curser away from the slider movie clip and let go of the mouse buttom, the MOUSE_UP is not detected. I need a way to detect a MOUSE_UP in general.
2) The current frame of mcTheAnimation should always be locked to the vertical position of the slider. How do I access the timeline of that movie clip?[URL]..
I am quite new to flash, basically i have a slide show running automatically which displays pictures on a timeline and also have buttons associated with each photo to display that picure when it is clicked I have added so text to show which each slide bit i want the text to become a hyper link to a website but for some reason it does not work
I have attached the *.swf unfortunately the forum wont let me attache the *.fla file
1) i tried using static text and the in the property inspector in the url section inserted the url it should target, then
2) i tried setting it to a dynamic text so that i can make use of the instance name within actionscript by doing this
say instance name of the dynamic text is called "myText" i used this code which i know it works[code]...
I am setting up a Flash based MP3 player control (The standalone version of WordPress Standalone Player). I have a situation of multiple windows with players open. One window opens the other, so I have the window.opener property available. When the child window is opened, I want to programmatically mute the audio player in the parent window.
This works in Firefox, but not in IE 7 and 8. I know little about Flash/Javascript interaction and I'm stuck. I am not getting any error messages. To do this, the player SWF object has a setVolume() and close() function. These functions are not defined anywhere in Javascript so I guess that those are provided by the Flash object. This is supported by the following lines I found in the Flash source code of the player:
[Code]...
Is it possible to access a movieclip inside an external swf (.fla file), using data from a vector?
The following code works correctly:
this._graphics.message2_mc.textLabel_txt.text = "Test";
Where as when I loop through a vector and try to replace "message2_mc" it cannot find the movie clip:
for(var i:uint = 1; i <= this._playlistState.subMovieVector.length - 1; i++)
{
var movieName:String = this._playlistState.subMovieVector[i].movieName;
this._graphics.movieName.textLabel_txt.text = "Test";
}
Presumably this is because I am putting a string in the middle of the line of code accessing the movie clip?
Im trying to simply access a movieclip (movieclipB) which is nested inside another movieclip (moveclipHome). This parent movieclip (movieclipHome) has two key frames inside, one that contains movieclipA on the first frame and movieclipB on the second frame. I can easily access movieclipA on the first frame of the movieclipHome by using the following syntax[code]...
View 2 Repliesso let's say that i have a movie clip called button_mc on stage in a file called test.fla
how can i access this button from a class (eg: test.as ) to addeventlistener to it
i have this code in an as layer within a movie clip called pages
ss_btn.addEventListener(MouseEvent.CLICK,reportCli ck);
function reportClick (myevent:MouseEvent):void {
// do something in response
addChild(img_holder);
removeChild(img_holder);
but the ss_btn im trying to access is within another movie clip called menu is there a way i can access the button
I have 2 .swf
main.swf
application.swf
main.swf loads (using Loader Class of course) application.swf So, i need to do 2 things into main.swf BUT from application.swf I have in main.swf
* BlackBgMC (MovieClip), with a Shape Tween, in Stop on Frame 1
* A Close Buttom that i put invisible in Frame 1
So, FROM .... application.swf in a some point (example Frame 10) i need to get Play the BlackBgMC (that is on main.swf), and the Close Buttom put it Visible.From application.swf i put:
MovieClip(root).BlackBgMC.gotoAndPlay(2)
or
MovieClip(parent).BlackBgMC.gotoAndPlay(2)
And I always get
"TypeError: Error #1010: A term is undefined and has no properties."
How do i gotoAndPlay that MC from application.swf Sames happen with MovieClip(root).CloseButton.visible = true;
I need the following: Using Flash CS4 AS3.
1) GoUp (GoUp is a button to move a square (Box_mc) up)
2) Once it is go up the button label of GoUp to be changed to "GoDown"
3) DoDown (GoDown is a button to move down the square (Box_mc)
4) Once it is go down, the button lablel again to be changed "GoUp"
Just like toggle between GoUp & GoDown buttons.
Note: The Square (Box_mc) is on the same form since there is only one layer.
What I'm trying to do is to load a swf, and access a particular scene within that movie. But it seems to have problems getting to that scene (a scene named 'Title'). I have this code on the timeline, and the button has an instance name 'button3'.
button3.onRelease = function() {
loadMovie("03_diagrams.swf", 1);
gotoAndPlay("Title", 1);
}
Does this code look okay?
I'm writing a FlashLite ActionScript2 piece of code. I have a series of textfields that are dynamically created and displayed on screen. I then wish to drag each of these textfields around. To achieve this I used some code from another flash site for dragging and dropping. I have two problems:
1) The txtMovies are dynamically allocated so each as a number appended to it, i.e. txtMovie0, txtMovie1 and so on. I can't figure out how to assign these in a non hardcoded fashion within a loop i.e.
object_array[0] = ("txtMovie"+i);
When I do this, it doesn't work. I think it's because it's not an object but a string. I tried using Object as a prefix to the part in brackets, tried [ ] etc... but couldn't get it to work.
2) In the function fnTxtMovieOnRelease I'd like to access the parameters (i.e. .text) of the selected text movie but, I don't know how to access it. I have no idea how to detect which of the movies are selected and thus access their individual text strings. I've tried to pass a parameter to the fnTxtMovieOnPress function but this then stops that code from working and I really don't know why.
I've instantiated a class on the main timeline where the stage is[code]...
View 6 Replies