Submit Your Article Forum Rules

Results 1 to 5 of 5

Thread: Can Anyone Help With Action Scritps

  1. #1

    Can Anyone Help With Action Scritps

    I am looking to make a small swf file that will play an audio track when someone reaches my site. I only want it to play 1 time. I know there are browser scripts that will track browser activity and allow you to do this outside of Flash, but I need to learn how to do it using just flash. Any thoughts?
    Capone De Leon
    Head of Design
    http://www.ManJonStudios.com
    Student of the net in constant search of "The WOW".
    A Zen like state in which creativity, talent, hard work and dedication
    create an amazing web site with a life all its own!

  2. #2
    WebProWorld MVP mikmik's Avatar
    Join Date
    Aug 2003
    Posts
    1,557
    Still no answer? I wish I could help.

    Are meaning like a session cookie so it only plays once per visit, so it doesn't reload every time they go back to the start/index page?

    You would still need to store the IP info outside of the SWF, I think. (Trying to spur some discussion) ;P
    Babies don't need a vacation, but I still see them at the beach... it pisses me off! I'll go over to a little baby and say 'What are you doing here? You haven't worked a day in your life!'
    Steven Wright

  3. #3
    So how would that work. Like a java script that I refer to in the action script of the swf?
    Capone De Leon
    Head of Design
    http://www.ManJonStudios.com
    Student of the net in constant search of "The WOW".
    A Zen like state in which creativity, talent, hard work and dedication
    create an amazing web site with a life all its own!

  4. #4
    WebProWorld MVP mikmik's Avatar
    Join Date
    Aug 2003
    Posts
    1,557
    I guess you CAN do it using just flash!

    You have to use something called 'SharedObject' that you create in the first frame of the movie like

    local_data = SharedObject.getLocal("played_data");
    local_data.data.played_yes = "True";
    local_data.flush ()

    stored_played_yes = local_data.data.played_yes;

    which creates a record on the client machine and so your movie can be set to look for this 'cookie', and if it is present, not to play.

    I am just learning this as I read it, so I am not sure all the commands or how to use this data yet, like a preloader that looks for a value I guess, but to play when the value is null, and not to play when true.

    I don't really know how to use action script LOL, I was hoping someone else would help, but here is the information to use yhis local and remote data store and retrieval:
    Using local shared objects in Macromedia Flash MX

    Good luck! There may be tutes elsewhere on specific situations, I would imagine. Maybe kirupa and cbtCafe etc.
    Babies don't need a vacation, but I still see them at the beach... it pisses me off! I'll go over to a little baby and say 'What are you doing here? You haven't worked a day in your life!'
    Steven Wright

  5. #5

    Thanks

    Thanks for your help, I checked out those sites and they were very helpful. Gotta love the help you get from Web Pro World! Thanks again.
    Capone De Leon
    Head of Design
    http://www.ManJonStudios.com
    Student of the net in constant search of "The WOW".
    A Zen like state in which creativity, talent, hard work and dedication
    create an amazing web site with a life all its own!

Similar Threads

  1. Anthropology in Action
    By WPW_Feedbot in forum Marketing Strategies Discussion Forum
    Replies: 0
    Last Post: 10-23-2005, 08:30 AM
  2. Anime Action
    By WPW_Feedbot in forum Graphics & Design Discussion Forum
    Replies: 0
    Last Post: 03-04-2005, 12:30 AM
  3. Lucene In Action
    By WPW_Feedbot in forum Search Engine Optimization Forum
    Replies: 0
    Last Post: 01-10-2005, 11:30 PM
  4. Action-Packed AOL?
    By Brittany in forum The Castle Breakroom (General: Any Topic)
    Replies: 10
    Last Post: 10-28-2003, 02:30 PM

Posting Permissions

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