ActionScript 2.0 :: If Object Called Box Is At Certain Point Go To Frame 2
Sep 5, 2011I want to do something simple like, "if an object called box is at x = 100, the timeline goes frame 2".
View 2 RepliesI want to do something simple like, "if an object called box is at x = 100, the timeline goes frame 2".
View 2 Repliesi'm trying to control a movie clip called "nosotrosmc" with a frame label inside called "historia" but does not work this is the code:
[Code]...
I am using AS2 with Flash 8 Professional So, my problem is that I currently have a man in the middle of the screen, who shoots a line towards the mouse when I click. However, when I use hitTest to see if the line collides with another object, Flash recognizes the line as a large box if it is diagonal, so the hitTest isn't very accurate. The line only satys there for one frame, so I can't have the usual moving-bullet-style. I am either looking for a way to create an imaginary line with AS from the starting point to the mouse and beyond, and tell whether or not this line intersects with an object... or some other way that I haven't thought of to fix my problem. Keep in mind that the line rotates from a center point towards anywhere around it for 360 degrees.
View 1 Replieshow to use these in order to make an object move from point A to point B in an arc.Think of that classic game where you have to input the angle and power and try to hit your opponent.
View 1 RepliesBasically what I like to ask is how to move a object from one point to another point based on the point tat you have clicked on a graph. For example, If I click on this coordinate (2,3) on graph, the object (movie clip) will move to that point.
View 3 RepliesI'm still new to AS3, and I was wondering how to make an object point in the direction of another object and move towards it if they are a certain distance from one another. I haven't been able to find out how to do this from the Adobe devnet, so I thought I'd ask here.
View 1 RepliesIm doing a project that works with lots of tweens im having always the same problem when i call Tweens to execute in the same frame..The Tween most of the times freez before this motion end.I fixed the tween for the background... but for that i had to put the tween in another frame and call that frame from my home Frame..Now im trying to do some Tweens with some buttons, but it most of the time freez before the motion ends.Should i forget to use Tweens in the same frames?
View 1 RepliesI am new to AS3 and to writing classes, but have the following in my class to change the alpha of my button. How do I reference my button in btnOverAction, so I can set its alpha? Is there a way to reference the object the event was called on? I am calling the method to set up multiple buttons like this:[code]
View 3 RepliesThis was a simple test to use the transform matrix to rotate an object about its center point. But I noticed that the object was moving ever so slightly (up and to the left in this case). I added a bounding box so you could see the motion.
[Code]...
Is there method that gets called just before object destroyed? So I can override it.
Like
protected override function beforeDestuction():void
{
trace("This object is about to be destroyed!");
}
From a component I am working with.....If the target object has a property called source, which is used to set the path and file name of the media file to be loaded, then the list component will automatically set that source property."I am a little confused by what this really means.
View 9 RepliesI was recently searching for a way to call the print function on a PDF I was displaying in adobe air. I solved this problem with a little help from this fellow, and by calling postMessage on my PDF like so:
//this is the HTML I use to view my PDF
<object id="PDFObj" data="test.pdf" type="application/pdf"/>
//this actionscript lives in my air app
var pdfObj:Object = htmlLoader.window.document.getElementById("PDFObj");
pdfObj.postMessage([message]);
I've tried this in JavaScript as well, just to be sure it wasn't adobe sneaking in and helping me out..
[Code]...
I have an array name region it has a couple of properties. "code", "name", "value"
I want to store this array in an indexed object called regions.
I would then like to access the object by referring to its sub property name
regions[1].code
regions[1].name
regions[1].value
I can set an array region.code, region.name and region.value but I can not set the regions values
regions[1].code = "abc"
regions[1].name ="alphabet"
regions[1].value =26
note: region is singular and regions is plural(many)
Can someone outline the variable definition and construct so I can access this information. Happy to replace the index field with the code value.
Consider the following segment of code:
[Code]...
Do not worry about the syntax of this code. Here is my concern - The loader object which is used to send the HTTP request and which has the onLoadComplete event registered to is not referenced from outside the loadSomeContent() function. Is there a possibility that the loader object will be garbage collected and loadCompleteHandler() will never be called?
I have a page with multiple flash objects which are written by a third party and thus can't be changed. They call a JS function but don't seem to pass any identifying parameters. Is there any way to determine inside the function which flash object called it?
View 2 RepliesI have created a movie clip button but am stuck with the actionscript. I have created the rollover and rollout for this movie clip button but i want it to do 2 things after this i want it to go and stop on the first frame of a movieclip which has my content on it called portfoliogallery_mc (which is also the same instance name for it) when you then click the button i want it to go and play frame 11 of that movie clip portfolio gallery_mc. Here is my current actionscript i HAVE Flash 8 on my comp that i am currently using. Please note my actions are on a layer called actions and not on the movieclip button itself. nxtimagetwo_mc (is the movie clip button/instance of mc)
[Code]...
I'm using an onLoad function (importing variables from a text file) and I'm creating arrays within a for loop in the onLoad function.
I'm using something like this:
Code:
this["dvdAry" + i] = this[indexAry[i]].split("##");
So say the first array is called dvdAry0 .
How can I access that Array from a function? Please note the function, the onLoad function and the arrays are all being created on the same timeline.I've tried tracing the array dvdAry0 from the function after the array is created in the onLoad function, but it comes up as undefined. Is the array created on the object that I'm using onLoad on?I'm using a loadVars Object called loadDVDsText.
Essentially I'm just trying to rotate an object (mc) clockwise or anticlockwise depending on the value of a variable called 'angle'.If 'angle' is positive it should go anticlockwise.If 'angle' is negative it should go clockwise.
Option 1
PHP Code:
if(angle > 0) {
mc.rotation += rotateIncrement;
}
[code]....
I want to load an external swf called 'signs.swf' into an empty mc called 'signholder'.
var loadit2 = new Loader();
loadit2.load(new URLRequest("signs.swf"));
signholder.addChild(loadit2);
Everything works. Cool. But, I now want to target something within the signs.swf. How do I do it though? What is the path? Do I have to give the child of signholder an instance name? Everything I try fails.
If I wanted the root timeline of the external swf to gotoAndPlay(2) for example,...would i say...
signholder.loadit2.gotoAndPlay(2) ???
var wow:MovieClip = loadit2.content as MovieClip;
wow.gotoAndPlay(2) ????
I am having issues with startDrag(). I have a movie clip called circle. Inside circle, I have a movie clip called circleFill and another called circleOutline.onEnterFrame, this movieClip is duplicated 4 times.
When I use this:
private function onPressNow(event:MouseEvent):void
{
startDrag();
}
IT DRAGS ALL 4 MOVIECLIPS.
[Code]...
how can I make it drag my movieClip called circle? (meaning both circleFill and outlineFill)
i have a box called infoBox that contains a text field called caption. infoBox expands on mouse-over. When it does so, I do not want the text in caption to scale up - I want it to stay at 11 pt. So far my code to prevent this from happening is not working:How do I fix this?[URL]..
View 2 RepliesI am have an issue with getting my xml file to point to a specific frame in my flash movie. Below is the code I used for my action. The xml menu is simple there are a list menus buttons ie.<menu7 name="CONTACT" url="Contact"> I labled the frame contact and get nothing.
ActionScript Code:
on (rollOver) {
thestate = true;
[Code].....
using action script how can I set the registration point of an object. Also what import would I use.
View 1 RepliesRight now I have a point that I have to update with the x and y of a display object to use with the hitTestPoint object; is there any way I can get a point from a display object without having to make a new point var and continually update its x and y?
View 1 RepliesIm using A
Code:
function enterFrameHandler(event:Event):void
{
[code]........
I need to know how to have an object be recognized when it passes over a point on my stage. Then once that has happened an event happens such as a new screen appares.
View 3 RepliesI need to take a 2d object and use a point on the screen to skew the object accordingly to that point to create a point perspective.
View 2 Repliesi tried to modify this code, so when i click the circle, it moves to x position which the there is a transparent circle named cir the sp moves but do not stop at the cir x
[Code]...
I have a image slideshow set up on a time line. Each image is on a different layer and I am looking for a code to make the flash animation start at a random key frame every time the page is loaded. Here is a link to the site I am working on:
[URL]
I've got an object (an instantiation of my own class that extends Sprite) being created in the actions for a frame, like this:
Code:
import Scripts.CFoobar;
var foobar:CFoobar = new CFoobar();
[code]........