Welcome, Guest
Sign in
Create account
Home
Home Page
Components
Buy & Sell
Freelance
Marketplace
Tutorials
Flash Tutorials
Games
Free Online Games
Community
Message Board
Home
Help
Search
Login
Register
Subscribe to
Our Feed
Follow Us
On Google +
Follow Us
On Twitter
Become a fan
On Facebook
Flash-DB
»
General
»
Flash MX 2004
(Moderators:
Flash-db
,
Musicman
,
vesa kortelainen
,
Ronald Wernecke
,
Andresss
,
papachan
) »
Help me please, button with a link from xml file
« previous
next »
Print
Pages: [
1
]
Author
Topic: Help me please, button with a link from xml file (Read 4563 times)
FlashLearner
Server what's that
Posts: 4
Help me please, button with a link from xml file
«
on:
01/27/10, 06:10 »
Hi all, first of all I'm using Flash MX and it's first time I use xml, and I'm preparing two buttons in flash getting url from a xml file... Doesn't work, of course... Can you help me please?
That's the xml file code:
<?xml version="1.0" encoding="UTF-8" ?>
<menu>
<url>
http://www.myebsite.it/web/index.php?option=com_content&view=article&id=212&I
temid=262</url>
<url>
http://www.mywebsite.it/web/index.php?option=com_content&view=article&id=212&I
temid=262</url>
</menu>
Here the script in flash:
myXML
= new
XML
();
myXML
.
onLoad
= function(
success
) {
if (!
success
) {
trace
(
"XMLfailed to load"
);
} else {
trace
(
"load was good"
);
link1
=
myXML
.
firstChild
.
childNodes
[
0
].
firstChild
.
nodeValue
;
link2
=
myXML
.
firstChild
.
childNodes
[
1
].
firstChild
.
nodeValue
;
}
};
And of course the buttons have:
on
(
press
) {
getURL
(
link1
,
"_self"
);
}
on
(
press
) {
getURL
(
link2
,
"_self"
);
}
I really apreciate any kind of help, I'm doing it for a friend website but I'm not a pro and I'm gettin' mad!
Thanks a lot!!!
«
Last Edit: 01/27/10, 07:47 by Jorge Solis
»
Logged
Ronald Wernecke
Global Moderator
Systems Administrator
Posts: 6203
Re: Help me please, button with a link from xml file
«
Reply #1 on:
01/27/10, 08:58 »
I dont see you are loading the xml file.
Did you check, if the values are received ok by flash?
Logged
happy flashing
Ronald
FlashLearner
Server what's that
Posts: 4
Re: Help me please, button with a link from xml file
«
Reply #2 on:
01/27/10, 10:20 »
Oh yes, I forgot it but I've added my_XML.load("links.xml"); and is not working anyway.....
Logged
Ronald Wernecke
Global Moderator
Systems Administrator
Posts: 6203
Re: Help me please, button with a link from xml file
«
Reply #3 on:
01/27/10, 10:44 »
do you receive an error?
where does the file reside?
where is the swf?
do you use a server?
Logged
happy flashing
Ronald
FlashLearner
Server what's that
Posts: 4
Re: Help me please, button with a link from xml file
«
Reply #4 on:
01/27/10, 10:53 »
No error and file .swf and xml are in the same folder... I tried as well on a server...
Logged
Ronald Wernecke
Global Moderator
Systems Administrator
Posts: 6203
Re: Help me please, button with a link from xml file
«
Reply #5 on:
01/27/10, 12:47 »
did you check with trace commands, that you receive, what you expect?
Logged
happy flashing
Ronald
silviapend
Server what's that
Posts: 2
Re: Help me please, button with a link from xml file
«
Reply #6 on:
12/16/11, 23:20 »
I noticed the same thing as well!
FamilyTree
Feng Shui
FinanceAnd Budget
Fireworks
FishPonds
Fishing
Fitness
Forex
FrenchBulldogs
FuelPrices
Gambling
Gardening
GenericDrugs
GilbertsDisease
GlobalWarming
Glyconutrients
Goat Care
GoldenRetriever
Golf
Gourmet
GreenEnergy Source
HairLoss
Handcrafters
Happiness
Headphones
Healthand Beauty
HealthInsurance
Heartburn
Hemorrhoids
Highway1 Guide
HistoryOf Chess
Historyof Chocolate
Hobbies
Holidays
HomeBuilding Decline
HomeBusiness Model
HomeOffice
HomeRepairs
HomeSecurity
HomeTheater
Homeopathy
How To DJ
IdentityTheft
Immigration
IndoorKids Games
Investing
Ipad
Ivory
JewelryWholesale
JiuJitsu
JobSearch
JointVenture
KeepingChickens
KeepingDucks
Kickboxing
KidneyStones
Landscaping
LaptopComputer Parts
LawOf Attraction
LawnMowers
LeadershipDevelopment
Leads
LearnBaseball
LearnHindi
LearnSpanish
LearnStandup Comedy
LegalForms
LifeCoaching
LiftChairs
Lilies
Livestock
LivingWill
LocalHome Repairman
Lymphoma
Marketing
MarriageHelp
Massage
MedicalTourism
MentalHealth
MetalDetecting
Microwaves
MixedMartial Arts
MobileComputing
Mortgages
Motivation
Motorcycles
Motorhomes
MovieDownload
Muay Thai
MultipleSclerosis
MusicalInstruments
NaturalHealth
Networking
NewForms of Income
New York
NewportBeach
NicheMarketing
NursingCareers
OfficeFurniture
OfflineMarketing
OnlineCollege Degrees
OnlineConsulting
OnlineGames
Optinlist
OptionsTrading
OrganizationTips
Outdoors
P90x
PainRelief
PaintBall
Parenting
Pastlife Regression
PCSecurity
PetHealth Care
Pilates
PlasmaTvs
PlasticSurgery
PlayDrums
Podcasting
Porcelain
T
h
i
s
i
s
a
n
e
x
c
e
l
l
e
n
t
s
i
t
e
I
love
i
t
«
Last Edit: 04/26/12, 01:16 by silviapend
»
Logged
Print
Pages: [
1
]
« previous
next »
Flash-DB
»
General
»
Flash MX 2004
(Moderators:
Flash-db
,
Musicman
,
vesa kortelainen
,
Ronald Wernecke
,
Andresss
,
papachan
) »
Help me please, button with a link from xml file