ActionScript 2.0 :: Talking To Flash Via Javascript?
Aug 24, 2009
i can make Flash execute JavaScript functions, but I don't know how to communicate to flash with javascript. For example, I have a flash header with an XHTML body. When link is clicked in the body, I need the flash header to move to a new frame. The frame is dependent on the link.
View 1 Replies
Similar Posts:
Jan 1, 2011
can download animated talking characters for flash? I like to create a presentation which has an animated character similar to this -I was able to find (google) several tutorials for creating animated characters, but I'm not really good at drawing avatars, so now I'm looking to download one (a .fla file)
View 2 Replies
Dec 10, 2009
Currently I have a flash based application (game) which I need to put on facebook, the users could save their scores and resume their game. For the task I was wondering which scripting language would be appropriate. And are there any API's available which could in the process. Or does one has to make all of it from scratch.
View 1 Replies
Dec 9, 2010
I am a US Marine and I am trying to help my shop out by building a program that would allow me to maintain records of gear so we do not have to count millions of pieces of gear everyday. So i built a database:
[Code]...
View 2 Replies
Aug 27, 2010
Now I am trying to another very simple thing.
In my main time line I have:
var _side = new Side();
var _main = new Main();
I have Main.as and Side.as saved in the same folder as Main.fla.
Here is Main.as
ActionScript Code:
class Main {
public function Main(){
[Code]....
Now the Main.as knows nothing of the variables speed and velocity. Is there a way to reference back and forth? Say for instance I have a dog class that drinks water from the water class.
If it rains then the water class changes var Water from 4 to 8; When the dog drink the water he can drink until the water is gone, but how the water variable was changed in the water class not the dog class.
View 2 Replies
Aug 1, 2008
I have a SWF file that I call the a parent, it imports a number of SWF(children) which I can switch through. is it possible to have a function in the parent SWF that the child SWF can launch?
The reason I need this is because each child SWF is a sort of small game, so when each game is finished I need some kind of way to let the parent SWF know that the player can continue.
View 9 Replies
Aug 13, 2009
im trying find out a value of a var from a mc called from an eventlistener.
//////////// as2 oldSchool ////////////
function loadPlayer() {
trace("myScene: "+this.myScene)
[code]...
View 3 Replies
Aug 28, 2009
i'm still in the process of grasping my move from AS2 to AS3 (or from timeline coding to external classes), and here's a problem i've run into.i have two classes, for the sake of easiness, call them Class1 and Class2.in frame 1, if i have
ActionScript Code:
var c1:Class1 = new Class1();
var c2:Class2 = new Class2();
[code]....
View 4 Replies
Jun 11, 2009
I have a file structure similar to the following:
LoadingSWF
LoadingSWFDocClass
ContentSWF
ContentSWFDocClass
In my ContentSWFDocClass I reference library elements that were "exported for actionscript", so they only exist in the ContentSWF. The ContentSWF compiles fine because my ContentSWFDocClass can find all the resources in the library....
The problem is that I need my LoadingSWFDocClass to talk to my ContentSWFDocClass. However, when I try to include a variable (or make any reference to something) of type ContentSWFDocClass in my LoadingSWFDocClass I get a compile error because the compiler doesn't recognize the library symbols that ContentSWFDocClass is referencing.
How can I get around this? I really need to reference elements in the library in my ContentSWFDocClass, and I also really need to be able to send commands from my LoadingSWFDocClass to my ContentSWFDocClass.
View 2 Replies
Mar 17, 2011
I am building a quiz using XML for the questions and a ButtonTopLevel class to control the behaviour of the buttons tasked with choosing a question. Basically, the docClass imports the XML, makes sure it is fully loaded and then adds these top level buttons as children. I need to maintain the MouseEvent.CLICK in the button class because once the button has been used, it will switch to feedback mode and no longer be available as a button. Once clicked, the button says:
[Code]....
I have a sort of "go back" button in during development, and if I go back to the top level buttons and click any one of them, it works as it should. There is nothing undefined, with the possible exception of a variable or two I've declared and not yet used. Is it something in the way I'm telling the child to talk to its parent? My code is rather lengthy, but I will post if need be - just hoping it might be something I'm missing in this call to the parent.
View 2 Replies
Sep 21, 2009
I've got a container swf that loads a few content swfs... now what I'm trying to do is get those content swfs talking to each other (the site is [URL], where the home slideshow, work and firm sections are each separate flash files). Specifically, I'm trying to get buttons on the home slideshow to link to their respective projects in the work section.
I've got home.swf dispatching a custom NavigationEvent when a button is clicked, with the clicked project's id attached to it. My index.swf catches the event, but this is where I'm stuck. I can't get it talking to work.swf. As far as index is concerned work.swf is an instance of Loader, and doesn't have the functions I'm trying to call. Right now the functions are on the timeline on frame 1. Do I have to move all the AS in work.swf into a document class and implement an interface that I can use to cast the Loader in index.swf?
View 1 Replies
Sep 27, 2004
Basically I am trying to get buttons that I have in a drop down menu load an external .swf into an empty movie clip placed on the main timeline. However for some reason it is not working. The buttons are contained in a movie called "menuItems" which is then placed in a movieclip called "mainMenu" which is then placed on the main timeline.
on (release) {
_parent.gotoAndPlay("reverse");
if (_root._root._root.currMovie == undefined) {
_root._root._root.currMovie = "personalData";
[Code].....
View 3 Replies
Feb 16, 2011
Is it possible to make desktop Air application by using HTML/JavaScript and Flash?Actually I want to make an Air app (which is for desktop) by using flash and want to use HTML , javascript and CSS as well.Is it possible ?
View 1 Replies
Jan 29, 2012
I need to execute some javascript string code from flash swf file using actionscript 3.
I read that it could be done by passing the javascript code to the parent html document , using externalinterface.call function. Then I assume it will be faster if I can declare functions in the javascript code in the HTML document in the first use of externalinterface.call funtion ; if flash code calls the javascript code repeatedly. So let me ask you how to do that. For details , any javascript to be loaded is unknown in design time and I can not prepare a javascript file to be loaded.
View 2 Replies
Sep 29, 2010
Is it possible to pass file names from a running Flash application, which only purpose is to enable multiple-file-selection, to a JavaScript application which handles upload of all files to the server?I have examined various Flash upload solutions (like SWFUpload, Uploadify, etc.) and none of them meets my needs. I want an easy to implement solution (like Uploadify) which also lets me specify various parts of the HTTP request.
The reason I need this is because my upload form uses session cookies (for user authentication) and an CSRF token both passed to the server when uploading files.Is it technically possible to pass filenames (+ paths) to a JavaScript application which then handles the upload?
View 1 Replies
May 20, 2011
Here's the challenge: I have a Flash movie which will be embedded in a page using an unknown DOM ID that I want to be able to identify/store for callback in a JS function. My ideal user flow would be: User clicks button in Flash. Flash pauses any animations / video / sounds / etc. Flash calls an injected JS function to display a page-covering overlay experience. When user closes overlay experience, a callback method on the Flash object is called. Flash resumes playback.
The problem is, when AS3 uses the ExternalInterface.call("functionName", args...) method, there doesn't seem to be a DOM event triggered, and thus it is impossible to tell which object called a JS function, so having a "registerMe()" function doesn't seem to work. Basically, the injected JS function has no way to determine which DOM object to call, because the ID of the Flash object is unknown.
[Code]...
View 3 Replies
Apr 16, 2009
I'd like to call a javascript function from an embedded .swf file. Specifically, I'd like to call a function in one of my externally linked javascript files from within: function loadTrack(){
[Code]...
which is in an .as file which I assume somehow becomes the swf file. How would I go about this and 're-compile' the .as file?
View 3 Replies
Oct 2, 2011
I'm trying to write a web application that searches google and then downloads the result sites and parses them.The search has to be done on the client side. Without implementing a server side proxy.Can this be done using javascript/sliverlight/flash?
View 1 Replies
Feb 29, 2012
let suppose i have a object named "data" which has a callBack function named "closeItem" which does something. So i have flash file which has a close button. on click of that i am calling this function which closes this item. So issue is? If i pass this "closeItemFunction" as global function this works fine. but if a pass this function as a "data.closeItem" this doesn;t work throwing some falsh error. so i just wanna ask that "does flash only call gobal scoped javascript function" ??
View 2 Replies
May 10, 2010
With all the recent hype about JavaScript and HTML5 replacing Flash, I wanted to know - How would it be possible to protect client-side js code? Of course, it is possible to obfuscate it, but that would only make it a little harder. Also, for games which submit high scores to the server, wouldn't it be incredibly easy to modify those scores before they are sent to the server? I know even Flash files can be decompiled, but they can be obfuscated and flash decompilation is not as easy as modifying data in JS - could be done easily using a plugin such as Firebug. I'd like to know everyone's views on this.
View 2 Replies
Jun 12, 2010
I need to achieve something like this for my website: Flash Rain Effect
Is that possible to do in Javascript? I want it to be just as smooth as it is in Flash.
View 3 Replies
Dec 19, 2010
I have a flash file that contains a package "game" which has a class "Scores" and a method setValue(). I want to write some lines of Javascript that allow me to call that method. Someone directed me to this tutorial, but I am still a bit confused.
Javascript: alert("start"); var so; so = document.embeds[0];
so.addParam("allowScriptAccess","always"); import flash.external.ExternalInterface;
ExternalInterface.call("setValue[2600]");
displays an alert to tell me that it has indeed began to execute saves the embedded flash file into a variable and sets access imports that class calls the method.I am not sure about how this class thing works? This is just the bits and pieces I was able to come up with from that site, but I don't really understand how it all works (but certainly hope to eventually).This is the site: http:[url]...how-do-i-access-flash-function-using-javascript.When I execute the code with the importation nothing happens, but the alert does come up when I don't have that statement?
View 1 Replies
Jan 4, 2011
I'm searching for free partial panorama viewer. It should be placed in somewhere in the page and it should be customizable (openSource?). So far i found pan0.net but it only supports 360 and i have priority for non 360...
View 2 Replies
Aug 5, 2011
I'm wondering if its possible to do what I'm thinking, and if it is possible, does anyone know of a flash object that does what I need? I know a Flash object can provide a javascript API to interact with it, what I dont know is can Flash send an email directly without the need to talk to the webserver to do so? If thats possible would it not be possible to write a flash object that did nothing but provide an API to send emails? Has such a thing been created that is out there for others to use?
I'm looking to create a email form on a web page but the site is static (no server scripting). In my situation server scripting is not possible as there is no server, the site is 100% client side on a CD/DVD/USB Stick.
View 4 Replies
Feb 10, 2012
when I moved my mouse there was a red fluid like velvet effect that followed my mouse and slowly faded.It was really cool and would love to add it to my website.
View 1 Replies
Jan 5, 2011
I have seen that some websites offer talking characters (very human looking avatars), but I do not want to pay HUGE money for those. So I started thinking about some of the cartoons I used to watch and if there was a talking computer, their way of visually portraying speech was with an equalizer.
For the "robot", I would just have 2 dots for the eyes, a nose, and a "mouth", but this mouth would really be an equalizer, and I could animate that with flash so that when there is loud sound, the mouth would open wider than it would for a soft sound ( if you watch an equalizer, the bars go way up and turn red when the music is loud, and remain low and green when sound is soft )
The only web technology that I imagine could do such a thing is flash, but I know very very little flash. I have been searching and searching and searching and all of the equalizer tutorials I have found are just bars with random movements that do not sync with the audio.
View 1 Replies
Oct 24, 2009
I am looking for a flash mp3 player that will work within the Opera-based browser on the Wii. The player needs to be javascript enabled (support methods like play, stop etc.) The mp3 tracklist will be built dynamically using ajax on the same page as the player so it must trigger an event when a track finishes playing (or at least provide functionality of some kind to indicate that it's time to start the next track). Does anyone know of such a player?
[Code]...
View 4 Replies
Oct 12, 2004
I am doing a site with a top flash nav, and Iframe with some flash and html in it.Is there a way to have the flash in the Iframe give actions to the flash nav??when you hit the porperties button, i want the nav to change to FOR SALE.something like:
on (release) {
_level0.clip.gotoAndPlay(2);
}
View 1 Replies
May 2, 2011
The following doesn't work (although it gives no explicit error), but why not?nd... Is there really no way around it, strictly using the with statement? Forget using for / foreach.
with (object1, object2) {
attribute = value;
method();
}
Why the code above gives no syntax error, doesn't work but is accepted by with?If it's possible, how could we change multiple objects with same attribute using with?
var object1 = { attribute: 3 };
var object2 = { attribute: 2, method: function() { alert('blah'); } };
var object3 = { method: function() {alert('bleh'); } };
[code]....
View 2 Replies
Aug 1, 2009
for some reason, whenever I dynamically load a swf on a $(document).ready() by writing to a div, I am unable to make javascript calls to the browser. Specifically, all calls to the browser return "null". This does not occur when embedding the swf normally on the page load, but I would like to prevent loading of the swf until a specified point in time.
What the heck is going on here? Is there something special about dynamically embedding a swf that prevents the swf from talking to the browser? The methods ARE called (I've proven such by showing alerts), but all return values to any function, regardless of type returned, shows as null when it gets to flash.
View 3 Replies