Anybody very familiar with Flash/Actionscript?

Discussion in 'OT Technology' started by venger240, Feb 3, 2006.

  1. venger240

    venger240 Hoemoe

    Joined:
    Oct 20, 2003
    Messages:
    2,938
    Likes Received:
    0
    Location:
    Nashville, TN
    I need help with a project for OT...

    I need to know how to have a flash movie execute a js file...
     
  2. venger240

    venger240 Hoemoe

    Joined:
    Oct 20, 2003
    Messages:
    2,938
    Likes Received:
    0
    Location:
    Nashville, TN
    PHP:
    function executeJS(jsURL:String) {
    var 
    lv:LoadVars = new LoadVars();
    lv.onData = function(src:String) {
      if (
    src != undefined) {
        
    getURL("javascript: " src);
      }
    }

    lv.load(jsURL);
    }
    executeJS("test.js");
    I need something that is going to do this, but actually work. THis does not work for somereason...
     
  3. projectalpha

    projectalpha 二號 Stunna

    Joined:
    Aug 4, 2001
    Messages:
    17,671
    Likes Received:
    0
    Location:
    Bay Area, California
    what exactly isn't working?
     
  4. projectalpha

    projectalpha 二號 Stunna

    Joined:
    Aug 4, 2001
    Messages:
    17,671
    Likes Received:
    0
    Location:
    Bay Area, California
    I came up with a problem using loadVars when getting vars from a php script I wrote.

    The problem was that none of my vars were loading. I only needed one var and not an array, so I didn't think I needed a loop. Turns out that I did need one ("onLoad").

    This is what I came up with. I'm not sure if it helps or not.
    PHP:
    myLabels=new LoadVars();
    myLabels.load("blah.php");
    myLabels.onLoad = function(){
            
    stats.imgtitle.text=myLabels["title"];
        }
    }
     
  5. venger240

    venger240 Hoemoe

    Joined:
    Oct 20, 2003
    Messages:
    2,938
    Likes Received:
    0
    Location:
    Nashville, TN
    Im a complete newbie with actionscript. I think I understnad wahat that is doing, but Im not sure about this: stats.imgtitle.text=myLabels["title"];
     
  6. projectalpha

    projectalpha 二號 Stunna

    Joined:
    Aug 4, 2001
    Messages:
    17,671
    Likes Received:
    0
    Location:
    Bay Area, California
    oh, that was just part of my script. It took the "title" var from the php script and put it in the dynamic textfield "imgtitle" which was inside the movieclip "stats".
     
  7. venger240

    venger240 Hoemoe

    Joined:
    Oct 20, 2003
    Messages:
    2,938
    Likes Received:
    0
    Location:
    Nashville, TN
    Is there anyway you can write something simliar to that, so that onload the movie loads a javascript file?
     
  8. projectalpha

    projectalpha 二號 Stunna

    Joined:
    Aug 4, 2001
    Messages:
    17,671
    Likes Received:
    0
    Location:
    Bay Area, California
    do you need any vars from it?
     
  9. projectalpha

    projectalpha 二號 Stunna

    Joined:
    Aug 4, 2001
    Messages:
    17,671
    Likes Received:
    0
    Location:
    Bay Area, California
  10. venger240

    venger240 Hoemoe

    Joined:
    Oct 20, 2003
    Messages:
    2,938
    Likes Received:
    0
    Location:
    Nashville, TN
  11. projectalpha

    projectalpha 二號 Stunna

    Joined:
    Aug 4, 2001
    Messages:
    17,671
    Likes Received:
    0
    Location:
    Bay Area, California
    what exactly needs to be done for this spyspace thing? I have intermediate knowledge of AS and a lot of knowledge in PHP.
     
  12. Nonphixion

    Nonphixion New Member

    Joined:
    Oct 12, 2003
    Messages:
    13,323
    Likes Received:
    0
    Location:
    Syracuse, NY
    Tyrexx is the one I was talking about before... he has a verification script for OT'ers only. If that could be implimented that into the script, I could provide the bandwidth.

    If it remains restricted to OT'ers, the number of accounts won't get out of hand, and everything would stay manageable.
     
    Last edited: Feb 3, 2006
  13. Tyrexx

    Tyrexx OT Supporter

    Joined:
    Sep 23, 2004
    Messages:
    6,998
    Likes Received:
    2
    Location:
    Madison, WI
    Sorry, IDK :hs: see PM for details..
     
  14. Nonphixion

    Nonphixion New Member

    Joined:
    Oct 12, 2003
    Messages:
    13,323
    Likes Received:
    0
    Location:
    Syracuse, NY
    All that needs to be done is have your script being set up as a download control/log book for OT'ers
     
  15. fintheman

    fintheman I will ebay O/T!

    Joined:
    Oct 5, 2005
    Messages:
    2,092
    Likes Received:
    0
    Location:
    Brentwood, TN
    Hey, explain what you are exactly trying to do with the javascript inside the flash

    I'm at work now with the flash guru.
     
  16. venger240

    venger240 Hoemoe

    Joined:
    Oct 20, 2003
    Messages:
    2,938
    Likes Received:
    0
    Location:
    Nashville, TN

    All i need is a simple movie, that runs some actionscript. This actionscript will execute a javascript file. Thats all.
     
  17. projectalpha

    projectalpha 二號 Stunna

    Joined:
    Aug 4, 2001
    Messages:
    17,671
    Likes Received:
    0
    Location:
    Bay Area, California
    I'm thinking you might need to use "fscommand" to execute it.
     
    Last edited: Feb 3, 2006
  18. Nonphixion

    Nonphixion New Member

    Joined:
    Oct 12, 2003
    Messages:
    13,323
    Likes Received:
    0
    Location:
    Syracuse, NY
    Bump for programming halp :mamoru:
     
  19. projectalpha

    projectalpha 二號 Stunna

    Joined:
    Aug 4, 2001
    Messages:
    17,671
    Likes Received:
    0
    Location:
    Bay Area, California
  20. projectalpha

    projectalpha 二號 Stunna

    Joined:
    Aug 4, 2001
    Messages:
    17,671
    Likes Received:
    0
    Location:
    Bay Area, California
    this shit is really frustrating. :mad:
     
  21. Nonphixion

    Nonphixion New Member

    Joined:
    Oct 12, 2003
    Messages:
    13,323
    Likes Received:
    0
    Location:
    Syracuse, NY
    Think of the possibilities though :eek3:
     
  22. Goobie

    Goobie *TK429, why aren't you at your post?*

    Joined:
    Jan 13, 2006
    Messages:
    543
    Likes Received:
    0
    In for possible code. :bowdown:
     
  23. projectalpha

    projectalpha 二號 Stunna

    Joined:
    Aug 4, 2001
    Messages:
    17,671
    Likes Received:
    0
    Location:
    Bay Area, California
    the reason geturl and all that is failing in myspace is that I just found that myspace automatically enters "allowscriptaccess="never"" in the embed tag. If you try and change it to "always", myspace inserts another "allowscriptaccess="never"" into the tag.

    From Macromedia:
    allowscriptaccess prevents flash movies from calling geturl javascript and thereby interacting with the containing site.

    Earlier versions of the player ignore allowscriptaccess, which is leading me to believe that spyspace was coded in an earlier version which can bypass this and uses FSCommand.
     

Share This Page