ActionScript 1/2 :: F8as2- Function Navigates Outside The .fla To Find Itself?
Jul 2, 2009
The Error Codes:
positionSelectedAirspeedBug.as: Line 20: ActionScript 2.0 class scripts may only define class or interface constructs. };
and
initializeAirspeed.as: Line 45: ActionScript 2.0 class scripts may only define class or interface constructs. };
Both lines refer to the last line of code which is a };
Background:I have an .fla that has only one line of code:
This function is NOT in the .fla. This function does exists in an actionscript file 'initializeAirspeed.as' file which is in the same directory as the originial .fla.I had previously called this actionscript file with an #include statement. During debugging I removed the #include statement and all other code except the initializeAirspeed(currentAirspeed, buggedAirspeed); but the initializeAirspeed.as file is still called. I know because the initializeAirspeed.as file calls another asfile. My error statements include both the initializeAirspeed.as file and the other asfile.
I can comment out the 'initializeAirspeed(currentAirspeed, buggedAirspeed);' and all errors go away.I can create a new .fla with only the 'initializeAirspeed(currentAirspeed, buggedAirspeed); included and there are no errors. It appears the .fla has a memory for #include statements because if I use the #include statement then remove it I have problems..
In trying to respond to a question I wrote a bit of code that just adds 0.01 to a number. It is displayed in a dynamic text field. If I start counting from 0 it only counts to 0.06. The counting stops but the onEnterFrame keeps running.
The Code:
var num:Number = 0;this.onEnterFrame = function() { num += .01; trace(num); num = Math.floor(num*100)/100; trace(" "+num);};
I'm trying to find a function that will repeat my Rotational tween function. I found the yoyo() function to be what i want to do but i don't want the tween to change the rotation to CCW while originally moving CW. Basically i want the animation to move CW at a steady rate continuously.
I'm using the following code at the moment, i'm not too sure if this is the most suitable code for this situation, maybe im off track.
From my thoughts, i assumed that i would need to put the stars function in a onEnterFrame to repeat the animation and change yoyo() to continueTo() function. or maybe some sort of if statement in the stars function?
ActionScript Code: import mx.transitions.Tween; import mx.transitions.easing.*; var stars:Tween = new Tween(ring, "_rotation", Regular.easeInOut, 0, 360, 4, true);
I'm trying to use some buttons to navigate through an FLV with cue points. Here is an example of the code I'm using so far, but I'm getting an Invail Seek error in my output.
I have a site for my portfolio, and I want to show several different images. I want to just have a left arrow and right arrow to toggle through the pictures, so how do I code the same button to go to different pictures. Also should each of these photos be on separate keyframes?
i want to put some effect to my screen, when it navigates to other page. When i click a button in the first page it should navigate to second page. i want some effect when navigate to second page, can anyone tell me how to do this?
I have this site I am updating and I have a little issue. I made a button that navigates to a URL with a _self target. Well, in the script, i have it like this:
the "_self" isn't working on the page, but when i take out the target, it works just find, it opens in a new page which i don't want. You can check it out here Code: Select [URL] and watch that flash header for about 30 seconds, theres a button at the end that reads "Click Here" try clicking on that and it wont take you to the URL.
I made a button that navigates to a URL with a _self target. Well, in the script, i have it like this:
Code: clickhere2Btn.addEventListener(MouseEvent.MOUSE_DOWN, myHandler); function myHandler(event:MouseEvent):void { navigateToURL(new URLRequest("https://app.playmakercrm.com/register/eNortjK0UjJWsgZcMAkeAcs!"), "_self"); }
the "_self" isn't working on the page, but when i take out the target, it works just find, it opens in a new page which i don't want.You can check it out here
Code: dev.myhomecaresalescoach.com
and watch that flash header for about 30 seconds, theres a button at the end that reads "Click Here" try clicking on that and it wont take you to the URL.
I'm looking at some requirements for an upcoming flash project. One requirement is for the browser url in the address bar to change as a user clicks around in the flash movie so that a user might copy/paste said address into an email and another visitor will be brought to the same location. Is this possible?
I have a Flash AS 3.0 swf-based browser game. It's hosted on my site and communicates with a MySQL database via PHP using Flash's URLVariables. Everything works fine. The problem is, I want to be able to save the player's game after he leaves the webpage or closes his browser. How is this usually handled?
Is there a reliable event that fires when a swf is terminated? Is so, what is it? If not, what's the solution? Should I simply save the player's data every x seconds? That seems like it will bog down my server. I could have 10,000 people playing and I don't want to save each of their games every x seconds.
I have template that i try to edit when you click image thumbnail it opens window with larger version, on thumb script look likeon(release){ _root.page = 0;_root.play();}I trying to find that window that opens up because i need it resized, if i resize images nothing happens that frame that pops up when you click thumbnail is still same size. So i want to trace what happens when it executes _root.picn variable, maybe somewhere in code it will tell me what layer on time it refers to so i could edit
I just want to have my code wait a couple seconds to let some scripted animation finish then load a movie into a holder but I can't seem to find a pause/wait/delay function is there one and how would I use it or can someone tell me how to do it somehow thats not too processor intense if at all possible.
I need a function to find the lowest available depth for use in attach movies and such. And I also wanted to ask if running a function like this a lot would be too intensive to be practical.
I've searched all over to try and find a stroke function or a command after I have broken an object, but can't find anything. I want to apply a stroke to multiple frames. use the ink bottle, and do not suggest turning my symbol into a movie clip and adding a glow. This seems like it should be a simple function
I was searching for a simple collision detection function for as3, I found Collision Detection Kit, but it is too complicated, I just want a damn function that I give 2 objects as paramenters and that's it.I would like to know where can I find a pixel-perfect collision detection function (The faster, the better)
I'm using the following script on my website to play an mp3 in flash.To instantiate the flash object I use the swfobject framework in a javascript function. When the function is called the player is created and added to the page.
The rest of the website is in php and the page calling this script is being included with the php include function. All the other used scripts are in the php 'master'-page
[Code]...
I have a play-button with the id '#play1' and a stop-button with the id '#stop1' on my page. A div on the same page has the id '#status1' and a little image of a speaker is in the div.When you push the playbutton, the div with the speaker is fading in and when you push the stopbutton, the div with the speaker is fading out, very simple. And it works as I want it to do.
But the problem is, when a song is finished, the speaker doesn't fade out. Is there a simple solution for this? I already tried using the swfobject framework to get the flash player from the page and call the 'IsPlaying' on it, but I'm getting the error that 'swfobject' can't be found. All I need is a little push in the right direction or an example showing me how I can correctly get the currently playing audio player (in flash), check if it's playing and if finished, call a javascript function to led the speaker-image fade-out again.
I'm currently trying to implement an automated bug reporter for a Flex application, and would like to return error messages to a server along with the function/line number that caused the error. Essentially, I'm trying to get the getStackTrace() information without going into debug mode, because most users of the app aren't likely to have the debug version of flash player.My current method is using the UncaughtErrorEvent handler to catch errors that occur within the app, but the error message only returns the type of error that has occurred, and not the location (which means it's useless). I have tried implementing getStackTrace() myself using a function name-grabber such as [code]
but that will only work because of arguments.callee, and so won't go through multiple levels of function calls (it would never get above my error event listener).Anyone have any ideas on how to get informative error messages through the global error event handler? There seems to be some misunderstanding. I'm explicitly avoiding getStackTrace() because it returns 'null' when not in debug mode.
I must rejected all users outside Denmark from our live streaming (c-ip) and this is done in an access plug-insBut now I need to open up one of the streams, but I can't get the streaming name in the access-plug-ins only in the Auth-plug-ins.I cant use x-page-url or s-uri I need pStreamName. in access-plug-in like thissetStringField(m_pAev, IFmsAuthEvent::F_STREAM_NAME, pStreamName);but I cant get it inside the access-plug-in
Ok, so I have a bit of a mess here (Which I'm probably not doing right anyway, which could be my problem...). I have a document class, I'll call it as Body.as, that creates an object from another class known as Headgear.as. There are also other objects created from other classes, or will be in the future. Now, amoung all this, Headgear.as and all of the other classes Body.as will use to make objects require the use of dragging functions (starting and stopping dragging). On stopping drags, position checks are then made to compare a particular hidden movieclip with the dragged MC.
To try and save myself some hassle (from making the same functions over and over to ensuring that when the objects are created I don't need to send a complete crapload of variables just to ensure the position checking function would work), I had the functions for the event listeners (Which are set-up on the draggable MCs in Headgear.as) just direct to functions in Body.as
I'm trying to get this one function to be able to call many functions (not at once, but call many possible ones)In other words, I'm trying to get this variable to be named as a function. That way, this one variable can create multiple functions.example:
actionscript Code: class Thing extends MovieClip{ var funcvar; var othervar; function onLoad() funcvar = "YYY"; othervar = "ZZZ"; function onEnterFrame()
My problem is that the close button is going out of screen to somewhere after I made the gallery images fullscreen.It looked like this before they changed to fullscreen.. On right top corner you can see close and slideshow button etc...But after we made them fullsreen, the buttons are gone wide top right I guess. I can send the xml or .as files dont know which ones you need..