2

I just made a Flash animation and put a dynamic URL inside an AS2 button... then I exported the animation as HTML 5 using SWIFFY and it works fine if I call the URL from the original Swiffy file after changeing the extenssion to php, but the head section of my document is just too big, you know swiffy converts images to code ant the thing is just to big:

So I tried moving the swiffy code to an external js file and this is where the problem occurs, so than I tried putting the swiffi file inside an Iframe using href http://mysite.com/index?myvar=var and same result always get the php tags and $var on the url, made a two hour search in Google and haven't found an answer to my problem.

    http://mysite.com/index?myvar=<?= $var ?>

Instead of:

    http://mysite.com/index?myvar=var

the Swiffy code shows like this:

    {"body":[{"value":"document.php?myvar=<?=$var;?>","type":305}

Yes I made a search and after two hours decided to post the question

any help is appreciated :)

Samuel Ramzan
  • 1,770
  • 1
  • 15
  • 24
  • Hello Tadeck, I don't understand your question – Samuel Ramzan Sep 01 '12 at 16:41
  • I edited the question to be more clear on what I'm talking about – Samuel Ramzan Sep 01 '12 at 16:59
  • To ask a question on StackOverflow and avoid it being closed, you need to show some effort and try to solve the problem yourself. This is not a place for getting work done for free, only a place when you can get other people's help if you show enough effort to solve it yourself. In your question you should give as many details as may be needed to solve the problem, along with the list of solutions you have tried. Please read [faq]. – Tadeck Sep 01 '12 at 17:02
  • I did not mean to offend you an any way, if I did I'm sorry, but I don't want you to do the job for me. I guess you miss understood me, if I have to pay I can pay but not for something that I thought it was a common problem to someone else. Sorry to bother you – Samuel Ramzan Sep 01 '12 at 17:11
  • 1
    no, it is okay. Your previous version was looking like you did not try to solve it yourself. Now I think the problem is related to using PHP code within the file that is not interpreted by PHP interpreter. You should either stick to using PHP to append that variable to URL (and thus put it into PHP file), get rid of this additional GET parameter, or find another solution that will not need PHP. In the third option, I probably cannot help you, a I am not profficient with Swiffy. From short research it looks like it is just HTML5, so you can use JS. Hope now someone helps you. – Tadeck Sep 01 '12 at 17:17
  • Thanks' for the advice I'll head in that direction.. Peace (Y) :) – Samuel Ramzan Sep 01 '12 at 17:50
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/16139/discussion-between-sam-ram-san-and-tadeck) – Samuel Ramzan Sep 01 '12 at 18:17

1 Answers1

2

The Swiffy FAQ here https://www.google.com/doubleclick/studio/swiffy/faq.html

says (paraphrased):

You can pass a parameter to your Swiffy file in the URL like ?{variableName}=http://www.google.com, or by inserting the following code snippet in the Swiffy output, just before the call to stage.start():

or with JS like this right before you call stage.start();

stage.setFlashVars("{variableName}=http://www.google.com");

In your ActionScript code or Flash timeline, the would be assigned to the _root or _level0 object:

_root.{variableName} or _{variableName}

I don't have time to do a test case right now but that should work according to the documentation.

sapptime
  • 430
  • 3
  • 9