-
1. Re: iframe on a symbol created dynamically
joel_pau Jun 20, 2014 10:20 AM (in response to smenegassi)Hi,
I will try this code:
var externalURL ="portfolio/FFD.html";
var mywrapper = sym.createChildSymbol("wrapper","Stage");
var wrapperMove = TweenMax.to(mywrapper.getSymbolElement(),2, {css:{top:"2500", left:"0"},ease:Sine.easeOut} );
sym.$("mywrapper").html( '<iframe src='+ externalURL +' height="99%" width="99%"></iframe>' );
-
2. Re: iframe on a symbol created dynamically
smenegassi Jun 20, 2014 10:20 AM (in response to smenegassi)Thank you.
I'll try it tomorrow. And I let you know.
-
3. Re: iframe on a symbol created dynamically
smenegassi Jun 21, 2014 2:58 AM (in response to smenegassi)OK. it didn't work. The symbol is created and it moves but it doesn't load my external composition.
I can create an instance of a symbol, put it on the Stage and move it with Greensocks.
var mywrapper=$(sym.createChildSymbol("wrapper", "Stage").getSymbolElement());
var mytween = TweenMax.to(mywrapper, 3, {css:{top:"2400px"}});
But when I try to load an external composition into my Symbol it doesn't work.
var externalUrl ="portfolio/central.html";
sym.$("mywrapper").html("<iframe src="+externalUrl+"height=99% width=99%></iframe>");
-
4. Re: iframe on a symbol created dynamically
joel_pau Jun 21, 2014 3:34 AM (in response to smenegassi)Your code doesn’t run because you are using double quotes and only double quotes.
My code mixes single and double quotes. Only percentages have double quotes. I used 4 double quotes (red characters: " ) and 4 single quotes (green characters: ' ).
I copy and paste the same line of code : sym.$("mywrapper").html( '<iframe src='+ externalURL +' height="99%" width="99%"></iframe>' );
-
5. Re: iframe on a symbol created dynamically
smenegassi Jun 21, 2014 3:49 AM (in response to joel_pau)Hi, thanks again... but I is not working..
I put it on line for you to see if you want/can. It is only my new portfolio, i am doing it with Edge, so to learn it and see the "goodies" and the "baddies" ;-)
To call the external composition you have to go down to the print section of the site and click on the yellow (Little Miss Sunshine button)
I put a red oval on the symbol, so I can see that the instance has been created and the TweenMax works.... but it doesn't load the external composition.
-
6. Re: iframe on a symbol created dynamically
smenegassi Jun 21, 2014 6:25 AM (in response to smenegassi)Hi Joel
It worked like that...;
var mywrapper = sym.createChildSymbol("wrapper","Stage");
var wrapperMove = TweenMax.to(mywrapper.getSymbolElement(),2, {css:{top:"2500px", left:"0px"},ease:Sine.easeOut} );
mywrapper.getSymbolElement().html( '<iframe src="portfolio/FFD.html" height="99%" width="99%"></iframe>' );
Somehow it didin'tt like the externalURL variable... don't know why....
I ll have to figure it out.
thanks for your help
-
7. Re: iframe on a symbol created dynamically
joel_pau Jun 21, 2014 9:10 AM (in response to smenegassi)Ok. Great !



