Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Send variables through skins with flash

  1. #1
    Low Bitrate fabi1's Avatar
    Join Date
    Nov 2007
    Location
    joyeuse, france
    Posts
    63

    Send variables through skins with flash

    Hello,
    Would it be possible to write whatever we want in the text file? Would permit to send variables to swfs embed in different screens.

    Or is there any other way to send variables through screens with flash? I tried with SETLABEL, SETVAR or SETFLASHVAR (which I didn't really understand the purpose), but none if the gave me any result.
    Anyone to help?
    Thanks.
    Flash skin progress: ...50%
    Car restoring progress: ... As seen on picture ;)
    My music:
    http://www.jamendo.com/en/album/6933/
    My job:
    http://www.fa-b.net

  2. #2
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,121
    Blog Entries
    51
    you're gonna have to be more descriptive in what you're trying to do. are you trying to get RR variables read in flash or flash variables read in RR? The point of SETFLASHVAR is to have variables you set in RR to display in flash. For instance. SETFLASHVAR;TRACKCOUNTVAR;1000 would display the number "1000" in a dynamic text you create in flash named _root.TRACKCOUNTVAR. Basically its a way to display RR variables just like we display RR labels.

    If you wanted to set a flash var in RR you would set the variables content in flash then use SETVAR to get it into RR. For example

    Code:
    _root.spriteCount=150
    fscommand("SETVAR;SPRITECOUNTVAR;" add _root.spritecount)
    mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
    Find my plugins on the MP3Car App Store!
    Follow Me on Twitter or Facebook
    Live mp3Car Facebook Chat

  3. #3
    Low Bitrate fabi1's Avatar
    Join Date
    Nov 2007
    Location
    joyeuse, france
    Posts
    63
    What I want is send a variable like goto=dl from a flash in let's say gps screen, to a flash in audio_browser screen.

    So let's go for this:
    fscommand("SETVAR;goto;dl")

    So this would send my goto to rr
    then, how can I poll it from my other flash?
    If I poll _root.goto from my other flash, i don't get anything.

    Secondly, I would like to be able to put variables in a text file in order to be able to save preferences directly from flash.
    thanks
    Flash skin progress: ...50%
    Car restoring progress: ... As seen on picture ;)
    My music:
    http://www.jamendo.com/en/album/6933/
    My job:
    http://www.fa-b.net

  4. #4
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,818
    After this:

    fscommand("SETVAR;goto;dl","");

    do this from any flash object you want to read the variable from:

    fscommand("setflashvar;goto;$goto$");

    and you should have _root.GOTO set and ready to use, but DO REALIZE that it will be UPERCASE (_root.goto lowercase may have nothing).
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

  5. #5
    Low Bitrate fabi1's Avatar
    Join Date
    Nov 2007
    Location
    joyeuse, france
    Posts
    63
    Not sure i understand it all:
    fscommand("SETVAR;goto;dl",""); // creates the variable and send it to rr from flash.
    fscommand("setflashvar;goto;$goto$");// is supposed to poll the variable?



    to be sure to be understood:
    let's say i create a variable with the flash of first screen. Its name is goto. The reason for this is that I use 3 screens.
    First screen (menu.skin) is just intro and loads audio_browser screen.
    In Audio_browser, we have playlist and dir list.
    And a third screen is for embed apps. From this screen, a button goes to playlist, and another to dir list, both load audio_browser screen. I want to create a variable that will tell the flash in audio_browser to go in playlist (goto=pl) or dir list (goto=dl).


    My problem is to get this variable from the flash (a kind of LOADVAR)
    Thanks.
    Flash skin progress: ...50%
    Car restoring progress: ... As seen on picture ;)
    My music:
    http://www.jamendo.com/en/album/6933/
    My job:
    http://www.fa-b.net

  6. #6
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,121
    Blog Entries
    51
    i still dont exactly know what you are trying to do with the 3 variables... but in your example GETVAR would be the same thing as SETVAR. SETVAR sets a global variable in RR that you can access from ANY screen. As i said .. i dont exactly understand what ur trying to accomplish... but it seems that if you had 2 "audio_browser" screens and a button for each (one for the PL one for the DL) that would work better than trying to set any RR variables.
    mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
    Find my plugins on the MP3Car App Store!
    Follow Me on Twitter or Facebook
    Live mp3Car Facebook Chat

  7. #7
    Low Bitrate fabi1's Avatar
    Join Date
    Nov 2007
    Location
    joyeuse, france
    Posts
    63
    pl an dl are on the same screen, same flash.
    So when I load this screen, I need to know where to go (dl or pl) and this was stated by a button on another skin (embed_apps), which will set this variable: goto=pl or goto=dl.

    How I'm trying.
    first button:
    on (release){
    fscommand("SETVAR;goto;dl","");
    fscommand("LIST","")
    }

    second button:
    on (release){
    fscommand("SETVAR;goto;pl","");
    fscommand("LIST","")
    }

    then in the flash embed in LIST skin, I want to be able to load goto. I.E goto=_root.GOTO.So when I call goto in flash i get dl or pl.
    My question is: do i need to do something in flash to load goto? An equivalent to loadVariables of flash. Because my textfield doesn't show anything.
    Flash skin progress: ...50%
    Car restoring progress: ... As seen on picture ;)
    My music:
    http://www.jamendo.com/en/album/6933/
    My job:
    http://www.fa-b.net

  8. #8
    Low Bitrate fabi1's Avatar
    Join Date
    Nov 2007
    Location
    joyeuse, france
    Posts
    63
    ok got it. thanks guino.
    Flash skin progress: ...50%
    Car restoring progress: ... As seen on picture ;)
    My music:
    http://www.jamendo.com/en/album/6933/
    My job:
    http://www.fa-b.net

  9. #9
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,818
    setflashvar is your loadvar in this case.. though it can also be used outside your flash object.. but really, what you're doing is using RR's variables as a buffer to transfer data between your flash objects..
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

  10. #10
    Low Bitrate fabi1's Avatar
    Join Date
    Nov 2007
    Location
    joyeuse, france
    Posts
    63
    Exactly.
    I did the way you told me a few post ago SETVAR to create the variable and setflashvar to load it, and it's working perfectly.
    Thanks Guino.
    Flash skin progress: ...50%
    Car restoring progress: ... As seen on picture ;)
    My music:
    http://www.jamendo.com/en/album/6933/
    My job:
    http://www.fa-b.net

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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