SharedObjects not working

I am trying to create a cookie using sharedObjects. It is
basic. I want to test wether a user has been to a particular web
page before. If they have, I want to redirect them to another page.
If not, continue to load the current page.
Sounds simple... But my code is not working and I am going to
pull my hair out!
I created a small flash swf file that I am including on a
html page. The flash file simply checks the sharedObject on the
users machine to see if the file exists. (in theory)
Can you see what I am missing to make this work?
This is what I have...
The first script that executes is this:
stored_user_rest = local_data.data.user_rest; //reads the
file to see if they visited before
if (stored_user_rest != "1") { // I set the
local_data.data.user_rest file to "1" later on to indicate they
have been here before
getURL("
http://www.discoversml.com/previous.html");
//this is the url I want to redirect to. If the answer is false
then it should continue on and go to the next scene where the
script lives below:
Then in a new scene same flash file I put:
local_data = SharedObject.getLocal("user_data"); //write the
file for the first time
local_data.data.user_rest = "1"; //set user_rest = 1 to
indicate they have visited now
local_data.flush ();
stop;
So, in theory, when they return to this page, which is
restaurant.html, the flash swf plays and executes the scripts and
hopefully will find that they have been there before and redirect
to previous.html.
Help!!

in your first line of script local_data is undefined. you
should be using sharedobject getLocal() method to define it.
and use the attach code option to display code.

Similar Messages

  • SharedObject not working with 'Debuggin Permitted' NOT checked in publish settings

    Hello,
    I have run into a strange problem writing out SharedObject
    data. If I select(check) Debugging permitted in the publish
    settings the data is written correclty. If I uncheck the option,
    the data is not written. The flush() call returns true in both
    cases.
    Could this be a security related issue?
    Thanks,
    Brad

    Hey florsignol,
    I understand that your monitor, while appearing in System Preferences, doesn't display anything; however, it works fine in BootCamp. These are the applicable troubleshooting steps I would go through to resolve the issue:
    1. Reset the System
    You can reset the Mac's parameter RAM and SMC.
    2. Reset the resolution
    Start by resetting the Mac's parameter RAM. If the display does not come up, was previously set to an unsupported resolution, and still results in no video:
    Start up in Safe Mode.
    From the Apple () menu, choose System Preferences.
    Choose Displays from the View menu to open the preferences pane.
    Select any resolution and refresh rate that your display supports.
    Restart your computer.
    from: Apple computers: Troubleshooting issues with video on internal or external displays
    http://support.apple.com/kb/HT1573
    All the best,
    Delgadoh

  • Better privecy does not work with windows vista home prem. what other program removes LSO'S AND HOW can I stop trackers?

    Question
    better privacy does not work with windows vista home prem. what other program removes LSO'S AND HOW can I stop trackers? edit
    Details

    As a temporary workaround, I believe this Adobe management page allows you to clear your "Flash cookies": [http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager07.html Adobe - Flash Player : Settings Manager - Website Storage Settings panel] (hosted on macromedia.com -- Macromedia was the original developer of Flash).
    Regarding the script error, if I'm reading the script correctly, it is related to accessing your Flash cookies directory. It seems the publisher's support forum is not currently available for searching, but that might be a good next step.
    In the meantime, could you check whether the script has the correct location for your Flash cookies directory? If you can't access Tool > BetterPrivacy, you could check here:
    (1) In a new tab, type or paste '''about:config''' in the address bar and press Enter. Click the button promising to be careful.
    (2) In the filter box, type or paste '''bpr''' and pause while the list is filtered
    (3) There should be a bolded setting named '''extensions.bprivacy.DataDir''' which looks approximately like the following:
    C:\Users\''yourWindowsUsername''\AppData\Roaming\Macromedia
    Do you have a similar value? If you paste the path used by BetterPrivacy into a Windows Explorer window, does it open? Also, click a couple levels in the folder, can you see:
    Flash Player \ #SharedObjects
    If the value is wrong, right-click the wrong value and choose Reset. BetterPrivacy should update the value the next time you try to access it.
    If the value is blank, you could try inserting a sensible value and see whether that helps.
    Any luck?

  • As2 fscommand not working

    Basically I want to use fscommand to write a local file. I think there may be some issues -- 
    variable = "1235";
    path = "file.txt";
    fscommand ("save", path);
    textbox1.text = "HI"; //just so i know it is getting to this point.
    One, does this work on vista? I am running vista so that may be why its not working.
    Two, I also heard rumors about it not working in IE7 or higher, is that true?
    Three, I also have read that it only works when running the swf file in flash projector, is that true?

    If I understand you correctly, I think the 'shared object' might be what you need.
    The AS2 Language Reference in F8 starts off like this:
    "The SharedObject class is used to read and store limited amounts of data on a user's computer. Shared objects offer real-time data sharing between objects that are persistent on the user's computer. Local shared objects are similar to browser cookies. ....."
    hope that helps.

  • Flash, AS2 fscommand not working

    hi,
    I have a flash application working fine in a html page. i want to add javascript interaction.
    I see that i have to use fscommand . when i compile and execute my flash application inside flash CS4 and test it directly from the generation directory (D:\dev\flash\myApp), it work find.
    If i copy my project directory in another directory (D:\dev\flash\release\myApp), it's not working.
    I don't understand why !
    I never reach the javascript code.
    Thanks for your help.

    If I understand you correctly, I think the 'shared object' might be what you need.
    The AS2 Language Reference in F8 starts off like this:
    "The SharedObject class is used to read and store limited amounts of data on a user's computer. Shared objects offer real-time data sharing between objects that are persistent on the user's computer. Local shared objects are similar to browser cookies. ....."
    hope that helps.

  • Prepare a binder for the service requests is not working

    Hi all I did migration from stellet 7.5 tp oracle cs 10gr3 but my component is not working well the problem is in getEnvironment I think can any body help
    thanks
    here is the code how can i fix it
    // prepare a binder for the service requests
    DataBinder serviceBinder = new DataBinder();
    serviceBinder.setEnvironment(SharedObjects.getEnvironment());

    What is Oracle CS 10gR3? Is this an E-business component? In that case this is not the appropriate forum...

  • NetConnection.proxyType not works

    Hi,
    I need a solution for this: when the port 1935 is closed, the NetConnection switch rtmpt (port 80). The NetConnection class built in function: proxyType="HTTP" not works or I use not rightly.
    In the FLVPlayback class works this function, but I don't know how...
    Please help me!
    Thank's!

    Thank's for the patience:-)
    Say if 1935 is not blocked - your rtmp connection is going through fine? It's fine
    Now when 1935 is blocked - if you try rtmpt directly does the connection go through.  It's fine, but much slower compared to rtmp: connect, sharedObject read-write, etc...is it normally???
    if you don't set up proxyType property at all - what results do you see. The rtmp not works, but the rtmpt works. (if port 1935 closed)
    Also have you configured FMS to listen to 80? Yes.

  • Not work tablet UI on Prestigio 5080 PRO tablet

    I read that browser.ui.layout.tablet = "1" can fix this problem. But it not works. I can work only in pnone interface that is not good for my 8'' tablet.

    Would it be possible for you to share the problematic pdf and OS information  with us at [email protected] so that we may investigate?
    Thanks,
    Adobe Reader Team

  • Why self-defined access sequences of free goods can not work?

    Hi gurus,
    I have maintained access sequences of free goods self-defined.but when i creat the SO it does not work!
    when i used the standard access sequences ,it is OK .
    Can anybody tell me why?
    thanks in advance

    Dear Sandy,
    Go to V/N1 transaction select your self defined access sequence then go in to the accesses and fields and check all fields are activated.
    Make sure that these fields are flowing in your sales order.
    I hope this will help you,
    Regards,
    Murali.

  • Adobe bridge raw not working with windows vista in photoshop cc, why?

    adobe bridge raw not working in photoshop cc, is there a fix?

    Your sure your using photoshop cc on windows vista?
    I was under the impression that photoshop cc would not even install on windows vista.
    What version of camera raw do you have?
    In photoshop under Help>About Plugin does it list Camera Raw and if so which version is it?
    (click on the words Camera Raw to see the version)
    Camera raw doesn't work if it's a camera raw file or some other file type such as jpeg or tif?
    What camera are the camera raw files from?
    Officially camera raw 8.3 is the latest version of camera raw that will work on windows vista.

  • Adobe Bridge CS5 in windows 7 not working?

    Adobe Bridge CS5 in windows 7 not working. I was using bridge perfectly for last 2 years. It stops working since 3 days. I tried to install updates. Showing some error to install.
    Tried to install creative cloud..again some error. Error code : 82
    Could you please advice how I can fix my adobe bridge.

    https://www.youtube.com/watch?v=xDYpTOoV81Q&feature=youtu.be
    please check this video I uploaded..this is what happens when I click adobe bridge.. just blinks and go off. bridge not working on task manager

  • ADOBE CLOUD ON MY DESKTOP WILL NOT WORK. IT LOADS UP BUT NOTHING FILLS THE WINDOW

    ADOBE CLOUD ON MY DESKTOP WILL NOT WORK. IT LOADS UP BUT NOTHING FILLS THE WINDOW

    BLANK Cloud Screen http://forums.adobe.com/message/5484303 may help
    -and step by step http://forums.adobe.com/thread/1440508?tstart=0
    -and http://helpx.adobe.com/creative-cloud/kb/blank-white-screen-ccp.html

  • Partner application logoff not working

    We have a partner application registered with sso with custom login screen. The login works fine. We use the following code to logoff the partner application in logoff.jsp
    response.setHeader("Osso-Return-Url", "http://my.oracle.com" );
    response.sendError(470, "Oracle SSO");
    session.invalidate();
    but the logoff is not working properly. It is not invalidating the session and the logout http request is not going from the application server to the sso server.
    Are there any additional configurations for SSO logoff.Any help is appreciated.
    Thanks

    Hi
    The WF should also trigger if i add the Partner function in UI.If i change any Attribute the WF triggers but i dont want to change the attribute when i add the partner function.
    If i have only one event for WF that is Partner Change the WF will not trigger it for the 1st time when i save the UI. But next i come to the same saved doc and add a partner function then the Wf triggers.
    So this means that Partner change is active.
    the issue here is i need to trigger the WF on , the 1st time i save the UI, for which i wil be using Attribute Change and next time when i come back to saved doc the and add only the partner function and no changes are made to attributes the WF should again trigger.
    Thanks
    Tarmeem

  • IPhone 4 Voice Memos not working/saving

    Hi there,
    I'm having trouble with my voice memos too. Up until yesterday they were working fine and now, even though the record button works, the stop button does not and I can only pause them. Worse again is that the button to go into the menu to view all voice memos is not working so I can't play them from my iPhone and nothing new is saving to my iTunes. Please help!

    I've always had the "Include Voice Memos" option selected. I think that only pertains to syncing voice memos from iTunes to the iPhone after it has been copied to iTunes. It has to be the new OS/iTunes not communicating that new memos have been recorded. For some reason they won't sync when I want them to, and then a few syncs later they magically appear.
    By the way, I'm VERY comfortable with the iTunes and iPhone systems. I've been using iTunes for 5 years, and I've been recording class lectures with the iPhone voice memo app (and another app) for a couple years. It's not an error of not seeing that the memos were added; they don't exist in my library or music folders.
    JUST OUT OF CURIOSITY, POST WHICH FIRMWARE YOU ARE RUNNING EXACTLY!!!
    I'm on an iPhone 4, running firmware 4.0.1

  • Installed Premiere Pro CS4 but video display does not work?

    I just got my copy of CS$. After installing Premiere I found two things that seem very wrong:
    1) video display does not work, not even the little playback viewer next to improted film clips located on the project / sequence window. Audio works fine.
    2) the UI is way too slow for my big beefy system.
    My pc is a dual boot Vista-32 and XP system with 4GB of memory installed and nvidia geforce 280 graphics board with plenty of GPU power. The CS4 is installed on the Vista-32 partition. My windows XP partition on the same PC with Premiere CS2 works great and real fast.
    Any ideas how to solve this CS4 install issue?
    Ron

    I would like to thank Dan, Hunt, and Haram:
    The problem is now very clear to me. The problem only shows up with video footage imported into PP CS4 encoded with "MS Video 1" codec. So this seems to be a bug. The codec is very clearly called out and supported within various menues but video with this codec just will not play in any monitor or preview window. In addition the entire product looks horrible with respect to performance while PP CS4 trys its best to play the video. Audio will start playing after about 30 seconds. And once in awhile part of video shows up at the wrong magnification before blanking out again.
    My suggestion to the Adobe team: fix the bug and add some sample footage to the next release so new installations can test their systems with known footage.
    My PC is brand new with the following "beefy" components:
    Motherboard
    nForce 790i SLI FTW
    Features:
    3x PCI Express x16 graphics support
    PCI Express 2.0
    NVIDIA SLI-Ready (requires multiple NVIDIA GeForce GPUs)
    DDR3-2000 SLI-Ready memory w/ ERP 2.0 (requires select third party system memory)
    Overclocking tools
    NVIDIA MediaSheild w/ 9 SATA 3 Gb/sec ports
    ESA Certified
    NVIDIA DualNet and FirstPacket Ethernet technology
    Registered
    CPU: Intel Core 2 Quad Q9550
    S-Spec: SLAWQ
    Ver: E36105-001
    Product Code: BX80569Q9550
    Made in Malaysia
    Pack Date: 09/04/08
    Features:
    Freq.: 2.83 GHz
    L2 Cache: 12 MHz Cache
    FSB: 1333 MHz (MT/s)
    Core: 45nm
    Code named: Yorkfield
    Power:95W
    Socket: LGA775
    Cooling: Liquid Cooled
    NVIDIAGeForce GTX 280 SC graphics card
    Features:
    1 GB of onboard memory
    Full Microsoft DirectX 10
    NVIDIA 2-way and 3-way SLI Ready
    NVIDIA PureVideo HD technology
    NVIDIA PhysX Ready
    NVIDI CUDA technology
    PCI Express 2.0 support
    Dual-link HDCP
    OpenGL 2.1 Capaple
    Output: DVI (2 dual-link), HDTV
    Western Digital
    2 WD VelociRaptor 300 GB SATA Hard Drives configured as Raid 0
    Features:
    10,000 RPM, 3 Gb/sec transfer rate
    RAM Memory , Corsair 4 GB (2 x 2 GB) 1333 MHz DDR3
    p/n: TW3X4G1333C9DHX G
    product: CM3X2048-1333C9DHX
    Features:
    XMS3 DHX Dual-Path 'heat xchange'
    2048 x 2 MB
    1333 MHz
    Latency 9-9-9-24-2T
    1.6V ver3.2

