• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Embedding java applets into MXML code

Guest
Jan 17, 2011 Jan 17, 2011

Copy link to clipboard

Copied

I want to embed my Scratch project into my MXML flash website using an applet. The code for the applet is:

<applet id='ProjectApplet' style='display:block' code='ScratchApplet'  codebase='http://scratch.mit.edu/static/misc'  archive='ScratchApplet.jar' height='387' width='482'><param  name='project'  value='../../static/projects/geoff911/1502125.sb'></applet>  <a href='http://scratch.mit.edu/projects/geoff911/1502125'>Learn  more about this project</a>

I'm using Adobe Flash Builder to edit code for my Flash Catalyst  website. The code is MXML, but I have absolutely no idea how to code  (which is why I used Flash Catalyst to begin with). If anyone knows where  I am supposed to place this code I'd  really appreciate it. If I sound like a total idiot, I apologize! I'm doing this for a school project, not as professional work.

Thanks so much!

CODE:

<?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>

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 19, 2011 Jan 19, 2011

Copy link to clipboard

Copied

You can try using the <mx:HTML> to include an HTML page which contains your java applet. This is actually a Flex question . You should try the Flex forums here  http://forums.adobe.com/community/flex/flex_general_discussion for better response.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 19, 2011 Jan 19, 2011

Copy link to clipboard

Copied

Java applets won't run in mx:HTML.

If you are building a web application, your applet can talk to javascript and Flex also can talk to JavaScript (via ExternalInterface). But they'd be separate and not embedded in another.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 19, 2011 Jan 19, 2011

Copy link to clipboard

Copied

Sorry for not posting in the right section, but I'll keep it here to minimize the clutter.

Could I embed this image into the MXML code? It'll achieve the same thing as the Java applet but hopefully it will cooperate with FLEX.

<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>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 19, 2011 Jan 19, 2011

Copy link to clipboard

Copied

LATEST

Sure, you can use s:Image (or mx:Image if you are on Flex 3) and set its source property to the href value.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines