A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: URL Request Problems

  1. #1
    Arabic Flash Guru sand_monkey's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    169

    URL Request Problems

    I am using the following code to load a URL when a button is pressed

    PHP Code:
    var url:String "http://www.google.com";
        var 
    req:URLRequest = new URLRequest(url);
        try
        {
            
    slides.slide8.loginNowBtn.alpha -= 0.1;
            
    navigateToURL(req);
        }
        catch (
    e:Error)
        {
            
        } 
    In the flash player it works fine, but in internet explorer the url doesn't load. The line to change the alpha on the button is just to test if the button works at all in ie... it does. Am I missing anything?
    Sand Monkey

    Flying is learning how to throw yourself at the ground and miss!

  2. #2
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    Render your page where it isnt working and post the source for your embed...It sounds like allowscriptacces/allowNetworking...

  3. #3
    Arabic Flash Guru sand_monkey's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    169
    it's actually catching an error, I figured out...

    SecurityError: Error #2028

    I still don't know what to do
    Sand Monkey

    Flying is learning how to throw yourself at the ground and miss!

  4. #4
    Arabic Flash Guru sand_monkey's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    169
    This is the html from the html file automatically created when you publish the movie from flash...

    PHP Code:
    <html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <
    head>
    <
    meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <
    title>QuickStartGuide</title>
    <
    script language="javascript">AC_FL_RunContent 0;</script>
    <
    script src="AC_RunActiveContent.js" language="javascript"></script>
    </
    head>
    <
    body bgcolor="#ffffff">
    <!--
    url's used in the movie-->
    <!--text used in the movie-->
    <!-- saved from url=(0013)about:internet -->
    <script language="javascript">
        if (AC_FL_RunContent == 0) {
            alert("This page requires AC_RunActiveContent.js.");
        } else {
            AC_FL_RunContent(
                '
    codebase', 'https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
                
    'width''968',
                
    'height''429',
                
    'src''QuickStartGuide',
                
    'quality''high',
                
    'pluginspage''https://www.macromedia.com/go/getflashplayer',
                
    'align''middle',
                
    'play''true',
                
    'loop''true',
                
    'scale''showall',
                
    'wmode''window',
                
    'devicefont''false',
                
    'id''QuickStartGuide',
                
    'bgcolor''#ffffff',
                
    'name''QuickStartGuide',
                
    'menu''true',
                
    'allowFullScreen''false',
                
    'allowScriptAccess','sameDomain',
                
    'movie''QuickStartGuide',
                
    'salign'''
                
    ); //end AC code
        
    }
    </
    script>
    <
    noscript>
        <
    object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" 

    codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="968" height="429" id="QuickStartGuide" 

    align="middle">
        <
    param name="allowScriptAccess" value="sameDomain" />
        <
    param name="allowFullScreen" value="false" />
        <
    param name="movie" value="QuickStartGuide.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />    <embed 

    src
    ="QuickStartGuide.swf" quality="high" bgcolor="#ffffff" width="968" height="429" name="QuickStartGuide" align="middle" 

    allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="https://www.macromedia.com/go/getflashplayer" 

    />
        </
    object>
    </
    noscript>
    </
    body>
    </
    html
    Sand Monkey

    Flying is learning how to throw yourself at the ground and miss!

  5. #5
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    Yeah, it's a sandbox issue. You might try setting allowScriptAccess to 'always' but I don't think thats the real problem. Take a look to make sure the code you upload doesnt get changed at runtime (yes, the html) when you load the page...it's a nasty trick places like Myspace use to lock down outbound links.

    http://livedocs.adobe.com/flash/9.0/...=00001079.html

  6. #6
    Arabic Flash Guru sand_monkey's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    169
    i changed it to 'always' and it still didn't work. here is a copy of the html at runtime (i right clicked and went 'view source' - i think that's what you meant)

    PHP Code:
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <
    head>
    <
    meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <
    title>QuickStartGuide</title>
    <
    script language="javascript">AC_FL_RunContent 0;</script>
    <
    script src="AC_RunActiveContent.js" language="javascript"></script>
    </
    head>
    <
    body bgcolor="#ffffff">
    <!--
    url's used in the movie-->
    <!--text used in the movie-->
    <!-- saved from url=(0013)about:internet -->
    <script language="javascript">
        if (AC_FL_RunContent == 0) {
            alert("This page requires AC_RunActiveContent.js.");
        } else {
            AC_FL_RunContent(
                '
    codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
                
    'width''968',
                
    'height''429',
                
    'src''QuickStartGuide',
                
    'quality''high',
                
    'pluginspage''http://www.macromedia.com/go/getflashplayer',
                
    'align''middle',
                
    'play''true',
                
    'loop''true',
                
    'scale''showall',
                
    'wmode''window',
                
    'devicefont''false',
                
    'id''QuickStartGuide',
                
    'bgcolor''#ffffff',
                
    'name''QuickStartGuide',
                
    'menu''true',
                
    'allowFullScreen''false',
                
    'allowScriptAccess','sameDomain',
                
    'movie''QuickStartGuide',
                
    'salign'''
                
    ); //end AC code
        
    }
    </
    script>
    <
    noscript>
        <
    object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="968" height="429" id="QuickStartGuide" align="middle">
        <
    param name="allowScriptAccess" value="always" />
        <
    param name="allowFullScreen" value="false" />
        <
    param name="movie" value="QuickStartGuide.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />    <embed src="QuickStartGuide.swf" quality="high" bgcolor="#ffffff" width="968" height="429" name="QuickStartGuide" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
        </
    object>
    </
    noscript>
    </
    body>
    </
    html
    Sand Monkey

    Flying is learning how to throw yourself at the ground and miss!

  7. #7
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    you missed two instances of it...use a find on 'sameDomain'

  8. #8
    Arabic Flash Guru sand_monkey's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    169
    yeah i changed them as well it didn't fix it, but when i embedded the swf in my own aspx file rather than just using the html file exported by flash, it worked
    Sand Monkey

    Flying is learning how to throw yourself at the ground and miss!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center