Skip to main content
Participant
March 9, 2008
Answered

Flash CS3 Form Application doesn't support FlashVars?

  • March 9, 2008
  • 6 replies
  • 500 views
Anyone try load FlashVars in Form Application? It doesn't work. Why?
In HTML object tag i add:
<param name="FlashVars" value="varvalue=myValue" />
<embed src="flash/student.swf" FlashVars="varvalue=myValue" ...


And on frame on first form (named: application) i use code:

myTxt.text = _root.varvalue+ "-" + _level0.varvalue+ "-" + varvalue;

And I got: undefined-endefined-undefined. Why nothnig of this don't work?

But when I create normal Flash Project, it works fine! ????

-----------------------------------------------------------------------------------------
Sorry for my english. I dont know it so good. THANKS!
This topic has been closed for replies.
Correct answer Ivan Stimac
I found problem. Problem is in javascript code, it also must be edited:

script type="text/javascript">
<script type="text/javascript">
AC_FL_RunContent( 'codebase',' http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0', 'width','762', 'height','502', 'class','flashBdr', 'src', 'mymovie?myVar=myValue', 'quality', 'high', 'pluginspage', ' http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash', 'movie', 'mymovie?myVar=myValue' ); //end AC code


and in object tag i used this, but it works also with FlashVars:
<param name="movie" value="mymovie.swf?myVar=myValue" />
<embed src="mymovie.swf?myVar=myValue"...

I don't know why this is not in flash documentation... But now works perfect.

6 replies

Inspiring
March 10, 2008
Nie job, glad you figured it out.

--
Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/


Ivan StimacAuthorCorrect answer
Participant
March 9, 2008
I found problem. Problem is in javascript code, it also must be edited:

script type="text/javascript">
<script type="text/javascript">
AC_FL_RunContent( 'codebase',' http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0', 'width','762', 'height','502', 'class','flashBdr', 'src', 'mymovie?myVar=myValue', 'quality', 'high', 'pluginspage', ' http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash', 'movie', 'mymovie?myVar=myValue' ); //end AC code


and in object tag i used this, but it works also with FlashVars:
<param name="movie" value="mymovie.swf?myVar=myValue" />
<embed src="mymovie.swf?myVar=myValue"...

I don't know why this is not in flash documentation... But now works perfect.
Participant
March 9, 2008
This is good solution if there is no better (createing empty swf and loading screen swf into this one, there must be better solution).
I can't understand why it is not possible to use FlashVars in way we can use them in normal Flash Project, and there is nothing about this in Flash documentation, so this should be some bug, I think...
Inspiring
March 9, 2008
>> I know it should be the same variable, but I think maybe some of this is
>> wrong or somethnig...

The thing is you're tracing the _same_ variable... If anything is wrong
tracing the same thing, three different ways, doesn't matter... See what I
mean?

Sorry, but I have never used the screens feature, or the forms thing. I make
any forms from scratch, using the plain as2 file. Why is the article not a
good solution? By the title it sounds perfect.


--
Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/


Participant
March 9, 2008
Thaks DMennenoh,
I know it should be the same variable, but I think maybe some of this is wrong or somethnig...

I publish for AS2 and if i choose ASC i got message: Screen-based documents must target ActionScript 2.0.

Also I found this articile:
TITLE: How to get FLASHVARS to work with a Forms application
URL: http://flashmove.com/forum/showthread.php?t=14154
But this isn't good solution for me...

Is this some bug in Flash or I need to use some other way when I create Flash From Application, where Flash Form Application declare this variables from FlashVars?
Inspiring
March 9, 2008
If you're publishing for AS3 then it doesn't work the same. Also, if your
code is on the main timeline, then: _root.varvalue+ "-" + _level0.varvalue+
"-" + varvalue - you are tracing the same variable. There's no need to put
anything more than just varvalue.
Anyway, see Help for the LoaderInfo class. I think the parameters property
is what you're after.


--
Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/