Webmaster Forum

Go Back   Webmaster Forum > Web Development > Web Design Lobby

Web Design Lobby Forum for general web design issues not specific to scripting or graphics.


Reply
 
LinkBack Thread Tools Display Modes
Share |
  #1 (permalink)  
Old 10-21-2011, 05:56 AM
Junior Member
 
Join Date: 08-22-11
Posts: 9
iTrader: 0 / 0%
why Flash banner (action script, XML) is not working properly?

Hi,


We have a problem with our action script and seems to be using cookies of clients computers.


We have a action script as under ..........----------

PHP Code:
function my_function38()
{
    var 
_loc1 my_xml.firstChild.childNodes;
    
totalNodes _loc1.length;
    
cityname_mc.fl_name_mc.fl_name.text my_xml.firstChild.childNodes[cnt].attributes.name;
    
rate_mc.rate_anim_mc.fl_rate.text my_xml.firstChild.childNodes[cnt].attributes.rate;
    
fl_month.text my_xml.firstChild.childNodes[cnt].attributes.month;

 
 
// End of the function
my_xml = new XML();
my_xml.load("DEL.xml?uniqueID=" getTimer());
my_xml.onLoad my_function38
 
 
my_xml.ignoreWhite 1;
if (!
cnt)
{
    var 
cnt 0;
// end if
++cnt;
if (
cnt >= totalNodes)
{
    
cnt 0;
    
gotoAndPlay(1);
}
else
{
    
gotoAndPlay(1);

----------------------------------------------------------------------------------------------------

Xml Data as under
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

HTML Code:
<?xml version="1.0" encoding= "UTF-8" ?> <cities> <city name="Delhi" rate="365" month="" link="file location"></city> </cities>
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------






What is happening is we are storing many swf files and xml files for different cities on server location 1 with same code but are just changing the xml file to be picked.
I.e


DELHI.XML DELHI.SWF
BANGKOK.XML BANGKOK.SWF
SYDNEY.XML SYDNEY.SWF


All are in one folder and we are just changing the xml path in fla files and loading the new swf.

Then we are giving out swf urls to an advertising company which is in turn picking up swf files from sever location 1 and displaying the same on their website.


The problem is each time we access the swf file on there site the data doesnot display properly. It is picking up the wrong xml data. When we check the fla the path for xml is ok. What we think is it is saving swf or xml in cookies of user computer. Is there anyway to prevent it from happening.




We Are using Adobe Flash CS5.




Thanks
kam.p

Last edited by snakeair; 10-21-2011 at 06:06 AM.
 
Reply With Quote
  #2 (permalink)  
Old 10-22-2011, 11:03 AM
Kream's Avatar
Artist & Motion Designer
Latest Blog:
None

 
Join Date: 05-31-04
Location: RI
Posts: 6,542
iTrader: 10 / 100%
Test your theory by clearing your cache and viewing. If it's pulling the proper xml then no worry.

You can use a non cachable variable when retrieving the xml by appending some kind of data like the date and time to the url of the xml file. That way whenever the flash is loaded, the code will execute a new URL for the XML and won't recall cached data.

Code:
mcLoader.loadClip("http://domain.tld/sub/sub2/sub3/"+variable.text+"_contant.extension?noCache="+new Date().getTime(),container);
So now whenever that line runs, the URL becomes slightly different every time.
__________________
FireFall Army Neutral Zone : The Premiere FireFall Community for Players by Players
 
Reply With Quote
  #3 (permalink)  
Old 10-26-2011, 05:18 AM
Junior Member
 
Join Date: 08-22-11
Posts: 9
iTrader: 0 / 0%
Sir thanks for ur feedback, can u please describe according to our script or var, i'm sending you Action script and XML which i'm am using... An if u still have any confusn or need some thing else so please inform me

my personal email ID is pandekamal@gmail.com

. thanks thank you so much. If possible so please edit and put Ur code in my action script. so that i can understood it easily.


Action Script
-------------------------------------------------
PHP Code:
function my_function38()
{
    var 
_loc1 my_xml.firstChild.childNodes;
    
totalNodes _loc1.length;
    
cityname_mc.fl_name_mc.fl_name.text my_xml.firstChild.childNodes[cnt].attributes.name;
    
rate_mc.rate_anim_mc.fl_rate.text my_xml.firstChild.childNodes[cnt].attributes.rate;
    
fl_month.text my_xml.firstChild.childNodes[cnt].attributes.month;

 
 
// End of the function
my_xml = new XML();
my_xml.load("DEL.xml?uniqueID=" getTimer());
my_xml.onLoad my_function38
 
 
my_xml.ignoreWhite 1;
if (!
cnt)
{
    var 
cnt 0;
// end if
++cnt;
if (
cnt >= totalNodes)
{
    
cnt 0;
    
gotoAndPlay(1);
}
else
{
    
gotoAndPlay(1);

----------------------------------------------------------------------------------------------------

Xml Data as under
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
HTML Code:
<?xml version="1.0" encoding= "UTF-8" ?> <cities> <city name="Delhi" rate="365" month="" link="file location"></city> </cities>
Thanks
Kam.p

Last edited by snakeair; 10-26-2011 at 04:52 PM.
 
Reply With Quote
  #4 (permalink)  
Old 10-28-2011, 08:14 AM
Kream's Avatar
Artist & Motion Designer
Latest Blog:
None

 
Join Date: 05-31-04
Location: RI
Posts: 6,542
iTrader: 10 / 100%
Well, my first question is why do you have "?uniqueID=" + getTimer" ?

What is the getTimer function for? I don't think it does what you think it does.

What I was suggesting would be something along the lines of:

Code:
my_xml.load("DEL.xml?noCache="+new Date().getTime());
This is AS2 btw.
__________________
FireFall Army Neutral Zone : The Premiere FireFall Community for Players by Players
 
Reply With Quote
  #5 (permalink)  
Old 11-30-2011, 10:59 AM
Junior Member
 
Join Date: 11-30-11
Posts: 1
iTrader: 0 / 0%
Thanks for sharing nice post..The problem is each time we access the swf file on there site the data doesnot display properly. It is picking up the wrong xml data. When we check the fla the path for xml is ok. What we think is it is saving swf or xml in cookies of user computer. Is there anyway to prevent it from happening.

[removed]

Last edited by HTMLBasicTutor; 11-30-2011 at 12:29 PM.
 
Reply With Quote
  #6 (permalink)  
Old 11-30-2011, 11:02 AM
Kream's Avatar
Artist & Motion Designer
Latest Blog:
None

 
Join Date: 05-31-04
Location: RI
Posts: 6,542
iTrader: 10 / 100%
The only way to refresh the cache is to add a variable string to force Flash to re-read whatever external data you've added that variable string to. At least that's the only way I know of.

You should start by clearing you cache first to make sure you're downloading the latest Flash banner so it executes the new code in the new flash banner, not the old cached flash code.
__________________
FireFall Army Neutral Zone : The Premiere FireFall Community for Players by Players
 
Reply With Quote
  #7 (permalink)  
Old 02-03-2012, 10:10 AM
Member
Latest Blog:
None

 
Join Date: 12-28-10
Posts: 36
iTrader: 0 / 0%
the best way is to use some advance parameters for ur xml and swf variables,

for this u can use php, i mean using kiddish variables like simply delhi.xml and selhi.swf is not good.

the problem is due to the fact that their alphabatical order may be disturbing this.

use some variables that uses php parse method
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS-based navigation not working properly in IE Transcription Plus Coding Forum 2 07-26-2010 10:58 AM
Divs not working properly RyOn Web Design Lobby 4 03-08-2009 08:00 PM
Is action script neccessary for building and integrating a flash advertisement banner 2939195631902 Coding Forum 1 01-07-2009 07:05 AM
RSS help needed, my new rss feed not working properly sambkk Coding Forum 1 11-11-2008 12:24 PM
Alternating Flash Header on Refresh Script not working in Firefox basslion Coding Forum 5 04-15-2008 03:59 AM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 02:59 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2014 Escalate Media




Search Engine Optimization by vBSEO 3.6.0 RC 2 ©2011, Crawlability, Inc.