Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Linking to external HTML page

New Here ,
Jul 10, 2007 Jul 10, 2007
i cant find a way to link to external html with AS 3.0. Everythign i find from searchign on forums and tutorial sites sais use getURL();, but i always get an error when doing this in AS3.0 so i'm guessing that this isnt a valid way to do it anymore :/? Can anybody lend a hand? Id like to load it from a button to a new window. I just need the load page cammand though, i can do the button listener and function and all that by now hehe^^. Thx in advance^^


(also, i ask alot of noob as 3.0 questions. anybody know a good beginner book for AS 3.0. I have the O'Reilly AS 3.0 cookbook but this doesnt offer the noob support i need..lol)
TOPICS
ActionScript
674
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 10, 2007 Jul 10, 2007
I have never tried with HTML but with ASP this works fine
try this:

var imgnam:String;
imgnam = loadVariables(" http://yor.com/urpage.asp","post");

//m1 (the instance of movie) u can create dynamically or at design time

m1.loadMovie(imgnam,"post");
m1._x = 40;
m1._y = 10;
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 10, 2007 Jul 10, 2007
ty for the reply^^. Still having problems though. Whenever i run this code i get the following errors.
var imgnam:String;
imgnam = loadVariables(" http://yor.com/urpage.asp", "_blank");

//m1 (the instance of movie) u can create dynamically or at design time

this.loadMovie(imgnam, "_blank");


1180: Call to a possibly undefined method loadVariables.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Jul 10, 2007 Jul 10, 2007
AS3 use navigateToURL()
something like...
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 10, 2007 Jul 10, 2007
ty dzedward^^ that works great when i test it within flash. But once i publish it i keep getting errors. Security errors like this one.

SecurityError: Error #2146: Security sandbox violation: http://www.filmsenshi.com/testing/mainMovie.swf cannot call navigateToURL because the HTML/container parameter allowNetworking has the value internal.
at global/flash.net::navigateToURL()
at mainMovie_fla::MainContentMovie_21/aboutMeListener()

im hosting my file on my own server, but its embeded on a page that is located on somebody elses server. So does this mean i'm unable to do this? or is there a way around that :/. thx^^
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Jul 10, 2007 Jul 10, 2007
Security.allowDomain("*"); im not sure if thats the correct syntax but for AS2 its System.security.allowDomain("*"); check the migration in the help docs.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 10, 2007 Jul 10, 2007
ok so the embed code where i'm accessing the file from is

<object type="application/x-shockwave-flash" allowScriptAccess="never" allowNetworking="internal" height="550" width="950" data=" http://www.filmsenshi.com/testing/mainMovie.swf">
<param name="allowScriptAccess" value="never" />
<param name="allowNetworking" value="internal" />
<param name="movie" value=" http://www.filmsenshi.com/testing/mainMovie.swf" />
<param name="wmode" value="transparent" />
<param name="menu" value="false" />
<param name="quality" value="high" />
</object>

and if i try and change
<param name="allowNetworking" value="internal" />
to
<param name="allowNetworking" value="external" />
it changes it right back to internal :(. So i'm guessing this means, there is no way around it? I guess i cant create links to any websites from my flash. /sigh. Well if anybody knows a way around this, would be apreciated, but if not ty for your help :). At least i leanred how to link to another page for my next site attempt that wont have this stupid filter..hehe
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 11, 2007 Jul 11, 2007
LATEST
Take a look at the docs on allowNetworking:
http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhel
p.htm?context=LiveDocs_Parts&file=00001079.html

This should help to explain how this works.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines