ActionScript 3.0 :: Send A Function To SWF File Via A HTML File?
Aug 12, 2009
I am trying to send a function to my SWF file via a HTML file, and every browser works fine except for Internet Explorer.The test file is supposed to animate the graph when you mouse over the word click, and come to a halt upon mousing off of it.Here is the example URL:[URL]
*** begin ***
<script type="text/javascript"> function sendToActionScript(str) { document["accelachart"].sendToActionScript(str); }</script>
<a href = "#" onmouseover="sendToActionScript('fast')" onmouseout="sendToActionScript('slow')">click</a>
[code]....
Like I said before, it works on all browsers I tested (Chrome, FireFox, Safari) except for IE (7 or 8).
I am trying to send some information to a javascript function on the same html page as the swf file is in. I used the tutorial here on Kirupa but for same way it doesnt work.
I have a task to upgrade a web site. I have a map of ND with some cities on it. I needed to add a new city to the SWF which did not seem to be hard (asuming I did it correct). The action on all the buttons for each city look like this except the name after the # is the city selected.
on (release){ getURL("locations_info.html#minot", "location_content");} In HTML code snip that controls this looked like this : <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
I was reading about Flex- JavaScript communication via ExternalInterface.But I had a doubt, it said that the javascript code should be written in the HTML file of the application ? Now which is this HTML file ? Is it the index.template.html file per project or the HTML file created per MXML application ?
I need to find a way to detect keystrokes when the flash file is not selected and send that information to an .swf file. The file would be stored locally (not on the internet).
Im pretty new with the flash -> php -> mysql thing .. And I have made a script that sends some variables (that a user inserts in some input forms) with some var names, and then php handles it and insert it into my MySQL database its kinda ugly that a page pops up and opens the php page.So I was wonderin' if there is some way to send the variables to the php file and process them inside the flash file. without openin' some fancy browser window ?
I am having a nightmare using CSS to style HTML within a dynamic textfield in my flash doc. From what i now understand after much trial and error and reading online, CSS doesn't even work properly in flash even for the tags that it does understand (which are few and far between anyway). For some reason my layout is getting completely screwed up in certain scenarios (predominantly when there are images present too) when i hover over links (which are styled in an external CSS file). If i remove the external CSS styling (which only contains the following simple code):
Then everything works fine (but no links are underlined as standard or on hover). Does anyone know of any way to style the links without using an external CSS file (all i want to do is have no underline as standard and then underline them on hover). As this is from user input into a text editor I cannot place these links manually on the page in flash as they could be anywhere, I need a way of parsing the HTML and then displaying it accordingly.
I have built a simple Flash application that will be presented using a projector, the application will show messages in the form of questions that will come from a simple flat-file text file or XML file.
In addition to this I would also like to be able to add my own messages using a simple HTML form.
I've been looking around the web for some resources, but have been struggling to find what I am looking for. The basic idea is that the flash application will loop through these different messages from the XML, but then when a user types in a message that will also appear within these messages. Think of it as a sort of dynamic tag cloud.
i want to call a javascript function from within an embeded swf file in a html page and i'm using the ExternalInterface class. i know this function must be defined in a <script> tag in the html page. however, i want to have all my javascript code in an external file, but it doesn't work. my trial file just can't find the function, although i have my external js file linked in the header.
I have a application developed in flex deployed on server. In the application data is filled by user and saved in cookies so as to be available even when the user closes the application. However if new version of application is released the user can still access the older version saved in the cahe. How can it be assured that whenever a new version of application is released the application is loaded from the server and not from the cache and at the same time data saved in the older version (in cookies) can also be accessed in the new version.
I'm having some problems inserting my ammap into my webpage. I've read through the documentation and it isn't helping. The map works with if I use the .html file in my original folder but all the paths are relative and I'm trying to make this work in an ASP.NET MVC project using visual studio. It's rather tough to explain the problem since I don't know what's wrong (no javascript or flash debugger).Here is the code that embeds the ammap:
Let me give the context first. A user opens a local html file which has a reference to a network url of an swf file to embed.
(1) If the embed swf requests a local image file , will Flash allow the request? ( 2) If the embed swf requests an image file on a non local url other than one of the swf file, will Flash check a crossdomain.xml file on the url?
This code works perfect when testing, and it works perfect viewing the SWF, but when you view the HTML file with the SWF embedded, it doesn't display the text file content.
I have trouble passing a variable from HTML to Flash.I use swf-object2.2.how to code the variable in the html-file and how to receive it in the as-file?Its a simple shopId = 110
I am the fan of kirupa but this is my first thread in forum. I have some problem with sendAndLoad method with actionscript 2.0. I am developing a online game with flash mx , MS SQL 2000 and asp. The problem is I send the data using sendAndLoad method to asp file and get data back from asp file. But when the internet connection is not good there is a problem like jam or lost packets. How can I prevent the lost of packets. Some of the data are important. Is there any way to solve this?
I have a flash file using xml to link to html pages all within SharePoint. When I click on a link from inside flash, it opens up a new browser window with the html content.Is there a way to open the html content in the same browser that the flash file is in?
when I click continue shopping paypal sends me back to the swf file and not the html page is their a variable or something on paypal that directs it to send it to the html page instead
I want to read in a HTML file and format with a CSS file.I'm using MX2004.From what I've read, this should be possible?I'm getting stuck at the first obstacle, I can't figure out how to read in the HTML file.THe use of the CSS styling seems to be straight forward.
When I use swfobject (or, for that matter, publish from Flash)...if my HTML file is in the same folder as my Flash .swf (called "bin")...the flash file displays as a blank white page. I can tell the .swf is on the page, because when I right-click I see the flash context menu...however, the swf is blank. So the path isn't written incorrectly.If I move the HTML file inside the "bin" folder and change the path from "bin/myFile.swf" to "myFile.swf" everything works again...what gives?I think it might have something to do with using the Loader class...I am using loaders to loader external .jpeg files. But I don't know what to do about this other than to keep my HTML files in my "bin" folder which is a bit of a pain.
I never worked with movie files before and I'm having problems to play a f4v file from a html file.
Inside flash, when I do a ctrl+enter, the video shows and plays just fine.
When building the .html file to play it all, only my presentation and movie skin will show up but the movie won't load.
Even if I do a file > publish the video won't show up or play. Everything I have on timeline is working just fine (and again, even the videoskin is showing up).
Now, do I have to change anything inside publish settings or do I need to try something different with html?
ps: here's the part inside html code where I insert the swf:
I never worked with movie files before and I'm having problems to play a f4v file from a html file.
Inside flash, when I do a ctrl+enter, the video shows and plays just fine.
When building the .html file to play it all, only my presentation and movie skin will show up but the movie won't load.
Even if I do a file > publish the video won't show up or play. Everything I have on timeline is working just fine (and again, even the videoskin is showing up).
Now, do I have to change anything inside publish settings or do I need to try something different with html?
I made a christmas card using the fabulous snow fall animation tutorial using Flash CS4, AS3. I have a swf file sent it to several people. Unfortunately some could not view it as they did not have FlashPlayer 10 installed.Is there something I can do that will let everyone watch it whether they have Flash Player 10 or not.
I would like to send an email with a swf file made using Flash CS4, AS3...not as an attchment but in the body of the email. I have sent a link and that works...but want to send so everyone can view when they open the email.
I'm having issues having a swf file with a sliding navigation controlled by as2 be functional when its housed within a lookbook/sliding slideshow employing as2 that's referencing the sliding navigation swf file. the swf file with the sliding navigation functions on its own perfectly, but when it's called within the lookbook file, only the arrow/graphic controlling the navigation/movement works. the image the navigation moves doesn't function when its housed within the lookbook swf file. Both files reference the same AS folder containing a greensock folder for tweening etc.
I'm having issues having a swf file with a sliding navigation controlled by as2 be functional when its housed within a lookbook/sliding slideshow employing as2 that's referencing the sliding navigation swf file. the swf file with the sliding navigation functions on its own perfectly, but when it's called within the lookbook file, only the arrow/graphic controlling the navigation/movement works. the image the navigation moves doesn't function when its housed within the lookbook swf file. Both files reference the same AS folder containing a greensock folder for tweening etc. Does anyone have any idea what i'm doing wrong within the code i've provided below? I'm relatively new to AS,
How can I send a photo for example to mount a virtual catalog and preview my album?I use a simple form with 5 fields of transmission and viewed the small image after submission.
I have a html form and when submit is clicked, my php processes the data. At the moment its simple, just one field displayed to the screen <?php echo htmlspecialchars($_POST['name']); ?>.Instead of doing this, I want to send the variable name to a swf file, and load the swf file with the name. I will use flashvars to do this. I have seen examples, and I think this one is used to display the swf onto the webpage, and pass the data to the swf.