Namespaces In Xml For Html Markup
hi, we have an xml file we will be loading into a project. The xml will be littered with AS3 friendly styling (inline) but we were hoping to avoid the ugly CDATA--ie: Code: <![CDATA[<p>This is text</p>]]> The approach we are hoping to accomplish would be declaring a namespace in the xml:
Code: <pages> <page> <content xmlns:h="http://www.w3.org/1999/xhtml"> <text targetid="1"> <h:font color='#ffffff'>This text</h:font>will go into the box with id of 1. </text> <text targetid="2"> This text will go into the box with id of 2. </text> </content> </page> </pages> i know there is a Namespace class, but i am not sure how to tie the two together....can someone give me a lead? I have read this , but it does not lead me to the connection with how this MAY work with html...if at all.
FlashKit > Flash Help > Actionscript 3.0
Posted on: 08-12-2008, 01:25 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Unwanted HTML Markup In Text Box Value
I've inherited a Flash MX 2004 document that has some text entry points that verify you've entered the right text before continuing or provide you a warning message and urge you to try hard. They're set up like so:
Code:
on (keypress "<Enter>")
{
if (titleInputText == "hoped-for text entry")
{
gotoAndPlay("someNamedTarget");
}
else
{
comment = "Hey--enter hoped-for text entry to continue!";
}
}
Some of them just weren't behaving at all correctly. With some handy-dandy trace() statements, I found that a few of them were returning values that included HTML formating of the text. Instead of getting
Code:
something entered
I was getting
Code:
<FONT = "Arial">something entered</FONT>
which is causing me all sorts of problems. How on earth can I turn off the HTML tags? Where did it come from?
(Why, yes, I do know just enough to get myself in trouble. Why do you ask?)
Any help would be greatly appreciated on this.
My Flash Variables Contain Html Markup?
am using actionscript below to post variables to cgi script:
stop();
avertissement = "";
t_name.text = "";
t_email.text = "";
t_phone.text = "";
t_comments.text = "";
recipient ="user@domain_name.com";
subject="Enquiry from website";
bt_submit.onRelease = function() {
if (t_name.text == "") {
avertissement += " name";
}
if (t_email.text == "") {
avertissement += " email adress";
}
if (t_comments.text == "") {
avertissement += " comments";
}
if (avertissement !== "") {
t_status.text = "Please fill in these fields : "+avertissement;
avertissement = "";
} else {
loadVariablesNum("cgi-bin/nms_formmail.pl", 1, "POST");
t_status.text = "";
nextFrame();
}
};
bt_clear.onRelease = function() {
avertissement = "";
t_name.text = "";
t_email.text = "";
t_phone.text = "";
t_comments.text = "";
t_status.text = "";
};
The flash variables are sent to the script which generates an email message but the variables seem to come with html markup. Here is what comes in the email:
Below is the result of your feedback form. It was submitted by (<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="14" COLOR="#666666" LETTERSPACING="0" KERNING="0">test@test.com</FONT></P></TEXTFORMAT>) on Thursday, May 10, 2007 at 17:31:17
---------------------------------------------------------------------------
comments: <TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="14" COLOR="#666666" LETTERSPACING="0" KERNING="0">test message</FONT></P></TEXTFORMAT>
phone: <TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="14" COLOR="#666666" LETTERSPACING="0" KERNING="0">000 555 3430343</FONT></P></TEXTFORMAT>
name: <TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="14" COLOR="#666666" LETTERSPACING="0" KERNING="0">test name</FONT></P></TEXTFORMAT>
---------------------------------------------------------------------------
The same script works fine with html, have been searching everywhere trying to find a solution but everything I try either doesn't work or still sends variables with markup??
Any ideas??
Xml Markup Still Showing Up
i'm trying to load an xml file into my flash file but each time i load the xml into the flash, the xml markup is still there.
here is the fla and xml file
http://www.whathedale.com/kirupa/home.fla
http://www.whatthedale.com/kirupa/text/update.xml
thanks in advance.
dale tan.
Markup Tool
Hi
I am developing an application called markup. This allows a user to markup on pages/content he is viewing….my markup application has one tool bar and one markup area ….
What I want is to have different makrup areas for different pages in a presentation.
How I m doing this…
in a master file /base file I load this markup swf and the presentation swf….my markup is works fine if there is only one page in the presentation…but if there are more than one my markup objects are visible in the second page also…but I want separate markup regions for separate pages..
please help me..
thanks
shan
Xml Markup Still Showing Up
i'm trying to load an xml file into my flash file but each time i load the xml into the flash, the xml markup is still there.
here is the fla and xml file
http://www.whathedale.com/kirupa/home.fla
http://www.whatthedale.com/kirupa/text/update.xml
thanks in advance.
dale tan.
Using Web Standard Markup In Flash
Hello,
Simple question: I have numerous transitional xhtml pages marked up and ready to go. The code is basic but uses a few tags that are not recognized in Flash via HTML import- <h1>, <div> etc. Is there a best practice method for using this code without having to "dummy" down the code for use in Flash? Is there any advantage to importing the xhtml pages as XML and going that route or will I have the same problem?
Thanks,
Bob
XML Text Displaying Markup
We are encountering an intermittent issue where the markup and tags that we are reading in from an xml file are being displayed. This problem occurs randomly for some and not at all for others. Has anyone experience this issue and have any insight?
Flash Markup Language
hey,
anyone out there know's anything about flash markup language? Just saw it at work at http://www.sukima****a.com. Thanks.
Flash Inventing Nonexistent Markup <li>
Hi There--
Have put together a site where textfields are imported using the loadVars command.
Here it is:
http://grasshpr.home.mindspring.com/...ernate1_3.html
Here's the entire folder, which includes the textfiles and the fla:
http://grasshpr.home.mindspring.com/shinnAlternate1
The problem is that on some of the textfiles, Flash is adding markup where there isn't any, in the form of list dots. The kind you get when you put <li> in front of a line. (It probably won't do it for you. Flash just wants to drive me crazy. (It's succeeding.))
This only occurred in the last iteration of the design.
It's occurring on both of the computers I have access to, so it's something in the file.
Since this is the first time I've imported text, I'm utterly clueless as to what could be making this happen.
Has this happened to anyone else? If so, how did you solve it?
Any insight will be vastly appreciated.
Thanks for reading this,
Lee
Retaining Markup Tags In HtmlText Fields
Is it possible to wrap an XML object so that it's element tags are preserved (not parsed) if it populates a text field as htmlText? I'm trying to use XML in an htmlText field where other (non-XML) text is styled using CSS. I get the results I'm looking for (except for the CSS) when I populate the text field as plain text (not htmlText).
I tried wrapping the XML in a <![CDATA[]]> tag, but that too was parsed when used as htmlText.
Any ideas?
W3C Markup Validation Service Web Site Shows Lots Of Errors For .swf Object
Hello;
I'm using the method to insert a .swf file into an Html document as described in the "Frequently Asked 'Flash' Questions" tutorial in this forum:
http://www.sitepoint.com/forums/showthread.php?t=210919
The flash object works fine in my browser.
When I try to validate the Html using the W3C Markup validation service it says that there are no attributes for SRC, QUALITY, PLUGINSPAGE, TYPE, WIDTH, HEIGHT, and MENU. It also says that the element EMBED is undefined.
Since it shows so many errors it looks like the W3C Markup Validation Service might not configured to work to .swf objects.
You can copy and paste the code below and you can see what I'm talking about. Here's the link to the W3C Markup Validation Service page:
http://validator.w3.org/
PHP Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Shockwave Flash Movie</title>
</head>
<body bgcolor="#AAAAAA">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="300" height="250">
<param name="movie" value="300 x 250.swf" />
<param name="quality" value="autohigh">
<param name="menu" value="false" />
<embed src="300 x 250.swf" quality="autohigh" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="300" height="250" menu="false"></embed>
</object>
</body>
</html>
I think that using the flash object will be ok but for my peace of mind can somebody tell me is it safe or wise to use the .swf object when the W3C web site shows so many errors?
Thanks.
Help With Namespaces
Hello All,
I'm not exactly sure why I'm having a problem with this, but I'm trying to import the following namespaces and I'm doing so in accordance with the tutorials I'm using for reference:
import mx.controls.Alert;
import mx.rpc.http.HTTPService
import mx.rpc.events.ResultEvent;
import mx.rpc.events.FaultEvent;
However, when I try to compile, each one throws the following error:
1172: Definition [Namespace] could not be found.
All I can find regarding these are references to Flex and/or actionscript 2, neither of which I'm using. Have these namespaces been moved in AS3?
Any ideas? Thanks in advance for your help!
Namespaces
Hi all,
I know I am asking alot of probably rudimentary questions these days...I apologize in advance. My question this time: why use namespaces? What is their real purpose? I don't see a great difference between using a namespace and say just making a function or something...
If you know a good article on namespaces I'd appreciate it too. I'm not familiar with them and their use. I understand how to define them and the like but trying to wrap my mind around their exact usage.
Thanks for all the help in advance!
Namespaces
Isn't the whole point of namespaces to allow you to define classes with the same name, but differentiate between them?
So I write this class
package com.drawing{
import flash.display.Sprite;
class Rectangle extends Sprite{
public function Rectangle(w:Number,h:Number,r:Number){
}
}
}
Then I instantiate it so...
import com.drawing.Rectangle;
var myRect:Rectangle = new Rectangle(100,200,10);
addChild(nyRect);
and I get this error ,,,
"Implicit coercion of type flash.geom.Rectangle to an unrelated type flash.display.DisplayObject"
If I change the name of the class to Foo_Rectangle, or use the full path to the class, the conflict goes away.
Now, since I can't use flash.geom or flash.display unless I import them explicitly in my code, why do I get this error? Surely Flash should be ignoring those two packages because I have not told it to look there? So when I import com.drawing, the only Rectangle class it should look at is the one in com.drawing,,,no?
Does this mean that, even if you don't import any of the built-in packages, they are always included in the compile?
Xml Namespaces
Is it possible to access xml fields directly in script if the xml file has namespaces in it?
For example I love being able to do stuff like:
var a:int = xml.node1.node2
But when it has namespaces, the only way I have figured out how to do this is to do something like:
var node1:XMLList = xml.child(new QName(xml.namespace(), "node1"));
var node2:XMLList = node1[0].child(new QName(node1[0].namespace(), "node2"));
var a:int = node2[0].text()[0];
quite a bit more inconvenient. is there a shortcut i don't know about?
XML Namespaces
Hi,
I expected for ' xml.child(ns).length() ' to be 2, not 5.
Can anyone explain why it is considered the others 'bar' elements to be in the namespace k?
Thank you.
Attach Code
var xml:XML =
<foo xmlns:k="www.example.com" >
<k:bar >text1 ns k</k:bar>
<bar>text2</bar>
<bar>text3</bar>
<bar>text4</bar>
<k:bar>text5 ns k</k:bar>
</foo>;
var ns:QName = new QName("www.example.com","bar");
trace( xml.child("bar").length());// 3
trace( xml.child(ns).length()); // 5 ???
Edited: 03/22/2008 at 04:38:08 AM by alex_p
Namespaces In Xml With E4x
This is starting to drive me nuts..
Say, I have the hypothetical xml object:
ActionScript Code:
var testXML:XML = <rootNode xmlns="http://www.somedomain.com/"> <blah>Some node</blah> <yadda>Some other node</yadda> </rootNode>
and I want to traverse that xml using e4x.
Now, it's relatively easy to say:
ActionScript Code:
namespace ns = "http://www.somedomain.com/";trace (testXML.ns::blah); // traces Some node
But what if, in theory, I don't know the namespace uri. The question is: is there a way to declare a namespace using the namespace from an xml object?
I've tried:
ActionScript Code:
namespace ns = testXML.namespace() as Namespace;trace (testXML.ns::blah);
but that throws the error:
Quote:
1171: A namespace initializer must be either a literal string or another namespace.
which doesn't make any sense as
ActionScript Code:
(testXML.namespace() as Namespace) is Namespace
returns true. Which seems, at least in my mind, to mean that my namespace initializer is another namespace.
Any suggestions or ideas greatly appreciated..
d.
XML Namespaces
I've loaded an xml from a SOAPwebservice and everything works fine but I can't acces the nodes inside this XML because there's a namespace declared in it.
Code:
var bl:XML = <getPostcardObjectResponse xmlns="http://tempuri.org/">
<getPostcardObjectResult>
<postcardsGroup>
<string>/thmbs/PostCards/5_1.jpg</string>
<string>/thmbs/PostCards/5_2.jpg</string>
<string>/thmbs/PostCards/5_3.jpg</string>
<string>/thmbs/PostCards/5_4.jpg</string>
<string>/thmbs/PostCards/5_5.jpg</string>
</postcardsGroup>
</getPostcardObjectResult>
</getPostcardObjectResponse>
I've tried removing the namespace etc. and looked all kinds of info for this up but I just can't find it.
I hope this makes it clear,
Thanks for your time.
Namespaces And AS3
Hi,
I have a load of functions all on my frames . Most of the functions are the similar, add a movieclip and animate it or change the colour of it(see below)
var colorTransform2:ColorTransform = whiteBox2_mc.transform.colorTransform;
colorTransform2.color = 0xffffff;
whiteBox2_mc.transform.colorTransform = colorTransform2;
whiteBox2_mc.alpha = 0.2;
now the problem is I have many simlar variabales and function names and apart from calling them
colorTransform2
colorTransform3
colorTransform4
etc etc.
I wonder is there is a way do this with namespaces (iso I can use the same name for a variable but under a different namespace? Like main timeline like this below:
namespace frame1;
namespace frame2;
frame1 function showValue() {
//this shows the value on frame1
}
frame2 function showValue() {
//this shows the value on frame2
}
Public Namespaces
I've been reading the chapter in the flash help about namespaces and I find the concept a little confusing. I'm starting out with AS3, but I'm very experienced in AS2.
Now I'm wondering how to reference public namespaces.
I've got a "MyClass.as" file (in a directory "myPackage")
ActionScript Code:
package myPackage{
public class MyClass{
namespace myNameSpace;
myNameSpace var myVar : String = "Hello World!";
public function traceMyVar() : void{
trace( myNameSpace::myVar );
}
}
}
and in a fla file:
ActionScript Code:
import myPackage.MyClass;
var myClassInstance : MyClass = new MyClass();
myClassInstance.traceMyVar(); //outputs 'Hello World!'
So, as you can see I know how to use the namespace "myNameSpace" internally, inside the class. But I was wondering how to use a public namespace.
I added the "public" attribute to the namespace definition, but then what?
ActionScript Code:
public namespace myNameSpace;
How do I reference that public namespace?
Is There A Way To Use Multiple Namespaces?
Is there a way I can have to sets of name spaces:
set1
modeA
modeB
set2
mode1
mode2
ActionScript Code:
then use both two define a function:
modeA mode1 function doSomething () {
//some function
}
//and call it something like this?
modeA::mode1::doSomething();
Namespaces Issue
My problem is this:
First I have 3 namespaces:
Code:
package {
public namespace nsEspacioA = "El lugar A en el Espacio";
}
Code:
package {
public namespace nsEspacioB = "El lugar B en el Espacio";
}
Code:
package {
public namespace nsEspacioC = "El lugar C en el Espacio";
}
Second one class, with the sString01 variable declared in all of them:
Code:
package {
public class Clase01 {
nsEspacioA var sString01:String = "sString01A";
nsEspacioB var sString01:String = "sString01B";
nsEspacioC var sString01:String = "sString01C";
function Clase01() {
}
}
}
An finally the document class:
Code:
package {
import flash.display.Sprite;
public class DC extends Sprite {
private var cClase01:Clase01;
function DC() {
cClase01 = new Clase01();
trace(cClase01.nsEspacioA::sString01);
trace(cClase01.nsEspacioB::sString01);
/*trace(cClase01.nsEspacioC::sString01);*/
}
}
}
As is, it works; it returns the value of sString01 in every namespace, but the problem comes when I activate the third trace, because when I compile, in the output don't appears anything. Perhaps the number of namespaces per variable is limited to 2 ? Or maybe this could be a Flash bug?
Thanks for the help (and sorry for my english)
Parsing XML With Namespaces (AS 3.0)
The xml file I am parsing uses namespaces, which I think might be causing problems.
Basically, I can see the child node if I call children() to get a list of nodes. But I can't access the child node directly with child("Nodename").
I've also tried the following which I would think would work fine, but in the end worksheet ends up being empty.
Any ideas?
Attach Code
var rootNode:XMLList = xml.children();
var xmlName:String = rootNode[0].name();
var worksheet:XMLList = xml.child(xmlName);
Namespaces Issue
My problem is this:
First I have 3 namespaces:
Code:
package {
public namespace nsEspacioA = "El lugar A en el Espacio";
}
Code:
package {
public namespace nsEspacioB = "El lugar B en el Espacio";
}
Code:
package {
public namespace nsEspacioC = "El lugar C en el Espacio";
}
Second one class, with the sString01 variable declared in all of them:
Code:
package {
public class Clase01 {
nsEspacioA var sString01:String = "sString01A";
nsEspacioB var sString01:String = "sString01B";
nsEspacioC var sString01:String = "sString01C";
function Clase01() {
}
}
}
An finally the document class:
Code:
package {
import flash.display.Sprite;
public class DC extends Sprite {
private var cClase01:Clase01;
function DC() {
cClase01 = new Clase01();
trace(cClase01.nsEspacioA::sString01);
trace(cClase01.nsEspacioB::sString01);
/*trace(cClase01.nsEspacioC::sString01);*/
}
}
}
As is, it works; it returns the value of sString01 in every namespace, but the problem comes when I activate the third trace, because when I compile, in the output don't appears anything. Perhaps the number of namespaces per variable is limited to 2 ? Or maybe this could be a Flash bug?
Thanks for the help (and sorry for my english)
NameSpaces.. Can Someone Clear The Matter Up?
I am struggling to see the point in Name Spaces.
namespace tv = "http://blah.com/app/tv"
namespace life = "http://blah.com/app/life"
If the major point in namespaces is to allow me to do this
tv var live:String = "I am on TV Live on Air";
life var live:String = "i love life and living it to the full"
Well is all this worth it?
Can i not just ignore all the code and go for
var liveTV:String = "I am on TV Live on Air";
var liveLife:String = "I love life and living it to the full";
In all possible future scenarios???
Why are name spaces important and is it really worth taking the time to pound it into my head? I just know Adobe will change to AS4.0 soon and probably change everything all over again.
In the real world, how important is a Namespace? What benefits (apart from having 2 variables of the same name) do namespaces provide and can you give an example scenario in whihc a namespace(s) is required?
Thanks
Question About Scope (maybe Namespaces)?
Ok, I am going to boil the really newbish question down as simple as I can:
WholeThing.as
Code:
package
{
public class WholeThing
{
public var myClass:TestClass;
public var myLooker:TestLooker;
public function WholeThing()
{
myClass = new TestClass();
myLooker = new TestLooker();
}
}
}
TestClass.as
Code:
package
{
public class TestClass
{
public var myString:String = "hahaha";
public function TestClass()
{
}
}
}
TestLooker.as
Code:
package
{
public class TestLooker
{
public function TestLooker()
{
trace(myClass.myString);
}
}
}
When I create an instance of WholeThing I get compiler error 1120: Access of undefined property myClass. I know it's because "myLooker" can't see "myClass" - but why? What fundamental piece of AS3 am I missing? Any help would be appreciated!
Creating XML Object With Namespaces
I'm trying to create the following XML
<xs:schema id='MySchema' xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:msdata='urn:schemas-microsoft-com:xml-msdata'>
<xs:element name='MySchema' msdata:IsDataSet='true' msdata:UseCurrentLocale='true'/>
</xs:schema>
Following the documentation it appears that the following code should do the trick
private const xs:Namespace = new Namespace("http://www.w3.org/2001/XMLSchema");
private const msdata:Namespace = new Namespace("urn:schemas-microsoft-com:xml-msdata");
var testXml:XML = <schema></schema>;
testXml.addNamespace(xs);
testXml.addNamespace(msdata);
testXml.@id = "MySchema";
testXml.xs::element.@name = "MySchema";
testXml.element.@msdata::IsDataSet = true;
testXml.element.@msdata::UseCurrentLocale = true;
However, this results in the following XML
<schema id="PERSONDETAILS">
<element name="PERSONDETAILS" xmlns="http://www.w3.org/2001/XMLSchema"/>
<element IsDataSet="true" UseCurrentLocale="true" xmlns="urn:schemas-microsoft-com:xml-msdata"/>
</schema>
Can anyone tell me what I'm doing wrong? Thanks
Error 1151, Namespaces
hello;
I have some code on the timeline:
ActionScript Code:
var mcvo : Object = new Object();
mcvo.mcm_A = function():void
{ var lvo : Object ;
}
mcvo.mcm_B = function():void
{ var lvo : Object ;
}
which generates: 1151: A conflict exists with definition lvo in namespace internal.
I did not have this issue in AS1;
is there a solution other than having different variable names, which would be a messy and would breakdown some of my fundamental nomenclature protocols that I love so much;
any thoughts?
thanks
dsdsdsdsd
Error 1151, Namespaces
hello;
I have some code on the timeline:
---------------------------------------------------------
var mcvo : Object = new Object();
mcvo.mcm_A = function():void
{ var lvo : Object ;
}
mcvo.mcm_B = function():void
{ var lvo : Object ;
}
---------------------------------------------------------
which generates: 1151: A conflict exists with definition lvo in namespace internal.
I did not have this issue in AS1;
is there a solution other than having different variable names;
any thoughts?
thanks
dsdsdsdsd
XML Namespaces Driving Me Nuts
Hi everyone.
I am trying to work with XML that is loaded from this location:
http://christer.easycruit.com/export/xm ... y/list.xml
The problem is that a cannot acces the nodes in the tree using AS3 syntax. My guess is that the problem is nhe namespacing that is making it impossible. I have been sitting for hours trying to set namespaces or removing them, but i just cant get this to work. I can load the XML, but as soon as i try to walk down the tree i get no data output. Here is my actionscript so far:
------------------------------------------------------------------------------
var myNamespace:Namespace = new Namespace( "http://www.w3.org/2001/XMLSchema-instance" );
default xml namespace = myNamespace;
var xmlLoaderAvdelningar:URLLoader = new URLLoader();
var xmlDataAvdelningar:XML = new XML();
xmlLoaderAvdelningar.addEventListener(Event.COMPLETE, LoadXMLAvdelningar);
xmlLoaderAvdelningar.load(new URLRequest("http://christer.easycruit.com/export/xml/vacancy/list.xml"));
function LoadXMLAvdelningar(LoadXMLAvdelningarEvent:Event):void{
xmlDataAvdelningar = new XML(LoadXMLAvdelningarEvent.target.data);
parseXML(xmlDataAvdelningar);
};
function parseXML(feed:XML){
var list:XMLList = VacancyList.myNamespace::Vacancy;
for (var i:int = 0; i < list.length(); i++){
trace(list[i].myNamespace::Versions);
};
};
----------------------------------------------------------------------------------------------------------------------
there is no way for me to acces one of the nodes in the tree and trace the data. To me the namespacing in the XML is very confusing, and i have no experience working with this kind of XML. Would be very grateful for help in this matter, so that i can acces the different XML nodes in the usual AS3 way.
Best regards
Anders
Need Information About Interfaces And Namespaces In AS3
Hi,
I need information about actionscript interfaces and namespaces, I'm preparing for ACE for Flash CS3 and I need to learn about this subjects and I can not find resources or simple examples that make these subjects understandable.
Anybody can help me!
Thanks a lot.
SOAP: Namespaces For WSDL Parser ?
Hi,
did you ever use a SOAP webservice? There is a nice one which layout graph flowcharts automatically:
http://cmap.ihmc.us/xml/LayoutWebService.wsdl
(Description: http://cmap.ihmc.us/xml/LayoutWebService.html)
However, it returns me this error message:
<< WDSL.UnrecognizedNamespace
The WDSL parser had no registered document for the namespace. >>
No idea what this means...
Circular Type Referencecs And Namespaces
Is it possible with the help of namespaces (or anything else) to do something like this:
ActionScript Code:
package foo.bar
{
import org.actionscript.utils.Fudcake;
public class Fudcake extends Fudcake
{
//
}
}
Right now, I get an circular type reference error.
Traversing Complex XML/Nested Namespaces
I am trying to work with XML containing nested namespaces, and after a lot of reading some really good tutorials and viewing posts here and trying to figure out how to drill down into the structure, I am at a loss.
I have my XML Object defined as follows:
ActionScript Code:
var myXML:XML =
<pkg:package xmlns:pkg="http://namespace1">
<pkg:part pkg:nomen="/package_nomen"
pkg:stuff="stuff_text"
pkg:padding="616">
<pkg:xmlData>
<Pointers xmlns="http://namespace2">
<Pointer Id="pIda"
Type="http://namespace2a"
Target="progA" />
<Pointer Id="pIdb"
Type="http://namespace2b"
Target="progB" />
<Pointer Id="pIdc"
Type="http://namespace2c"
Target="progC" />
</Pointers>
</pkg:xmlData>
</pkg:part>
</pkg:package>;;
I am able to trace up to the <pkg:xmlData> element by using the following AS:
ActionScript Code:
var pkg:Namespace = myXML.namespace("pkg");
var part:XMLList = myXML..pkg::part;
var nomen:XMLList = myXML.pkg::part.@pkg::nomen;
var stuff:XMLList = myXML.pkg::part.@pkg::stuff;
var padding:XMLList = myXML.pkg::part.@pkg::padding;
var xmlData:XMLList = myXML.pkg::part.pkg::xmlData
trace(part);
trace(nomen);
trace(stuff);
trace(padding);
trace(xmlData);
I can't figure out, however, how to drill into <xmlData> to access its children individually. I can trace the enitire <Pointers> element using:
ActionScript Code:
trace(xmlData.children());
But, I am unable to access them individually, and especially, define their subsequent namespaces.
Is there anyone out there who can help? Any would be awesome.
Andrew444
Intermittent Mystery Warning With Namespaces
I'm using FlashDevelop 3B7 and am getting an intermittent warning now that I've come up with a good use for namespaces:
...as3-platformer-gamesrcplatformeractorActor.as(37): col: 59 Warning: void used where a Boolean value was expected. The expression will be type coerced to Boolean.
I start off with a member variable using a custom namespace "Manager":
Manager var _isAlive:Boolean = true;
And the sometimes-offending code is:
public function get isAlive():Boolean { return Manager::_isAlive; }
If I "Rebuild Classpath Cache" the warning goes away... that is, until I make any kind of change at all to Actor.as.
I'm not sure if this is a FlashDevelop or AS3 compiler issue. Has anyone run into this before?
Arrays With NameSpaces & Design Patterns..... HELP
I believe the next breakthrough in my AS3 programming will have something to do with large Nested Arrays organized by NameSpaces, and overall Design Patterns. I'm not exactly sure what Design Patterns are... ... but the name sounds like what I'm looking for. I want to learn about how common types of websites are organized, engineered, and programaticaly designed.
Has anyone every seen a visual representation of this? a flowchart? a blueprint? a layout?
I'm hoping some of you FINE members can provide some resources, suggestion, or example files, that would be amazing!
Thanks in advance for your help, I very much appreciate.
-Brandon
(Friday @ 5:00 isn't a very good time to post a request is it?)
Question About Retrieve Element From Different Namespaces In XML File
Hi everyone. Today is my first day here~
Got to learn AS for I got a AS project in hand.
So got to learn it from the very beginning.
Now I encountered with this problem, please look at the xml sample below:
<ns:title id="1">title1</ns:title>
The problem is now how I can get all of the element?
Can I get them just by . or .. ? Or I need to use the XMLNode or something like that.
Hope somebody would like show me the way, thanks a lot~
Flash CS4 Package & Instance Variable Namespaces
I have an update package in the same directory as my .fla doc. The document class imports a class within the update package. In CS3, this wasn’t a problem, but compiling in CS4 is generating what appear to be namespace errors, conflicting with local variables that use the package name. Is this a bug, am I breaking some best-practice that Adobe was lenient upon in CS3? Anyone know?
import update.UpdateManager;
var update:Object = {test:’namespace conflict’};
trace(update.test);
//1202: Access of undefined property test in package update.
Edited: 11/12/2008 at 03:06:43 PM by cayennecode
Flash MX - HTML Parsing Problem: Custom Extension File Won't Parse As HTML
I am using Flash MX.
The problem is, I have a movieclip in my main timeline. This movieclip has a main key and a refresh key, which updates the dynamic textfield's contents with a loaded variable named content. The variable content is stored within a file named readme.ifh. When I load the variable in the textfield, it shows me the source of the HTML, not the rendered version.
What's wrong (and yes, I do have the "Render as HTML" option checked)?
URGENT: Flash Navigation Embedded In Html That Link To Frameset Content In Html
Hi all,
I want to build a website that consists of a menu navigation (made in flash but embedded in a topframe in dreamweaver. On the left site, there would be some flash animations (images etc.)embedded in the leftframe and in the right/main frame, there would be either flash content or html content (depending on the content). The menu bar is made of 7 buttons; when you mouse over a button, you get a scrolling menu with different items, those buttons items have a rollover effect and when you click on one of this items it will load either a flash or html content in the right/mainframe of my dreamweaver site. My question is what is the best way to build this navigation bar so that when i click on one of this item, it will load the correct content in the right/main.frame.html. When this occurs, i want that the scrolling menu still displays while the content is loading so that when the visitor have seen the content, he just needs to click to another item to load the content (so no ectra step). Please help me with this as it urges.
Be clear in your responses as i am not a pro of actionscrit!
Many thanks, lineda
[MX04] HTML Tags Needs To Be Disabled In Dynamic Html Enabled Text Fields
Hi Buddies,
Am loading some dynamic text from an xml which has html tags inside dat text. I jus loading dat specified texts into a dynamic text fields where html is enabled and assisgned as a htmlText instead of normal text.
It works fine, but the thing is, i want to disable certain html tags to be rendered but it shud display as it is as a normal texts.
Is there any way to do dat
Dont Want To Render < HTML > Tags In HTML Enabled Dyna Text
Hi All,
Is there any way to display < HTML > tags in the HTML enabled dynamic text field with out actually rendering it ? one constraint is, I want to enable the HTML feature for that text field all the time. because, i want to render some other tags.
The problem is in my text field unable to display msgs having <> characters i.e. even if I say < hello > it is not displaying anything, because, it is treating it as HTML tag and trying to render it. Is there any work around to display this text as it is ??
Thank all in adv,
Getting Flash To Load HTML Pages Into Iframes In A Seperate HTML Page
Hi everybody
Does anybody know how to get Flash to load HTML pages into a seperate HTML page?
I'm currently running an animation within a webpage, and my client would like to be able to have some captions in HTML on the page that go with specific parts of the animation.
He wants the captions done in seperate HTML pages so that they can be changed into different languages at a later date.
I am loading these captions (HTML pages) into <iframes> on the page.
So far so good..... however...
I need to be able to get flash to load the HTML pages into the <iframes>, in certain points within the animation.
So... Does anybody know how to get Flash to load HTML pages into a seperate HTML page?
I'm guessing getURL is used somewhere, but I don't know the exact code.
Hope you can help!
Deadhands
Getting Flash To Load HTML Pages Into Iframes In A Seperate HTML Page
Hi everybody
Does anybody know how to get Flash to load HTML pages into a seperate HTML page?
I'm currently running an animation within a webpage, and my client would like to be able to have some captions in HTML on the page that go with specific parts of the animation.
He wants the captions done in seperate HTML pages so that they can be changed into different languages at a later date.
I am loading these captions (HTML pages) into <iframes> on the page.
So far so good..... however...
I need to be able to get flash to load the HTML pages into the <iframes>, in certain points within the animation.
So... Does anybody know how to get Flash to load HTML pages into a seperate HTML page?
I'm guessing getURL is used somewhere, but I don't know the exact code.
Hope you can help!
Deadhands
Passing HTML Form And Hidden Variables From Flash To Html Page
Hi,
I have a html/flash site now, http://www.zachariack.com.
i access email from my site itself by giving the userid and pwd text box which i copied from the actual website hosting my email access. i copied the entire
<form...></form> tag to my page and thus was able to put the name and pwd in my home page only and access the email in a separate window.
now i have redesigned my webpage using only flash. i would like to know how i can implement the same using flash. as i have not much experience using action scripting i am a bit stuck about how you pass the hidden form variables. the below is the the exact form syntax:
<form name="form1" action="http://www.accudatanet.com/mail/msglist.php" method=post>
<input type="hidden" name=sid value="E9697301F704A0CE947DEF42CF86636A">
<input type=text size=15 name=f_user value="">
<input type=hidden name=six value=0>
<input type=password size=15 name="f_pass">
<input type=submit name=submit value="Login >>" class="button">
</form>
how do i implement the above using action scripting. thanks.
regards,
vasant
Dynamic HTML Textbox Won't Display Flash Generated HTML?
I'll TRY to keep this simple... Keep in mind that the Hand Coded HTML works. It's the HTML that Flash writes that doesn't....
How I create the file:
------------------------
1st, I created a movie in Flash that has a HTML formated input box. So when I type things into that field, Flash automatically generates the HTML into the variable for the input box.
Next, I take that variable and display the HTML code in a dynamic text field. Then I copy and paste it into a text file, assign it a variable (myText=....), then I save it to my harddrive.
Got me so far?
The Problem
-------------------------
I have another movie that is just supposed to load the txt file and display the code in an Dynamic HTML text field. However... Flash can't seem to read the HTML that it creates? But it can read the HTML that I simplify and hand write. Does anyone know what I can do to use the Flash generated HTML?
Here is the code in the movie
----------------------------------------------
Code:
loadVarsText = new loadVars();
// load the text file
loadVarsText.load("scroller.txt");
// function which fires when the data is loaded:
loadVarsText.onLoad = function(success) {
if (success) {
// activate html
scroller.html = true;
// myText is var to put in the textfile
scroller.htmlText = this.myText;
} else {
trace("not loaded, try again!");
}
};
Below is what i'm loading into my movie. It's the HTML that Flash Generates from the input box, and below that is the HTML that I hand coded. HOWEVER I CAN'T GET THIS TO DISPLAY THE HTML CODE
FLASH CODE
-----------------------------
myText=<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="12" COLOR="#000000"></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="12" COLOR="#000000">* A hospital-acquired infection caused by methicillin-resistant Staphylococcus aureus or vancomycin-resistant Enterococcus can double the time a patient stays in the hospital</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="12" COLOR="#000000"></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="12" COLOR="#000000">* Infections in burn wounds account for 3 to 7of all infections in patients with burns, occurring most frequently in children, followed by the elderly</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="12" COLOR="#000000"></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="12" COLOR="#000000">* An analysis of post-surgical wound infections following head and neck surgery demonstrated an increase in the average hospitalization period from 14 days when wounds healed without complication, to 24 days when the wounds became infected.</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="12" COLOR="#000000"></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="12" COLOR="#000000">* In a survey of 96 English hospitals, surgical site infections led to an additional hospital stay of 6.5 days, and the hospital costs were doubled.</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="12" COLOR="#000000"></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="12" COLOR="#000000">* About 59of diabetic lower extremity amputations are proceeded by an infected foot ulcer; among people with diabetes (150 million globally), 15will experience a foot ulcer in their lifetime</FONT></P></TEXTFORMAT>
MY CODE
----------------------------------------------
myText=* A hospital-acquired infection caused by methicillin-resistant Staphylococcus aureus or vancomycin-resistant Enterococcus can double the time a patient stays in the hospital<br><br>* Infections in burn wounds account for 3 to 7% of all infections in patients with burns, occurring most frequently in children, followed by the elderly<br><br>* An analysis of post-surgical wound infections following head and neck surgery demonstrated an increase in the average hospitalization period from 14 days when wounds healed without complication, to 24 days when the wounds became infected.<br><br>* In a survey of 96 English hospitals, surgical site infections led to an additional hospital stay of 6.5 days, and the hospital costs were doubled.<br><br>* About 59% of diabetic lower extremity amputations are proceeded by an infected foot ulcer; among people with diabetes (150 million globally), 15% will experience a foot ulcer in their lifetime
Thanks in advance for any help you can give
Frequent-C
http://www.Freq-Fest.com
[Edited by Frequentc on 06-10-2002 at 05:06 PM]
|