473,929 Members | 15,315 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Question about using ajax to load SWFOject "flashvars" variable

32 New Member
I have an ecard site. Part of that site allows users to enter their own message which then appears within a flash SWF file.

This is an example page:

http://jimpix.co.uk/ecards/4560-type-your-own-message.html

And this is the example HTML that is used to display the SWF file using SWFObject:

Expand|Select|Wrap|Line Numbers
  1. <div id="swfcontainer">
  2.     <div id="myContent"></div>
  3.     <script type="text/javascript">
  4.         var flashvars = {
  5.           txtVar01: "What you type, appears in bouncing letters. Click in the dark box at any time to change the text effect",
  6.           txtVar02: "",
  7.           txtVar03: "",
  8.           txtVar04: ""
  9.         };
  10.         var params = {
  11.           wmode: "opaque",
  12.           menu: "false"
  13.         };
  14.         var attributes = {
  15.           id: "myDynamicContent",
  16.           name: "myDynamicContent"
  17.         };
  18.  
  19.         swfobject.embedSWF("../ub6illaw/flash/swf/make_your_own_text.swf", "myContent", "800", "600", "9.0.0","expressInstall.swf", flashvars, params, attributes);
  20.     </script>
  21. </div>
When users enter their own text, they have to submit a form, to send the textarea contents back to the page, so that the flash content can be updated.

I'd prefer to do this immediately, i.e. as you type in the textarea box, the flash updates right away.

I can see that this could be done using AJAX, but I'm not sure how to go about it, and would appreciate some advice if possible please.

In this case, I'm not needing to connect to a database - just update a region of the page that holds the relevant "txtVar01" value in the SWFObject javascript.

I have done some basic work in Ajax before, using this simple example as a starting point:

http://www.oracle.com/technology/pub/articles/oracle_php_cook book/ullman-ajax.html

I can see on Google Advanced Search (http://www.google.co.u k/advanced_search ) something which might be what I'm after - as you type in the query in the text box it appears in the div at the top that says "Use the form below and your advanced search will appear here".

Anyway, apologies for the essay.

Any advice much appreciated

Thanks!
May 11 '10 #1
1 1979
acoder
16,027 Recognized Expert Moderator MVP
You probably don't need Ajax. If you're using SWFObject, you could probably pass the new value to update. Check the API of SWFObject to see if it's possible after the Flash has loaded.
May 12 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
2048
by: Uma Vivek | last post by:
Hi, I have a problem with Flash remoting via .NET . I seem to have all the code right, but flash does not seem to display the data at all. Here's is what Ive done so far... (1) Ive installed Flash Remoting MX, and copied over the contents of wwwroot\flashremoting\bin into my web application's folder\bin.
5
2024
by: Keeko | last post by:
Actionscriptor needs help! I have a working javascript function (getVar()) that extracts a variable from a link and returns it. (tested with alert() works fine). But I am unsure of how to right the following line. document.write("<param name='flashVars' value=&{getVar(text)}>) This is a param from an object tag (embedding flash) and i'm trying to dynamically set the flashVars param, but this 1 line is killing me.
1
2714
by: donradii | last post by:
Hello all, I am new here and am new the world of javascripting. I am having a heck of a time trying to accomplish something that i conceptually know what i want to do but can not seem to get it into code correctly. What I am looking to do is this. I have a web page that uses 3 different formats of video. Right now to load each format I have 3 separate pages. Each format is loaded onto the page with an embed function.
3
5622
by: Skip | last post by:
OK, I'm a novice in JS but have lots of coding experience. I am trying to accomplish something that would seem somewhat simple - BUT IT'S NOT. I have a basic window that calls another window with window.open and passes in 1 value using a querystring i.e., www.myhome.com/mypage?video=BAK-Extension Now when the window opens, I can capture the passed value in a JS function. But if I want to use that in the body of the HTML in a
4
1864
by: nishac | last post by:
Hi friends Anybody has worked with the Rss reader flash file to display the blog posts? My code was working well until I upgraded the flash as notified by Adobe.Now my rss not showing any blogs.Can anybody help me in this regard?Can it be a problem with xml? I am giving my code hereby document.write('<a href="/blog/blog.html"><img src="../images/rssreader_head.jpg" alt="Recent Blog Posts" border="0" style="margin-bottom:0;" /></a>') ...
4
3727
by: thulaseeram | last post by:
I am using iframe to store uploaded images, it is uploading fine in IE but it is not happening in firefox means first time it is uploading image if i try to upload second image it is not calling even java script function and not uploading the image in firefox. I am using this code in the button onclick event "attach_frame.upload();" here attach_frame is the iframe name and id to which the uploaded image should add. please can any one help me to...
0
3262
by: Shaikh shahnawaz | last post by:
Hi, I have implement multiple file uploading progress bar with the help of flash and .net file is upload on my local machine but not working with server it's give error while uploading image on server. code is as follows. this is flash object: <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="550"...
4
8270
AMT India
by: AMT India | last post by:
Hi, Where should I put a href in flash,My code is below. <a href="http://www.google.com"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,24" width="160px" height="600px"> <param name="movie" value="/uploads/flash/preloader_basic.swf"> <param name="quality" value="high"> <param name="wmode" value="transparent"> <param...
4
2155
by: g1adiat0r | last post by:
Alright, so I'm working on a board and I want the chatbox located on the board to change colours whenever you change the board theme. I have a couple of questions: If I create a variable in a separate Javascript coding will it carry over to another set of Javascript code on the page? Anyway, I'm totally winging this and I have NO experience with Javascript, but here's what I tried to do: <script language="Javascript"><!-- var x =...
2
8120
dream party
by: dream party | last post by:
Inserting a Flash (SWF, FLV) file into HTML web page is already an old and familiar thing to all of us. It is a rather non-flexible thing that just to edit some options in the template. However, I did not understand some parameters totally in the HTML tag. These days when I was surfing the Internet I have found some comprehensive introduction to these two tags. I read it and conclude it with my own words; I think it will be useful to us, so I...
0
10110
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9943
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
11233
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10625
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9820
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8182
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6041
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6237
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4420
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.