Maybe you are looking for

  • How to connect my iphone 3 to an Airport Extreme, latest model?

    yesterday I bought the latest Airport extrame. installed, all fine, it workt with iphone5, laptops, no problem. But with iPhone 3 no change. What to do

  • Add XML Publisher Administrator responsibility with EBS 11.5.9

    Hi all ! I'm exploring the possibility to use XML Publisher inside Oracle E Business Suite 11.5.9. because...unfortunately it's not possible to upgrade EBS to the 11.5.10 version I found a note on the forum which says: "Starting from 11.5.9 the XMLP

  • Home Sync Not Working! Please Help!

    Hi Everyone, So I have a Mac Mini running Snow Leopard Server and two clients three clients all running Lion. Everyone has Portable Home Directories with File Syncing which syncs up documents and the desktop folder This seems to be working fine excep

  • Airport Extreme - VDSL25 - IPTV

    Hello, is there anyone who can say me that IPTV ( T-Home Entertain HD ) with the Airport Extreme ( not Wi-Fi) will work? VDSL-Modem Speedport 221 -> Airport Extreme WAN -> Airport Extreme Gigabit-Ethernet-LAN -> Media Receiver 301 Thank you very much

  • Problem with i_buffer_active in the function module

    i_buffer_active in the function module "REUSE_ALV_FIELDCATALOG_MERGE"   hi folks, i am using this  function module "REUSE_ALV_FIELDCATALOG_MERGE" to develop a field catalog....but teh problem is that when i use this i_buffer_active and if a assign va