×
Namespaces

Variants
Actions
Revision as of 07:39, 10 February 2012 by hamishwillee (Talk | contribs)

Archived:SlidePanel component for Flash Lite

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Code ExampleArticle
Created: User:Peterelst (13 Jun 2009)
Last edited: hamishwillee (10 Feb 2012)

This page explains the installation and use of the SlidePanel component for Flash Lite.

Contents

Description

The SlidePanel component allows you to specify any number of movie clips for use in your Flash Lite application and navigate through them through a slide effect.

Installation

Install the component by unzipping the downloaded SlidePanelComponent.zip, double-clicking the SlidePanel.mxp file and following the instructions in the Adobe Extension Manager. Restart Flash CS3/CS4 after installing to see the SlidePanel component show up in the Components panel.

Requirements

  • Adobe Flash Professional CS3 or CS4

Download

You can download the SlidePanel component here: Media:SlidePanelComponent.zip

Basic usage

  • Drag the SlidePanel component from the Components panel to the stage
  • Open the Component Inspector panel
  • Specify the component properties (see screenshot)


SlidePanel-componentinspector.png


Movieclips are added to the SlidePanel component by their linkage ID value. To set a linkage ID for a movie clip, right-click it in the Library panel and go to Properties. There you select "Export for ActionScript" and fill in the "Identifier" field (see screenshot). This is a String value that you can later use to reference that particular movieclip through code.

SlidePanel-linkage.png


Component API

Methods

  • addPanel - add a movie clip linkage ID to the queue (String value)
  • init - initialize the SlidePanel component and attach initial movie clip
  • previous - slides to previous panel in queue if available (returns a Boolean)
  • next - slides to next panel in queue if available (returns a Boolean)
  • slideTo - navigates to any given movie clip with a given slide direction (left/right)


Properties

  • speed - Number value, speed at which the slide effect occurs (default value is 5)
  • panel - String value, returns the current panel linkage ID

Events

  • first - event triggers when first panel in queue is reached
  • last - event triggers when last panel in queue is reached
  • animating - event triggers when slide effect is starting
  • animation_complete - event triggers when slide effect is finished

Examples

All examples below assume you have an instance of the SlidePanel component on stage with instance name "slidePanel"

Programatically add movie clips to the SlidePanel

Invalid language.

You need to specify a language like this: <source lang="html4strict">...</source>

Supported languages for syntax highlighting:

4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript, actionscript3, ada, algol68, apache, applescript, apt_sources, asm, asp, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_loadrunner, c_mac, caddcl, cadlisp, cfdg, cfm, chaiscript, cil, clojure, cmake, cobol, coffeescript, cpp, cpp-qt, csharp, css, cuesheet, d, dcs, delphi, diff, div, dos, dot, e, ecmascript, eiffel, email, epc, erlang, euphoria, f1, falcon, fo, fortran, freebasic, fsharp, gambas, gdb, genero, genie, gettext, glsl, gml, gnuplot, go, groovy, gwbasic, haskell, hicest, hq9plus, html4strict, html5, icon, idl, ini, inno, intercal, io, j, java, java5, javascript, jquery, kixtart, klonec, klonecpp, latex, lb, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, mmix, modula2, modula3, mpasm, mxml, mysql, newlisp, nsis, oberon2, objc, objeck, ocaml, ocaml-brief, oobas, oracle11, oracle8, oxygene, oz, pascal, pcre, per, perl, perl6, pf, php, php-brief, pic16, pike, pixelbender, pli, plsql, postgresql, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, python, q, qbasic, rails, rebol, reg, robots, rpmspec, rsplus, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, sql, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, uscript, vala, vb, vbnet, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xbasic, xml, xorg_conf, xpp, yaml, z80, zxbasic


slidePanel.addPanel("slide1");
slidePanel.addPanel("slide2");
slidePanel.init();

To avoid problems with positioning, make sure you set the registration point of the movie clips to the top left corner.


Slide to any given movie clip

Invalid language.

You need to specify a language like this: <source lang="html4strict">...</source>

Supported languages for syntax highlighting:

4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript, actionscript3, ada, algol68, apache, applescript, apt_sources, asm, asp, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_loadrunner, c_mac, caddcl, cadlisp, cfdg, cfm, chaiscript, cil, clojure, cmake, cobol, coffeescript, cpp, cpp-qt, csharp, css, cuesheet, d, dcs, delphi, diff, div, dos, dot, e, ecmascript, eiffel, email, epc, erlang, euphoria, f1, falcon, fo, fortran, freebasic, fsharp, gambas, gdb, genero, genie, gettext, glsl, gml, gnuplot, go, groovy, gwbasic, haskell, hicest, hq9plus, html4strict, html5, icon, idl, ini, inno, intercal, io, j, java, java5, javascript, jquery, kixtart, klonec, klonecpp, latex, lb, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, mmix, modula2, modula3, mpasm, mxml, mysql, newlisp, nsis, oberon2, objc, objeck, ocaml, ocaml-brief, oobas, oracle11, oracle8, oxygene, oz, pascal, pcre, per, perl, perl6, pf, php, php-brief, pic16, pike, pixelbender, pli, plsql, postgresql, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, python, q, qbasic, rails, rebol, reg, robots, rpmspec, rsplus, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, sql, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, uscript, vala, vb, vbnet, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xbasic, xml, xorg_conf, xpp, yaml, z80, zxbasic


slidePanel.slideTo("someMovieClip", "left");

The example above assumes there is a movie clip with linkage ID "someMovieClip" in your project. This movie clip does not necessarily need to be in the queue. Possible values for slide direction are left or right.


Get notified when the SlidePanel component reaches the first or last movie clip in the queue

Invalid language.

You need to specify a language like this: <source lang="html4strict">...</source>

Supported languages for syntax highlighting:

4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript, actionscript3, ada, algol68, apache, applescript, apt_sources, asm, asp, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_loadrunner, c_mac, caddcl, cadlisp, cfdg, cfm, chaiscript, cil, clojure, cmake, cobol, coffeescript, cpp, cpp-qt, csharp, css, cuesheet, d, dcs, delphi, diff, div, dos, dot, e, ecmascript, eiffel, email, epc, erlang, euphoria, f1, falcon, fo, fortran, freebasic, fsharp, gambas, gdb, genero, genie, gettext, glsl, gml, gnuplot, go, groovy, gwbasic, haskell, hicest, hq9plus, html4strict, html5, icon, idl, ini, inno, intercal, io, j, java, java5, javascript, jquery, kixtart, klonec, klonecpp, latex, lb, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, mmix, modula2, modula3, mpasm, mxml, mysql, newlisp, nsis, oberon2, objc, objeck, ocaml, ocaml-brief, oobas, oracle11, oracle8, oxygene, oz, pascal, pcre, per, perl, perl6, pf, php, php-brief, pic16, pike, pixelbender, pli, plsql, postgresql, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, python, q, qbasic, rails, rebol, reg, robots, rpmspec, rsplus, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, sql, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, uscript, vala, vb, vbnet, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xbasic, xml, xorg_conf, xpp, yaml, z80, zxbasic


function onFirstPanel(evt:Object):Void {
  trace("first panel reached");
  trace(evt.panel);
}

function onLastPanel(evt:Object):Void {
  trace("last panel reached");
  trace(evt.panel);
}


slidePanel.addEventListener("first", onFirstPanel);
slidePanel.addEventListener("last", onLastPanel);
52 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×