I`m having some trouble using the property useHandCursor (uhc)Please take a lot the attached file! cyclops:I have a timeline with 15 frames.In the 1st frame of the AS layer I have the "uhc" usage
In another layer I have the buttons, but they do not appear in every frame.I noticed that I need to use the "uhc" in the same frame number of the buttons.This way I can`t specify a function to all the buttons in just one frame!
I'm relatively new to AS3. There's one thing that I don't quite understand about Sprites. I'm making a tile based game, and all the tile graphics for a level are inside one movie clip in each frame. Would I be able to go about creating multiple sprites based on the frames in said movieclip's timeline I would I have to go through and make a separate library graphic for each.
I am new here and i am desperate to have my problem solved please. I have an html page with 2 swf movies that should be playing at the same time (one shows logo of a company and the other shows at the same time the company's products). the problem is althought they are synchronized when played on my pc, when loading via internet they doen't play at same time because one is much bigger than the other and takes more time to load and play. so i thought of making a dummy swf movie that loads both swf movies and make them play at same time.
i have created a movie clip which is rotating continuously and i want to start rotation and stop rotation and also forward and reverse rotation after sequence of animation with same start, stop, forward and reverse buttons.movie clip should rotate on a specific frame. i have enclosed my as3 code below
Code: Select all//variable to hold the speed var speed:Number=.1; bSlow.addEventListener(MouseEvent.CLICK, fSlow); bStop.addEventListener(MouseEvent.CLICK, fStop);
Error #1009 cannot access a property or method of a null object reference. But the code I use doesnt have anything that is null.. Mol.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); function mouseDownHandler(event:MouseEvent):void { gotoAndStop("Main"); } This is the code I have reapeted 5 times on multiply frames. (I do have changed the names ect.) the "Main" is a label on a frame. When I click on 1 button, it works fine. When I click on the button that leads me back to "Main" it works, BUT then it gives the error and I cant do a thing anymore..
I have a movie clip and i would like to display its duration in minutes and seconds.urrently I am displaying the frames so it shows "frame 320 of 500" etc.I would like to figure out how many frames in the movie clip and convert it to time so in the end it will display: 1:23 / 3:00
I am trying to split an image in different forms. For the moment I have something like this and the image splits only vertical but not random forms. I what all to be random like the image in the attach.[code]...
I have 3 mc's (clip1, clip2, clip3) and 5 buttons on the stage. When i press button 1 clip1 should go to _y = 100, clip2 _y = -1100, and clip3 _y = -500! The same should happen when one of the other buttons is pressed (with different y values though) My question is can i put the different y values in an Array, and if so how do i do so and how do I call them?
How do I remove child from a different Timeline. One of my movieclip contains three children. I want to remove all the three children. How could I do that. I tried setting instance name and removing the instances using getChildByName. But it doesn't seem to work.
Code: var mainMc:MovieClip = new MovieClip(); addChild(mainMc); var box:box_mc;
I have an input box and button on frame 1. I want user to enter some text in the textbox, and press the button.This will take him to frame2 and based on the info supplied it will take something from the server. The code on the frame 2 would be:
ActionScript Code: var path:String = ("Http://" + w.text + ".pl"); var nodeLoad:URLLoader = new URLLoader(); nodeLoad.load(new URLRequest(path));
[code]....
I get the error. - Access of undefined property w. (where w is the input box)
I have a movieclip that is exported for actionscript and has a class linked to it.In the actual movieclip I have two dynamic text fields ex: tf1 and tf2. tf1 is on frame 1 of the movieclip and tf2 is on frame 2.In the constructor I pass two strings as arguments ex: s1 and s2, one for tf1 and one for tf2.So in the constructor I am trying to assign these values to the textfields i.e:tf1.text = s1;tf2.text = s2;But, because tf2 is on frame 2, I cannot access it.I think I read something somewhere that all variables and objects that are on frame 1 are global. But this is not what I am working with, I need to access tf2 which is on frame 2.
I've recently migrated from AS2 to AS3 (kinda), and I'm trying to convert some of my files across.However, I've come across a problem. Can you pass variables across frames, like in AS2? I've tried and failed.
I am having trouble referencing a MovieClip based on certain variables in my code. I am using Flash Player 9 as the player setting and ActionScript 3.
I have a symbol with a name "Check1" set as a MovieClip, exported for ActionScript, I have ten of these on the stage with an Instance Name of ch0, ch1, ch2...ch9.
Each ch? has 21 frames on the timeline, each with a label name (named with a Number reference "00", "32", etc...) and a different image in each keyframe.
What I would like to do based on these variables:
Code: iTurn = 1; iLeft = 3; iRight = 2;
This is how I would like to use it:
Code: Check1.ch[iTurn].gotoAndStop(iLeft+iRight);
//iLeft & iRight as a frame label and not a frame number, so in the case I would like to access framelabel "32" which is frame 10 on the timeline.
I have tried many way to try and make this work with no luck, the only way I have been able to make it work is by using:
Code: ch1.gotoAndStop("32");
Doing this, I would have 10 clips, each with 21 possibilities. I can do this with many lines of code but I have been unable to tighten it into smaller code.
I am trying to run an if statement based on the a variables datatype
var theArray:Array = ['element1','element2'}]; var theString:String = "I am string"; trace(gettype(theArray)); // In php gettype() is what I use to get the type. Is there a similar function in as3?
I am trying to create dynamic variables to post to a form based on the content of some xml.I have loaded 15 objects which act as buttons into my movie and each button will trace the exact title as wanted. What i want to know is that when i click the button the title is stored in a dynamically created variable to be used later for posted to a php form.
PHP Code: // sprinkles function function GenerateSprinkles(sprinkles_xml) {
I couldn't find a good, clear question and answer for this in StackExchange, so I'll pose this as clearly as I can and hopefully get a clear, concise answer.Suppose I have a .txt* file with variables for a bunch of objects of one type that I was to load into an ActionScript 3 program. I can use an import statement such as:
[Embed(source="test.txt",mimeType="application/octet-stream")] private var testFile:Class;
for some of the places where I need to do this, but I also need to know how it's different for files chosen by the user from their local hard drive.n code, how can I convert this file, testFile:Class into an array, result:Array, of strings?*: If you have a solution using .xml or another format, please also include a sample of what the file's contents would look like and how you would get them into variables within AS3Edit: Below is a quick example file I threw together, test.txt:
I have some code that makes a variable based on an MC's name:
[Code]...
but it doesn't work, yet it traces "_level0.but1menu", and trying the function as this: _level0.but1menu.easeY(100) does work. I've also attached a mock up if you want to see what I mean. al input, this one seems weird to me - but I'm sure there is a completely logical explanation. I've used the same sort of idea to open external swfs with no issue.
I am trying to create dynamic variables to post to a form based on the content of some xml. I have loaded 15 objects which act as buttons into my movie and each button will trace the exact title as wanted. What i want to know is that when i click the button the title is stored in a dynamically created variable to be used later for posted to a php form.[code]
I have written some code to read and compare variables and then to jump to a particular frame based on the results (pretty simple stuff). It works fine when I use a button to trigger the code but I want it to happen automatically.
I have tried using the OnEnterFrame thingy but it doesn't work and I tried just placing the code on frame 1 and letting it do its thang but that didn't work either....
I'm using the .swf in a third party program and using the API for that program to supply the values.
here is the code:
_parent.InitializeExternalVars(); var m_varStrEndSlide; function display(){
I have a little problem in my game. I have a var coins:int = 0; on frame one, and I want to access it from frame 2. I'm not using a document class. Is it possible to make some kind of a global variable like in as2 without having to put all my code from the main timelime to a document class?
I'm trying to develop a simple as3 flash program that passes a collection a variables and returns a result based on the filtered results of a mysql table. Here is my as3 file:
[Code]...
No value is returned. If I replace with '$test4' and '$test5' with numbers such as 1 and 17, a value is returned. Where am I making a mistake?