Your SlideShare is downloading. ×
0
Additional action script 3.0
Additional action script 3.0
Additional action script 3.0
Additional action script 3.0
Additional action script 3.0
Additional action script 3.0
Additional action script 3.0
Additional action script 3.0
Additional action script 3.0
Additional action script 3.0
Additional action script 3.0
Additional action script 3.0
Additional action script 3.0
Additional action script 3.0
Additional action script 3.0
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Additional action script 3.0

461

Published on

Published in: Design, Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
461
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
15
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Additional Action Script 3.0 Understanding the loaderClass
  • 2. Additional interaction wish list for our project Load an external swf file Load and external text file Making the text file scrollable via buttons
  • 3. var myLoader : Loader = new Loader( ); CLASS a blueprint or cookie cutter Creates a new variable named myLoader with a data type of Loader new instance of the Loader Class
  • 4. var myLoader:Loader = new Loader(); myLoader.load FUNCTION a task, such as loading an external swf file
  • 5. URLRequest a request to load an external swf file var myLoader:Loader = new Loader(); myLoader.load (new URLRequest("the name of your swf file goes here.swf"));
  • 6. var myLoader:Loader = new Loader(); myLoader.load(new URLRequest("the name of your swf file goes here.swf")); addChild(myLoader); addChild adds the swf to the family
  • 7. unload remove the swf from the timeline
  • 8. var content_req : URLRequest = new URLRequest (“name of your text file goes here.txt” ); CLASS a blueprint or cookie cutter Creates a new variable named content_req with a data type of URLRequest new instance of the URLRequest Class which specifies the name of the text file
  • 9. var content_req :URLRequest = new URLRequest(“name of your text file goes here.txt” ); var content_ldr : URLLoader = new URLLoader (“content_req” ); CLASS a blueprint or cookie cutter
  • 10. Event listener var content_req:URLRequest = new URLRequest(“name of your text file goes here.txt” ); var content_ldr :URLLoader = new URLLoader(“content_req” ); content_ldr .addEventListener(Event.COMPLETE, onComplete);
  • 11. var content_req:URLRequest = new URLRequest(“name of your text file goes here.txt” ); var content_ldr:URLLoader = new URLLoader(“content_req” ); content_ldr.addEventListener(Event.COMPLETE, onComplete); function onComplete(event:Event):void { instance name of text box .text = event.target.data; } FUNCTION a task, such as loading external text file
  • 12. function scrollUp (event:MouseEvent):void { instance name of text box .scrollV -= 2; } FUNCTION a task, such as a scrolling dynamic text file
  • 13. function scrollDown (event:MouseEvent):void { instance name of text box .scrollV += 2; } FUNCTION a task, such as a scrollable dynamic text file function scrollUp(event:MouseEvent):void { instance name of text box.scrollV -= 2; }
  • 14. Event listener instance name of scroll up button .addEventListener(MouseEvent.CLICK, function name for up ); instance name of scroll down button .addEventListener(MouseEvent.CLICK, function name for down ); function scrollDown(event:MouseEvent):void { instance name of text box.scrollV += 2; } function scrollUp(event:MouseEvent):void { instance name of text box.scrollV -= 2; }
  • 15. HTML instructions for the browser on displaying your content TAGS <b> content is here </b> bold <font color> content is here </font color> <font face> content is here </font face> <i> content goes here </i>

×