all groups > flash actionscript > june 2005 >
You're in the

flash actionscript

group:

DOM manipulation from Flash


Re: DOM manipulation from Flash David Stiller
6/19/2005 9:15:08 PM
flash actionscript:
RadekBurkat,

[quoted text, click to view]

No. SWFs run inside an instance of the Flash Player, which in the
browser makes its appearance as the Flash Player plug-in. As such,
ActionScript, doesn't ever "see" the HTML DOM its in. In a sense,
ActionScript doesn't care who hosts it, the plug-in or the Projector (or,
heck, something else), as long as the thing hosting it understands SWFs.

Flash's DOM exists only in regard to Flash JavaScript, which is a
language used to extend the IDE itself -- in other words, Flash JS doesn't
work in SWFs, but it used to write productivity tools for authoring in
Flash, much like JavaScript and the Dreamweaver DOM can be used to Extend
that program via Extensions.

[quoted text, click to view]

How matter how it seems, that's the way to do it. Write your functions
in JavaScript proper, embedded in or linked out from the HTML document, and
use FSCommand or simply getURL() to call your JS functions.


David
stiller (at) quip (dot) net
"Luck is the residue of good design."

DOM manipulation from Flash RadekBurkat
6/19/2005 11:54:23 PM
It's my first weekend with Flash and it looks like a great development
envoironment. Here is a dumb guy question.
I usually do my development in JS/DHTML, but looking at actionscript along
along with the other features Flash, I am thinking that I can do all of my
development in Flash. Can I manipulate the DOM (Document Object Model) of the
browser (Not the Flash DOM) directly from actionscript? It would just seem to
me that would be a very useful thing to do.
I suppose I could write a JS proxy function to do that but that just seems
like a bit of a hack.

So, the DOM manipulation, is that something that currently is possible? Other
idea of hoe to do this?

Thanks
AddThis Social Bookmark Button