Results 1 to 9 of 9

Thread: Flash command question

  1. #1
    FLAC
    Auto Apps:loading...
    EL CAMINO's Avatar
    Join Date
    Jul 2005
    Location
    upland california us
    Posts
    1,282

    Flash command question

    doing some flash skinning i found a little issue, not sure if is a bug or is me not using the command correctly, heres whats happening.

    i need to poll a variable data, using this.

    Code:
    Label Polling from Flash: fscommand("GETLABEL","<LABEL CODE>");
    You may receive empty labels if they don't exist or are not used by RR at the current time.
    You may also poll RR VARIABLES using the syntax: fscommand("GETLABEL","=$MYVAR$")
    so if i ask for a label i.e.

    Code:
    fscommand("GETLABEL", "Time")
    i get _root.TIME this works perfectly



    BUT if i ask for a variable like this

    Code:
    fscommand("GETLABEL", "=$RRDroid_PATH$")
    _root.RRDROID_PATH is not created, i tried _root.$RRDROID_PATH$ nothing as well. so im asking for any help or guide on how to achieve what im after. thanks in advance.

    as of now, im using upon loading the screen,
    Code:
    SetFlashVar;RRDroid_PATH;$RRDroid_PATH$
    NOTE: i tried with known variables like "RRPATH" and "SKINPATH" just to make sure my custom var isnt the issue, and is the same.
    Last edited by EL CAMINO; 11-16-2012 at 02:43 PM.

  2. #2
    FLAC
    Auto Apps:loading...
    EL CAMINO's Avatar
    Join Date
    Jul 2005
    Location
    upland california us
    Posts
    1,282
    no reply? means no one knows how this works?.

    guino?, mitch? would you guys check please, not trying to say is a bug, but, seeing how is explained on Skin Commands how to use "GETLABEL" i guess the code is something similar to this.

    Code:
        Private Sub flash_FSCommand(sender As Object, e As AxShockwaveFlashObjects._IShockwaveFlashEvents_FSCommandEvent) Handles flash.FSCommand
            Select Case e.command.ToLower
                Case "getlabel"
                     flash.SetVariable(e.args.ToUpper, GetLBLValue(e.args.ToLower))
    
            End Select
        End Sub
    so if i ask for a label. works as it should, naming the new flash variable as the label requested.

    HTML Code:
    fscommand("GETLABEL", "Time")
    BUT if a RR variable is requested, wont work, because a flash variable cant be named _root.=$RRPATH$
    HTML Code:
    fscommand("GETLABEL", "=$RRPATH$")
    please correct me if im wrong. like i said, im using "FlashSetVar" command when loading the screen where the swf is embedded. works but i preffer to request the data from
    flash when the movie needs it.

  3. #3
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,818
    Sorry for the long delay on answering ...
    I believe you're correct as the getlabel command would 'try' to create the variables _root.=$VARNAME$ and probably fail if it doesn't conform to variable naming rules in flash.

    You can however obtain the same desired effect as fscommand("GETLABEL","=$VARNAME") using fscommand("setflashvar;VARNAME;$VARNAME$") -- it will not be as "immediate" as GETLABEL but it will work (you can even call fscommand("waitexec") to wait for the command to complete). I'm adding a "GETVAR" command directly to avoid the problem and work as immediate as GETLABEL - PM me if you want a test version.
    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."

  4. #4
    Variable Bitrate
    Join Date
    Sep 2012
    Location
    Germany - Munich
    Posts
    331
    i tried to change my script to getvar, but it don't work. could you check my script?

    Code:
    this.onEnterFrame = function () {
    var tmp
    
    if (_root.IBuscommunicatoRR_COOLANTTEMP == undefined) 
    {
    	tmp = 0;
    }
    else 
    {
    tmp = _root.IBuscommunicatoRR_COOLANTTEMP;
    }
    
    fscommand("GETVAR","$IBuscommunicatoRR_COOLANTTEMP$");
    
    if (tmp <= 60) 
                {    
                zeiger._rotation = -90+11.25;
    	    }
    
    else if (tmp >= 120) 
            {    
            zeiger._rotation = +90-11.25;
    	}
    else  {
            zeiger._rotation = -90+11.25 + ((tmp-60) * 2.625);
            }
    
    tmp_txt = tmp + "C"     
    
    	}

  5. #5
    FLAC
    Auto Apps:loading...
    EL CAMINO's Avatar
    Join Date
    Jul 2005
    Location
    upland california us
    Posts
    1,282
    GETVAR isnt available yet, unless you have the test exe, im still waiting for guino to send me the exe where he is fixing this issue, another thing is, RR sets flash variables in uppercase, and flash is very picky on that, just some thoughts while looking at youre code.

  6. #6
    Variable Bitrate
    Join Date
    Sep 2012
    Location
    Germany - Munich
    Posts
    331
    in last RR Version from 2013-01-01 should GETVAR added.
    Last edited by harryberlin; 01-03-2013 at 12:56 PM.

  7. #7
    MySQL Error
    Auto Apps:loading...

    Join Date
    Oct 2004
    Posts
    5,212
    dont use the $

    "GETVAR", "IBuscommunicatoRR_COOLANTTEMP"
    -Thanks
    Mitch
    www.rush2112.net

    "Did you test it in carwings??"

    Sun, Come shine my way
    May healing waters bury all my pain
    Wind, Carry me home
    The fabric of reality is tearing apart
    The piece of me that died
    Will return To live again

  8. #8
    FLAC
    Auto Apps:loading...
    EL CAMINO's Avatar
    Join Date
    Jul 2005
    Location
    upland california us
    Posts
    1,282
    lol, i missed that, time for testing then.

  9. #9
    Variable Bitrate
    Join Date
    Sep 2012
    Location
    Germany - Munich
    Posts
    331
    Quote Originally Posted by mitchjs View Post
    dont use the $

    "GETVAR", "IBuscommunicatoRR_COOLANTTEMP"
    thx, it works fine.

Similar Threads

  1. Replies: 3
    Last Post: 09-27-2011, 05:31 AM
  2. Pass Plugin Command To Flash?
    By mezz64 in forum RR Skins
    Replies: 6
    Last Post: 11-10-2008, 05:35 PM
  3. Flash command info...
    By mauri in forum Road Runner
    Replies: 2
    Last Post: 10-12-2006, 06:00 AM
  4. RR Heading command question.
    By vinzer in forum RR Skins
    Replies: 2
    Last Post: 09-07-2006, 12:01 AM
  5. Replies: 5
    Last Post: 08-01-2006, 01:18 PM

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
  •