I want to embed my Scratch project as an image in a educational website I am making for a school project using Flash Catalyst and Flash Builder for code-editing. I considered embedding as a java applet but Java doesn't work very well with Adobe's FLEX programming platform. I know almost nothing about code so bear with me.
The image embed code (provided by Scratch):
<a href='http://scratch.mit.edu/projects/geoff911/1502125'><img src='http://scratch.mit.edu/static/projects/geoff911/1502125_med.png' width='425' height='319' alt='Scratch Project'></a>
My question is: on which level/layer of the code would I insert the embed code?
Thanks so much!
The MXML code I want to embed into:
<?xml version="1.0" encoding="utf-8"?>
<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:d="http://ns.adobe.com/fxg/2008/dt" xmlns:fc="http://ns.adobe.com/flashcatalyst/2009"
width="960" height="768" backgroundColor="#FFFFFF" preloaderChromeColor="#FFFFFF">
<fx:Style source="Main.css"/>
<s:states>
<s:State name="Page3" fc:color="0x00cc21"/>
</s:states>
<fx:DesignLayer d:userLabel="Layer 1">
<fx:DesignLayer d:userLabel="Lesson 1">
</fx:DesignLayer>
<s:BitmapImage smooth="true" source="@Embed('/assets/images/Home page4/Background.png')" d:userLabel="Background" x="-99" y="0"/>
<s:BitmapImage alpha="0.68" blendMode="multiply" smooth="true" source="@Embed('/assets/images/Home page4/Shape 1_s Drop Shadow.png')" d:userLabel="Shape 1's Drop Shadow" x="276" y="137"/>
<s:BitmapImage alpha="0.68" smooth="true" source="@Embed('/assets/images/Home page4/Shape 1.png')" d:userLabel="Shape 1" x="277" y="137"/>
<fx:DesignLayer d:userLabel="Lesson 1">
<s:BitmapImage smooth="true" source="@Embed('/assets/images/Home page4/Outline.png')" d:userLabel="Outline" x="97" y="198"/>
<s:BitmapImage blendMode="multiply" smooth="true" source="@Embed('/assets/images/Home page4/Outline rollover_s Drop Shadow.png')" d:userLabel="Outline rollover's Drop Shadow" visible="false" x="96" y="198"/>
<s:BitmapImage smooth="true" source="@Embed('/assets/images/Home page4/Outline rollover.png')" d:userLabel="Outline rollover" visible="false" x="97" y="198"/>
<s:RichText color="#720618" fontFamily="Albertus Extra Bold" fontSize="40" fontWeight="bold" kerning="off" lineHeight="120%" textAlign="center" d:userLabel="Button" whiteSpaceCollapse="preserve" x="117" y="208">
<s:content><s:p><s:span>1</s:span></s:p></s:content>
</s:RichText>
<s:RichText color="#010101" fontFamily="Albertus Extra Bold" fontSize="40" fontWeight="bold" kerning="off" lineHeight="120%" textAlign="center" d:userLabel="Rollover" visible="false" whiteSpaceCollapse="preserve" x="117" y="208">
<s:content><s:p><s:span>1</s:span></s:p></s:content>
</s:RichText>
<s:RichText color="#460672" fontFamily="Albertus Extra Bold" fontSize="30" fontWeight="bold" kerning="off" lineHeight="120%" textAlign="center" d:userLabel="Label" visible="false" whiteSpaceCollapse="preserve" x="167" y="215">
<s:content><s:p><s:span>Colors</s:span></s:p></s:content>
</s:RichText>
</fx:DesignLayer>
<fx:DesignLayer d:userLabel="Lesson 2">
<s:BitmapImage smooth="true" source="@Embed('/assets/images/Home page4/Outline1.png')" d:userLabel="Outline" x="97" y="296"/>
<s:BitmapImage blendMode="multiply" smooth="true" source="@Embed('/assets/images/Home page4/Outline rollover_s Drop Shadow1.png')" d:userLabel="Outline rollover's Drop Shadow" visible="false" x="96" y="296"/>
<s:BitmapImage smooth="true" source="@Embed('/assets/images/Home page4/Outline rollover1.png')" d:userLabel="Outline rollover" visible="false" x="97" y="296"/>
<s:RichText color="#720618" fontFamily="Albertus Extra Bold" fontSize="40" fontWeight="bold" kerning="off" lineHeight="120%" textAlign="center" d:userLabel="Button" whiteSpaceCollapse="preserve" x="117" y="306">
<s:content><s:p><s:span>2</s:span></s:p></s:content>
</s:RichText>
<s:RichText color="#010101" fontFamily="Albertus Extra Bold" fontSize="40" fontWeight="bold" kerning="off" lineHeight="120%" textAlign="center" d:userLabel="Rollover" visible="false" whiteSpaceCollapse="preserve" x="117" y="306">
<s:content><s:p><s:span>2</s:span></s:p></s:content>
</s:RichText>
<s:RichText color="#460672" fontFamily="Albertus Extra Bold" fontSize="30" fontWeight="bold" kerning="off" lineHeight="120%" textAlign="center" d:userLabel="Label" visible="false" whiteSpaceCollapse="preserve" x="184" y="313">
<s:content><s:p><s:span>Pets</s:span></s:p></s:content>
</s:RichText>
</fx:DesignLayer>
<fx:DesignLayer d:userLabel="Lesson 3">
<s:BitmapImage smooth="true" source="@Embed('/assets/images/Home page4/Outline2.png')" d:userLabel="Outline" x="97" y="393"/>
<s:BitmapImage blendMode="multiply" smooth="true" source="@Embed('/assets/images/Home page4/Outline rollover_s Drop Shadow2.png')" d:userLabel="Outline rollover's Drop Shadow" visible="false" x="96" y="393"/>
<s:BitmapImage smooth="true" source="@Embed('/assets/images/Home page4/Outline rollover2.png')" d:userLabel="Outline rollover" visible="false" x="97" y="393"/>
<s:RichText color="#720618" fontFamily="Albertus Extra Bold" fontSize="40" fontWeight="bold" kerning="off" lineHeight="120%" textAlign="center" d:userLabel="Button" whiteSpaceCollapse="preserve" x="117" y="403">
<s:content><s:p><s:span>3</s:span></s:p></s:content>
</s:RichText>
<s:RichText color="#010101" fontFamily="Albertus Extra Bold" fontSize="40" fontWeight="bold" kerning="off" lineHeight="120%" textAlign="center" d:userLabel="Rollover" visible="false" whiteSpaceCollapse="preserve" x="117" y="403">
<s:content><s:p><s:span>3</s:span></s:p></s:content>
</s:RichText>
<s:RichText color="#460672" fontFamily="Albertus Extra Bold" fontSize="30" fontWeight="bold" kerning="off" lineHeight="120%" textAlign="center" d:userLabel="Label" visible="false" whiteSpaceCollapse="preserve" x="167" y="410">
<s:content><s:p><s:span>Family</s:span></s:p></s:content>
</s:RichText>
</fx:DesignLayer>
<fx:DesignLayer d:userLabel="Lesson 4">
<s:BitmapImage smooth="true" source="@Embed('/assets/images/Home page4/Outline3.png')" d:userLabel="Outline" x="97" y="491"/>
<s:BitmapImage blendMode="multiply" smooth="true" source="@Embed('/assets/images/Home page4/Outline rollover_s Drop Shadow3.png')" d:userLabel="Outline rollover's Drop Shadow" visible="false" x="96" y="491"/>
<s:BitmapImage smooth="true" source="@Embed('/assets/images/Home page4/Outline rollover3.png')" d:userLabel="Outline rollover" visible="false" x="97" y="491"/>
<s:RichText color="#720618" fontFamily="Albertus Extra Bold" fontSize="40" fontWeight="bold" kerning="off" lineHeight="120%" textAlign="center" d:userLabel="Button" whiteSpaceCollapse="preserve" x="117" y="501">
<s:content><s:p><s:span>4</s:span></s:p></s:content>
</s:RichText>
<s:RichText color="#010101" fontFamily="Albertus Extra Bold" fontSize="40" fontWeight="bold" kerning="off" lineHeight="120%" textAlign="center" d:userLabel="Rollover" visible="false" whiteSpaceCollapse="preserve" x="117" y="501">
<s:content><s:p><s:span>4</s:span></s:p></s:content>
</s:RichText>
<s:RichText color="#460672" fontFamily="Albertus Extra Bold" fontSize="30" fontWeight="bold" kerning="off" lineHeight="120%" textAlign="center" d:userLabel="Label" visible="false" whiteSpaceCollapse="preserve" x="161" y="506">
<s:content><s:p><s:span>Body parts</s:span></s:p></s:content>
</s:RichText>
</fx:DesignLayer>
<fx:DesignLayer d:userLabel="Lesson 5">
<s:BitmapImage smooth="true" source="@Embed('/assets/images/Home page4/Outline4.png')" d:userLabel="Outline" x="97" y="590"/>
<s:BitmapImage blendMode="multiply" smooth="true" source="@Embed('/assets/images/Home page4/Outline rollover_s Drop Shadow4.png')" d:userLabel="Outline rollover's Drop Shadow" visible="false" x="96" y="590"/>
<s:BitmapImage smooth="true" source="@Embed('/assets/images/Home page4/Outline rollover4.png')" d:userLabel="Outline rollover" visible="false" x="97" y="590"/>
<s:RichText color="#720618" fontFamily="Albertus Extra Bold" fontSize="40" fontWeight="bold" kerning="off" lineHeight="120%" textAlign="center" d:userLabel="Button" whiteSpaceCollapse="preserve" x="117" y="600">
<s:content><s:p><s:span>5</s:span></s:p></s:content>
</s:RichText>
<s:RichText color="#010101" fontFamily="Albertus Extra Bold" fontSize="40" fontWeight="bold" kerning="off" lineHeight="120%" textAlign="center" d:userLabel="Rollover" visible="false" whiteSpaceCollapse="preserve" x="117" y="600">
<s:content><s:p><s:span>5</s:span></s:p></s:content>
</s:RichText>
<s:RichText color="#460672" fontFamily="Albertus Extra Bold" fontSize="30" fontWeight="bold" kerning="off" lineHeight="120%" textAlign="center" d:userLabel="Label" visible="false" whiteSpaceCollapse="preserve" x="162" y="605">
<s:content><s:p><s:span>Numbers</s:span></s:p></s:content>
</s:RichText>
</fx:DesignLayer>
<s:RichText color="#720618" fontFamily="Garamond Premr Pro" fontSize="65" height="70" lineHeight="120%" textAlign="center" d:userLabel="BHS Mandarin Interactive Lessons" whiteSpaceCollapse="preserve" width="1076" x="4" y="41">
<s:content><s:p><s:span>BHS Mandarin Interactive Lessons</s:span></s:p></s:content>
</s:RichText>
<s:BitmapImage smooth="true" source="@Embed('/assets/images/Home page4/logo.png')" d:userLabel="logo" x="33" y="41"/>
</fx:DesignLayer>
</s:Application>
Offline
I have no idea. this is way beyond my reach. but you can embed the experimental viewer:
<div class="frame" id="div">
<EMBED
src="http://scratch.mit.edu/static/experimental/Scratch.
swf?owner=username&projectname=projectnumber&userid=userid"
bgcolor="#FFFFFF"
WIDTH="100%" HEIGHT="100%"
allowScriptAccess="always"
wmode="opaque"
TYPE="application/x-shockwave-flash">
</EMBED>
</div>
This would embed it as a flash app, which works well with adobe FLEX (duh)
Last edited by hello12345678910 (2011-01-18 11:31:46)
Offline
hello12345678910 wrote:
I have no idea. this is way beyond my reach. but you can embed the experimental viewer:
<div class="frame" id="div">
<EMBED
src="http://scratch.mit.edu/static/experimental/Scratch.
swf?owner=username&projectname=projectnumber&userid=userid"
bgcolor="#FFFFFF"
WIDTH="100%" HEIGHT="100%"
allowScriptAccess="always"
wmode="opaque"
TYPE="application/x-shockwave-flash">
</EMBED>
</div>
This would embed it as a flash app, which works well with adobe FLEX (duh)
Did you get that code from what-the's post? (If so, maybe you should give credit)
Offline
hello12345678910 wrote:
I have no idea. this is way beyond my reach. but you can embed the experimental viewer:
<div class="frame" id="div">
<EMBED
src="http://scratch.mit.edu/static/experimental/Scratch.
swf?owner=username&projectname=projectnumber&userid=userid"
bgcolor="#FFFFFF"
WIDTH="100%" HEIGHT="100%"
allowScriptAccess="always"
wmode="opaque"
TYPE="application/x-shockwave-flash">
</EMBED>
</div>
This would embed it as a flash app, which works well with adobe FLEX (duh)
Would I replace
"swf?owner=username&projectname=projectnumber&userid=userid"
with the appropriate info? It seems you got this from another part of the forum. Could you link me? Thanks!
Offline
geoff911 wrote:
hello12345678910 wrote:
I have no idea. this is way beyond my reach. but you can embed the experimental viewer:
<div class="frame" id="div">
<EMBED
src="http://scratch.mit.edu/static/experimental/Scratch.
swf?owner=username&projectname=projectnumber&userid=userid"
bgcolor="#FFFFFF"
WIDTH="100%" HEIGHT="100%"
allowScriptAccess="always"
wmode="opaque"
TYPE="application/x-shockwave-flash">
</EMBED>
</div>
This would embed it as a flash app, which works well with adobe FLEX (duh)Would I replace
"swf?owner=username&projectname=projectnumber&userid=userid"
with the appropriate info? It seems you got this from another part of the forum. Could you link me? Thanks!
I believe this is the topic it came from. http://scratch.mit.edu/forums/viewtopic.php?id=54525
Offline